@topolo/sdk 0.1.2 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -56,18 +56,1209 @@ var TopoloHttpError = class extends TopoloSdkError {
56
56
  }
57
57
  };
58
58
 
59
- // src/services.ts
60
- var DEFAULT_SERVICE_URLS = {
59
+ // src/services.generated.ts
60
+ var SERVICES = {
61
+ agent: "https://topolo-agent-worker.topolo.workers.dev",
61
62
  auth: "https://auth.topolo.app",
62
- crm: "https://topolo-crm-worker.topolo.workers.dev"
63
+ bugfix: "https://bugfix.topolo.app",
64
+ bytes: "https://r2-media-manager-worker.topolo.workers.dev",
65
+ calendar: "https://calendar.topolo.app",
66
+ chat: "https://chat.topolo.app",
67
+ commerce: "https://topolo-commerce-api.topolo.workers.dev",
68
+ crm: "https://crm-api.topolo.app",
69
+ forecast: "https://forecast-worker-production.topolo.workers.dev",
70
+ learn: "https://topololearn-api.topolo.workers.dev",
71
+ mail: "https://mail.topolo.app",
72
+ mdm: "https://topolo-mdm-api.topolo.app",
73
+ messaging: "https://messages.topolo.app",
74
+ nexus: "https://topolo-nexus-gateway.topolo.workers.dev",
75
+ one: "https://topoloone-worker.topolo.workers.dev",
76
+ pay: "https://topolo-pay.topolo.workers.dev",
77
+ "quro.api": "https://api.ol0.me",
78
+ "quro.redirect": "https://ol0.me",
79
+ roadmapper: "https://roadmapper-api.topolo.app",
80
+ social_studio: "https://topolo-social-studio-api.topolo.workers.dev",
81
+ socialize: "https://socialize-prod-api.topolo.workers.dev",
82
+ support: "https://support.topolo.app",
83
+ web: "https://web-api.topolo.app"
63
84
  };
64
85
  var PLATFORM_SERVICE_IDS = {
65
86
  crm: "srv_iCwM4jGXcwlj"
66
87
  };
88
+
89
+ // src/applications.generated.ts
90
+ var APPLICATIONS = {
91
+ "admin": {
92
+ "id": "admin",
93
+ "appDir": "TopoloAdmin",
94
+ "name": "topoloadmin",
95
+ "packageName": "topolo-admin",
96
+ "productionUrl": "https://admin.topolo.app",
97
+ "services": [],
98
+ "deployTargets": [
99
+ {
100
+ "name": "topoloadmin",
101
+ "kind": "pages",
102
+ "apiUrl": null,
103
+ "domains": [],
104
+ "routes": [],
105
+ "serviceId": null
106
+ }
107
+ ]
108
+ },
109
+ "agent": {
110
+ "id": "agent",
111
+ "appDir": "TopoloAgent",
112
+ "name": "topolo-agent",
113
+ "packageName": "topolo-agent",
114
+ "productionUrl": "https://agent.topolo.app",
115
+ "services": [
116
+ "agent"
117
+ ],
118
+ "deployTargets": [
119
+ {
120
+ "name": "topolo-agent",
121
+ "kind": "pages",
122
+ "apiUrl": null,
123
+ "domains": [],
124
+ "routes": [],
125
+ "serviceId": null
126
+ },
127
+ {
128
+ "name": "topolo-agent-worker",
129
+ "kind": "worker",
130
+ "apiUrl": "https://topolo-agent-worker.topolo.workers.dev",
131
+ "domains": [],
132
+ "routes": [],
133
+ "serviceId": "agent"
134
+ }
135
+ ]
136
+ },
137
+ "auth": {
138
+ "id": "auth",
139
+ "appDir": "TopoloAuth",
140
+ "name": "topolo-auth",
141
+ "packageName": "topolo-auth",
142
+ "productionUrl": "https://auth.topolo.app/login",
143
+ "services": [
144
+ "auth"
145
+ ],
146
+ "deployTargets": [
147
+ {
148
+ "name": "topolo-auth",
149
+ "kind": "worker",
150
+ "apiUrl": "https://auth.topolo.app",
151
+ "domains": [
152
+ "auth.topolo.app"
153
+ ],
154
+ "routes": [
155
+ "auth.topolo.app"
156
+ ],
157
+ "serviceId": "auth"
158
+ }
159
+ ]
160
+ },
161
+ "bugfix": {
162
+ "id": "bugfix",
163
+ "appDir": "TopoloBugFix",
164
+ "name": "topolo-bugfix",
165
+ "packageName": "topolo-bugfix",
166
+ "productionUrl": "https://bugfix.topolo.app",
167
+ "services": [
168
+ "bugfix"
169
+ ],
170
+ "deployTargets": [
171
+ {
172
+ "name": "topolo-bugfix",
173
+ "kind": "worker",
174
+ "apiUrl": "https://bugfix.topolo.app",
175
+ "domains": [
176
+ "bugfix.topolo.app"
177
+ ],
178
+ "routes": [
179
+ "bugfix.topolo.app"
180
+ ],
181
+ "serviceId": "bugfix"
182
+ }
183
+ ]
184
+ },
185
+ "bytes": {
186
+ "id": "bytes",
187
+ "appDir": "TopoloBytes",
188
+ "name": "topolo-bytes",
189
+ "packageName": "topolo-bytes",
190
+ "productionUrl": "https://bytes.topolo.app",
191
+ "services": [
192
+ "bytes"
193
+ ],
194
+ "deployTargets": [
195
+ {
196
+ "name": "bytes",
197
+ "kind": "pages",
198
+ "apiUrl": null,
199
+ "domains": [],
200
+ "routes": [],
201
+ "serviceId": null
202
+ },
203
+ {
204
+ "name": "r2-media-manager-worker",
205
+ "kind": "worker",
206
+ "apiUrl": "https://r2-media-manager-worker.topolo.workers.dev",
207
+ "domains": [],
208
+ "routes": [],
209
+ "serviceId": "bytes"
210
+ }
211
+ ]
212
+ },
213
+ "calendar": {
214
+ "id": "calendar",
215
+ "appDir": "TopoloCalendar",
216
+ "name": "topolo-calendar",
217
+ "packageName": "topolo-calendar",
218
+ "productionUrl": "https://calendar.topolo.app",
219
+ "services": [
220
+ "calendar"
221
+ ],
222
+ "deployTargets": [
223
+ {
224
+ "name": "topolo-calendar",
225
+ "kind": "worker",
226
+ "apiUrl": "https://calendar.topolo.app",
227
+ "domains": [
228
+ "calendar.topolo.app"
229
+ ],
230
+ "routes": [
231
+ "calendar.topolo.app"
232
+ ],
233
+ "serviceId": "calendar"
234
+ }
235
+ ]
236
+ },
237
+ "chat": {
238
+ "id": "chat",
239
+ "appDir": "TopoloChat",
240
+ "name": "topolo-chat",
241
+ "packageName": "topolo-chat",
242
+ "productionUrl": "https://chat.topolo.app",
243
+ "services": [
244
+ "chat"
245
+ ],
246
+ "deployTargets": [
247
+ {
248
+ "name": "topolo-chat",
249
+ "kind": "worker",
250
+ "apiUrl": "https://chat.topolo.app",
251
+ "domains": [
252
+ "chat.topolo.app"
253
+ ],
254
+ "routes": [
255
+ "chat.topolo.app"
256
+ ],
257
+ "serviceId": "chat"
258
+ }
259
+ ]
260
+ },
261
+ "cli": {
262
+ "id": "cli",
263
+ "appDir": "TopoloCli",
264
+ "name": "@topolo/cli",
265
+ "packageName": "@topolo/cli",
266
+ "productionUrl": null,
267
+ "services": [],
268
+ "deployTargets": []
269
+ },
270
+ "cloudcontrol": {
271
+ "id": "cloudcontrol",
272
+ "appDir": "TopoloCloudControl",
273
+ "name": "topolo-cloudcontrol",
274
+ "packageName": "topolo-cloudcontrol",
275
+ "productionUrl": null,
276
+ "services": [],
277
+ "deployTargets": []
278
+ },
279
+ "commerce": {
280
+ "id": "commerce",
281
+ "appDir": "TopoloCommerce",
282
+ "name": "topolo-commerce",
283
+ "packageName": "topolo-commerce",
284
+ "productionUrl": "https://commerce.topolo.app",
285
+ "services": [
286
+ "commerce"
287
+ ],
288
+ "deployTargets": [
289
+ {
290
+ "name": "topolo-commerce-api",
291
+ "kind": "worker",
292
+ "apiUrl": "https://topolo-commerce-api.topolo.workers.dev",
293
+ "domains": [
294
+ "topolo-commerce-api.topolo.workers.dev"
295
+ ],
296
+ "routes": [],
297
+ "serviceId": "commerce"
298
+ },
299
+ {
300
+ "name": "topolo-commerce-guest-web",
301
+ "kind": "pages",
302
+ "apiUrl": null,
303
+ "domains": [
304
+ "guest.topolo.app",
305
+ "topolo-commerce-guest-web.pages.dev"
306
+ ],
307
+ "routes": [],
308
+ "serviceId": null
309
+ },
310
+ {
311
+ "name": "topolo-commerce-ops-web",
312
+ "kind": "pages",
313
+ "apiUrl": null,
314
+ "domains": [
315
+ "commerce.topolo.app",
316
+ "topolo-commerce-ops-web.pages.dev"
317
+ ],
318
+ "routes": [],
319
+ "serviceId": null
320
+ },
321
+ {
322
+ "name": "topolo-commerce-station-web",
323
+ "kind": "pages",
324
+ "apiUrl": null,
325
+ "domains": [
326
+ "station-commerce.topolo.app",
327
+ "topolo-commerce-station-web.pages.dev"
328
+ ],
329
+ "routes": [],
330
+ "serviceId": null
331
+ }
332
+ ]
333
+ },
334
+ "crm": {
335
+ "id": "crm",
336
+ "appDir": "TopoloCRM",
337
+ "name": "topolo-crm",
338
+ "packageName": "topolo-crm",
339
+ "productionUrl": "https://crm.topolo.app",
340
+ "services": [
341
+ "crm"
342
+ ],
343
+ "deployTargets": [
344
+ {
345
+ "name": "topolo-crm-frontend",
346
+ "kind": "pages",
347
+ "apiUrl": null,
348
+ "domains": [],
349
+ "routes": [],
350
+ "serviceId": null
351
+ },
352
+ {
353
+ "name": "topolo-crm-worker",
354
+ "kind": "worker",
355
+ "apiUrl": "https://crm-api.topolo.app",
356
+ "domains": [],
357
+ "routes": [],
358
+ "serviceId": "crm"
359
+ }
360
+ ]
361
+ },
362
+ "developers": {
363
+ "id": "developers",
364
+ "appDir": "TopoloDevelopers",
365
+ "name": "topolo-developers",
366
+ "packageName": "topolo-developers",
367
+ "productionUrl": "https://developers.topolo.app",
368
+ "services": [],
369
+ "deployTargets": [
370
+ {
371
+ "name": "topolo-developers",
372
+ "kind": "pages",
373
+ "apiUrl": null,
374
+ "domains": [
375
+ "developers.topolo.app"
376
+ ],
377
+ "routes": [],
378
+ "serviceId": null
379
+ }
380
+ ]
381
+ },
382
+ "docs": {
383
+ "id": "docs",
384
+ "appDir": "TopoloDocs",
385
+ "name": "topolo-docs",
386
+ "packageName": "topolo-docs",
387
+ "productionUrl": "https://docs.topolo.app",
388
+ "services": [],
389
+ "deployTargets": [
390
+ {
391
+ "name": "topolo-docs",
392
+ "kind": "pages",
393
+ "apiUrl": null,
394
+ "domains": [
395
+ "docs.topolo.app"
396
+ ],
397
+ "routes": [],
398
+ "serviceId": null
399
+ }
400
+ ]
401
+ },
402
+ "feed": {
403
+ "id": "feed",
404
+ "appDir": "TopoloFeed",
405
+ "name": "TopoloFeed",
406
+ "packageName": null,
407
+ "productionUrl": null,
408
+ "services": [],
409
+ "deployTargets": [
410
+ {
411
+ "name": "topolo-feed-analytics-api",
412
+ "kind": "worker",
413
+ "apiUrl": null,
414
+ "domains": [],
415
+ "routes": [],
416
+ "serviceId": null
417
+ },
418
+ {
419
+ "name": "topolo-feed-api",
420
+ "kind": "worker",
421
+ "apiUrl": null,
422
+ "domains": [],
423
+ "routes": [],
424
+ "serviceId": null
425
+ }
426
+ ]
427
+ },
428
+ "forecast": {
429
+ "id": "forecast",
430
+ "appDir": "TopoloForecast",
431
+ "name": "forecast-cloud",
432
+ "packageName": "topolo-forecast",
433
+ "productionUrl": "https://forecast.topolo.app",
434
+ "services": [
435
+ "forecast"
436
+ ],
437
+ "deployTargets": [
438
+ {
439
+ "name": "forecast",
440
+ "kind": "pages",
441
+ "apiUrl": null,
442
+ "domains": [],
443
+ "routes": [],
444
+ "serviceId": null
445
+ },
446
+ {
447
+ "name": "forecast-worker-production",
448
+ "kind": "worker",
449
+ "apiUrl": "https://forecast-worker-production.topolo.workers.dev",
450
+ "domains": [],
451
+ "routes": [],
452
+ "serviceId": "forecast"
453
+ }
454
+ ]
455
+ },
456
+ "learn": {
457
+ "id": "learn",
458
+ "appDir": "TopoloLearn",
459
+ "name": "topololearn",
460
+ "packageName": "topolo-learn",
461
+ "productionUrl": "https://learn.topolo.app",
462
+ "services": [
463
+ "learn"
464
+ ],
465
+ "deployTargets": [
466
+ {
467
+ "name": "topololearn",
468
+ "kind": "pages",
469
+ "apiUrl": null,
470
+ "domains": [
471
+ "learn.topolo.app"
472
+ ],
473
+ "routes": [],
474
+ "serviceId": null
475
+ },
476
+ {
477
+ "name": "topololearn-api",
478
+ "kind": "worker",
479
+ "apiUrl": "https://topololearn-api.topolo.workers.dev",
480
+ "domains": [
481
+ "topololearn-api.topolo.workers.dev"
482
+ ],
483
+ "routes": [],
484
+ "serviceId": "learn"
485
+ }
486
+ ]
487
+ },
488
+ "mail": {
489
+ "id": "mail",
490
+ "appDir": "TopoloMail",
491
+ "name": "topolo-mail",
492
+ "packageName": "topolo-mail",
493
+ "productionUrl": "https://mail.topolo.app",
494
+ "services": [
495
+ "mail"
496
+ ],
497
+ "deployTargets": [
498
+ {
499
+ "name": "topolo-mail",
500
+ "kind": "workers",
501
+ "apiUrl": "https://mail.topolo.app",
502
+ "domains": [
503
+ "mail.topolo.app"
504
+ ],
505
+ "routes": [
506
+ "mail.topolo.app"
507
+ ],
508
+ "serviceId": "mail"
509
+ }
510
+ ]
511
+ },
512
+ "mcp": {
513
+ "id": "mcp",
514
+ "appDir": "TopoloMCP",
515
+ "name": "@topolo/mcp",
516
+ "packageName": "@topolo/mcp",
517
+ "productionUrl": null,
518
+ "services": [],
519
+ "deployTargets": []
520
+ },
521
+ "mdm": {
522
+ "id": "mdm",
523
+ "appDir": "TopoloMDM",
524
+ "name": "TopoloMDM",
525
+ "packageName": null,
526
+ "productionUrl": "https://mdm.topolo.app",
527
+ "services": [
528
+ "mdm"
529
+ ],
530
+ "deployTargets": [
531
+ {
532
+ "name": "topolo-mdm-api",
533
+ "kind": "worker",
534
+ "apiUrl": "https://topolo-mdm-api.topolo.app",
535
+ "domains": [
536
+ "topolo-mdm-api.topolo.app"
537
+ ],
538
+ "routes": [
539
+ "topolo-mdm-api.topolo.app"
540
+ ],
541
+ "serviceId": "mdm"
542
+ },
543
+ {
544
+ "name": "topolo-mdm-console",
545
+ "kind": "pages",
546
+ "apiUrl": null,
547
+ "domains": [
548
+ "mdm.topolo.app",
549
+ "topolo-mdm-console.pages.dev"
550
+ ],
551
+ "routes": [
552
+ "mdm.topolo.app"
553
+ ],
554
+ "serviceId": null
555
+ }
556
+ ]
557
+ },
558
+ "messaging": {
559
+ "id": "messaging",
560
+ "appDir": "TopoloMessaging",
561
+ "name": "topolo-messaging",
562
+ "packageName": "topolo-messaging",
563
+ "productionUrl": "https://messages.topolo.app",
564
+ "services": [
565
+ "messaging"
566
+ ],
567
+ "deployTargets": [
568
+ {
569
+ "name": "topolo-messaging",
570
+ "kind": "workers",
571
+ "apiUrl": "https://messages.topolo.app",
572
+ "domains": [
573
+ "messages.topolo.app"
574
+ ],
575
+ "routes": [],
576
+ "serviceId": "messaging"
577
+ },
578
+ {
579
+ "name": "topolo-messaging-dispatch",
580
+ "kind": "workers",
581
+ "apiUrl": null,
582
+ "domains": [],
583
+ "routes": [],
584
+ "serviceId": null
585
+ }
586
+ ]
587
+ },
588
+ "nexus": {
589
+ "id": "nexus",
590
+ "appDir": "TopoloNexus",
591
+ "name": "topolo-nexus",
592
+ "packageName": "topolo-nexus",
593
+ "productionUrl": "https://nexus.topolo.app",
594
+ "services": [
595
+ "nexus"
596
+ ],
597
+ "deployTargets": [
598
+ {
599
+ "name": "topolo-nexus-dashboard",
600
+ "kind": "pages",
601
+ "apiUrl": null,
602
+ "domains": [
603
+ "nexus.topolo.app",
604
+ "topolo-nexus-dashboard.pages.dev"
605
+ ],
606
+ "routes": [],
607
+ "serviceId": null
608
+ },
609
+ {
610
+ "name": "topolo-nexus-gateway",
611
+ "kind": "worker",
612
+ "apiUrl": "https://topolo-nexus-gateway.topolo.workers.dev",
613
+ "domains": [
614
+ "topolo-nexus-gateway.topolo.workers.dev"
615
+ ],
616
+ "routes": [],
617
+ "serviceId": "nexus"
618
+ }
619
+ ]
620
+ },
621
+ "one": {
622
+ "id": "one",
623
+ "appDir": "TopoloOne",
624
+ "name": "topolo-oneclick-sso",
625
+ "packageName": "topolo-oneclick-sso",
626
+ "productionUrl": "https://one.topolo.app",
627
+ "services": [
628
+ "one"
629
+ ],
630
+ "deployTargets": [
631
+ {
632
+ "name": "ai-chat-rag",
633
+ "kind": "worker",
634
+ "apiUrl": null,
635
+ "domains": [
636
+ "ai-chat-rag.topolo.workers.dev"
637
+ ],
638
+ "routes": [],
639
+ "serviceId": null
640
+ },
641
+ {
642
+ "name": "topoloone",
643
+ "kind": "pages",
644
+ "apiUrl": null,
645
+ "domains": [
646
+ "oneclick-dashboard.pages.dev"
647
+ ],
648
+ "routes": [],
649
+ "serviceId": null
650
+ },
651
+ {
652
+ "name": "topoloone-website",
653
+ "kind": "worker",
654
+ "apiUrl": null,
655
+ "domains": [
656
+ "one.topolo.io"
657
+ ],
658
+ "routes": [],
659
+ "serviceId": null
660
+ },
661
+ {
662
+ "name": "topoloone-worker",
663
+ "kind": "worker",
664
+ "apiUrl": "https://topoloone-worker.topolo.workers.dev",
665
+ "domains": [],
666
+ "routes": [
667
+ "one.topolo.app/*"
668
+ ],
669
+ "serviceId": "one"
670
+ }
671
+ ]
672
+ },
673
+ "pay": {
674
+ "id": "pay",
675
+ "appDir": "TopoloPay",
676
+ "name": "topolo-pay",
677
+ "packageName": "topolo-pay",
678
+ "productionUrl": "https://pay.topolo.app",
679
+ "services": [
680
+ "pay"
681
+ ],
682
+ "deployTargets": [
683
+ {
684
+ "name": "topolo-pay",
685
+ "kind": "worker",
686
+ "apiUrl": "https://topolo-pay.topolo.workers.dev",
687
+ "domains": [],
688
+ "routes": [],
689
+ "serviceId": "pay"
690
+ }
691
+ ]
692
+ },
693
+ "quro": {
694
+ "id": "quro",
695
+ "appDir": "TopoloQuro",
696
+ "name": "TopoloQuro",
697
+ "packageName": null,
698
+ "productionUrl": "https://quro.topolo.app",
699
+ "services": [
700
+ "quro.api",
701
+ "quro.redirect"
702
+ ],
703
+ "deployTargets": [
704
+ {
705
+ "name": "quro-api",
706
+ "kind": "worker",
707
+ "apiUrl": "https://api.ol0.me",
708
+ "domains": [],
709
+ "routes": [],
710
+ "serviceId": "quro.api"
711
+ },
712
+ {
713
+ "name": "quro-redirect-system",
714
+ "kind": "worker",
715
+ "apiUrl": "https://ol0.me",
716
+ "domains": [],
717
+ "routes": [
718
+ "ol0.me/*"
719
+ ],
720
+ "serviceId": "quro.redirect"
721
+ },
722
+ {
723
+ "name": "quro-ui",
724
+ "kind": "pages",
725
+ "apiUrl": null,
726
+ "domains": [],
727
+ "routes": [],
728
+ "serviceId": null
729
+ }
730
+ ]
731
+ },
732
+ "roadmapper": {
733
+ "id": "roadmapper",
734
+ "appDir": "TopoloRoadmapper",
735
+ "name": "topolo-roadmapper",
736
+ "packageName": "topolo-roadmapper",
737
+ "productionUrl": "https://roadmapper.topolo.app",
738
+ "services": [
739
+ "roadmapper"
740
+ ],
741
+ "deployTargets": [
742
+ {
743
+ "name": "roadmapper",
744
+ "kind": "pages",
745
+ "apiUrl": null,
746
+ "domains": [
747
+ "roadmapper.topolo.app"
748
+ ],
749
+ "routes": [],
750
+ "serviceId": null
751
+ },
752
+ {
753
+ "name": "topolo-production-roadmapper",
754
+ "kind": "worker",
755
+ "apiUrl": "https://roadmapper-api.topolo.app",
756
+ "domains": [
757
+ "roadmapper-api.topolo.app"
758
+ ],
759
+ "routes": [],
760
+ "serviceId": "roadmapper"
761
+ }
762
+ ]
763
+ },
764
+ "social_studio": {
765
+ "id": "social_studio",
766
+ "appDir": "TopoloSocialStudio",
767
+ "name": "topolo-social-studio",
768
+ "packageName": "topolo-social-studio",
769
+ "productionUrl": "https://studio.topolo.app",
770
+ "services": [
771
+ "social_studio"
772
+ ],
773
+ "deployTargets": [
774
+ {
775
+ "name": "topolo-social-studio",
776
+ "kind": "pages",
777
+ "apiUrl": null,
778
+ "domains": [],
779
+ "routes": [],
780
+ "serviceId": null
781
+ },
782
+ {
783
+ "name": "topolo-social-studio-api",
784
+ "kind": "worker",
785
+ "apiUrl": "https://topolo-social-studio-api.topolo.workers.dev",
786
+ "domains": [],
787
+ "routes": [],
788
+ "serviceId": "social_studio"
789
+ },
790
+ {
791
+ "name": "topolo-social-studio-queue",
792
+ "kind": "worker",
793
+ "apiUrl": null,
794
+ "domains": [],
795
+ "routes": [],
796
+ "serviceId": null
797
+ }
798
+ ]
799
+ },
800
+ "socialize": {
801
+ "id": "socialize",
802
+ "appDir": "TopoloSocialize",
803
+ "name": "socialize",
804
+ "packageName": "topolo-socialize",
805
+ "productionUrl": "https://socialize.topolo.app",
806
+ "services": [
807
+ "socialize"
808
+ ],
809
+ "deployTargets": [
810
+ {
811
+ "name": "socialize",
812
+ "kind": "pages",
813
+ "apiUrl": null,
814
+ "domains": [],
815
+ "routes": [],
816
+ "serviceId": null
817
+ },
818
+ {
819
+ "name": "socialize-prod-api",
820
+ "kind": "worker",
821
+ "apiUrl": "https://socialize-prod-api.topolo.workers.dev",
822
+ "domains": [],
823
+ "routes": [],
824
+ "serviceId": "socialize"
825
+ },
826
+ {
827
+ "name": "socialize-prod-scheduler",
828
+ "kind": "worker",
829
+ "apiUrl": null,
830
+ "domains": [],
831
+ "routes": [],
832
+ "serviceId": null
833
+ }
834
+ ]
835
+ },
836
+ "support": {
837
+ "id": "support",
838
+ "appDir": "TopoloSupport",
839
+ "name": "topolo-support",
840
+ "packageName": "topolo-support",
841
+ "productionUrl": "https://support.topolo.app",
842
+ "services": [
843
+ "support"
844
+ ],
845
+ "deployTargets": [
846
+ {
847
+ "name": "topolo-support",
848
+ "kind": "workers",
849
+ "apiUrl": "https://support.topolo.app",
850
+ "domains": [
851
+ "support.topolo.app"
852
+ ],
853
+ "routes": [
854
+ "support.topolo.app/*"
855
+ ],
856
+ "serviceId": "support"
857
+ }
858
+ ]
859
+ },
860
+ "web": {
861
+ "id": "web",
862
+ "appDir": "TopoloWeb",
863
+ "name": "topoloweb",
864
+ "packageName": "topolo-web",
865
+ "productionUrl": "https://web.topolo.app",
866
+ "services": [
867
+ "web"
868
+ ],
869
+ "deployTargets": [
870
+ {
871
+ "name": "topoloweb-api",
872
+ "kind": "worker",
873
+ "apiUrl": "https://web-api.topolo.app",
874
+ "domains": [
875
+ "web-api.topolo.app"
876
+ ],
877
+ "routes": [],
878
+ "serviceId": "web"
879
+ },
880
+ {
881
+ "name": "topoloweb-runtime",
882
+ "kind": "worker",
883
+ "apiUrl": "https://sites.topolo.app",
884
+ "domains": [
885
+ "sites.topolo.app"
886
+ ],
887
+ "routes": [],
888
+ "serviceId": null
889
+ },
890
+ {
891
+ "name": "topoloweb-studio",
892
+ "kind": "pages",
893
+ "apiUrl": null,
894
+ "domains": [
895
+ "web.topolo.app"
896
+ ],
897
+ "routes": [],
898
+ "serviceId": null
899
+ }
900
+ ]
901
+ }
902
+ };
903
+
904
+ // src/application-requirements.ts
905
+ var APPLICATION_REQUIREMENTS_VERSION = "2026-04-22.1";
906
+ var APPLICATION_REQUIREMENTS = [
907
+ {
908
+ id: "platform-metadata",
909
+ title: "Register the application in platform metadata",
910
+ summary: "Every app must have a stable application ID, CloudControl metadata for deployed surfaces, and package metadata where code is shipped.",
911
+ appliesTo: ["all"],
912
+ evidence: [
913
+ "topolo.cloudcontrol.json exists for every deployed app surface",
914
+ "package.json names the package or app when the repo ships code",
915
+ "The SDK application catalog exposes the app through topolo apps and MCP discovery"
916
+ ],
917
+ implementation: [
918
+ "Add the app to the SDK application catalog generator before exposing it to agents",
919
+ "Keep production URLs, Worker names, Pages projects, routes, domains, and bindings current in CloudControl metadata",
920
+ "Do not leave a new Topolo* app directory without an explicit application ID"
921
+ ]
922
+ },
923
+ {
924
+ id: "canonical-docs",
925
+ title: "Update canonical docs with the code change",
926
+ summary: "TopoloDocs is the source of truth for application behavior, ownership, deployment shape, auth boundaries, and operations.",
927
+ appliesTo: ["all"],
928
+ evidence: [
929
+ "Matching system registry entry exists in TopoloDocs",
930
+ "Internal handbook coverage exists for the system",
931
+ "npm run validate passes in TopoloDocs when docs are touched"
932
+ ],
933
+ implementation: [
934
+ "Read the matching TopoloDocs system entry before coding",
935
+ "Update docs in the same change when behavior, API, auth, data ownership, deployment, or operations change",
936
+ "Update last_verified dates on touched canonical pages"
937
+ ]
938
+ },
939
+ {
940
+ id: "shared-auth-boundary",
941
+ title: "Use the shared Topolo auth boundary",
942
+ summary: "Applications must derive identity, organization, scopes, and service entitlement from TopoloAuth rather than inventing parallel auth state.",
943
+ appliesTo: ["browser", "api", "tooling", "agent_surface"],
944
+ evidence: [
945
+ "@topolo/auth-client or @topolo/auth-middleware is used where applicable",
946
+ "No public command, tool, or SDK method accepts orgId",
947
+ "Service slug and Auth service registration are documented for protected services"
948
+ ],
949
+ implementation: [
950
+ "Use shared auth packages instead of copying token parsing or browser storage flows",
951
+ "Derive organization from the credential on every request",
952
+ "Route OAuth, refresh, logout, and SSO paths according to the shared Auth contract"
953
+ ]
954
+ },
955
+ {
956
+ id: "shared-shell-and-launcher",
957
+ title: "Use the shared shell, launcher, and account menu",
958
+ summary: "Browser applications should feel like one platform and should not create isolated navigation or account surfaces.",
959
+ appliesTo: ["browser"],
960
+ evidence: [
961
+ "@topolo/ui-kit is used for the platform shell where the app has authenticated UI",
962
+ "The shared launcher/app switcher is reachable from authenticated app chrome",
963
+ "Account menu and sign-out behavior use the shared platform affordance"
964
+ ],
965
+ implementation: [
966
+ "Use TopoloShell or the current shared shell contract for authenticated app layouts",
967
+ "Use shared design tokens and platform UI primitives before creating local equivalents",
968
+ "Keep mobile and desktop shell behavior aligned with the platform UI kit"
969
+ ]
970
+ },
971
+ {
972
+ id: "service-registration-and-scopes",
973
+ title: "Register protected APIs as platform services",
974
+ summary: "Callable app APIs need a stable service ID, service slug, permissions, role bundles, and API-key scopes before agents or users rely on them.",
975
+ appliesTo: ["api"],
976
+ evidence: [
977
+ "Auth service catalog contains the service ID and slug",
978
+ "Permissions, role bundles, and API-key scopes exist for the service",
979
+ "SDK, CLI, and MCP service discovery include the callable production API"
980
+ ],
981
+ implementation: [
982
+ "Add production Worker api_url metadata before adding an SDK service ID",
983
+ "Expose stable service IDs through DEFAULT_SERVICE_URLS",
984
+ "Keep typed SDK/CLI/MCP surfaces in sync when an API contract stabilizes"
985
+ ]
986
+ },
987
+ {
988
+ id: "organization-scoped-data",
989
+ title: "Keep application data organization-scoped",
990
+ summary: "Protected data access must be scoped by the authenticated organization at the backend boundary, not by client-provided hints.",
991
+ appliesTo: ["api"],
992
+ evidence: [
993
+ "Backend request handlers derive org membership from credential validation",
994
+ "Queries and Durable Object keys include the authenticated organization boundary where data is tenant-owned",
995
+ "MCP and CLI inputs do not include orgId overrides"
996
+ ],
997
+ implementation: [
998
+ "Reject or ignore organization hints supplied by clients",
999
+ "Bind SQL, KV, R2, queue, and Durable Object access to the authenticated organization",
1000
+ "Document service-local exceptions explicitly in the system security assurance record"
1001
+ ]
1002
+ },
1003
+ {
1004
+ id: "cloudflare-deployment-contract",
1005
+ title: "Keep Cloudflare deployment metadata complete",
1006
+ summary: "Workers, Pages, bindings, routes, env vars, queues, cron triggers, and deployment commands must be discoverable through CloudControl metadata.",
1007
+ appliesTo: ["browser", "api"],
1008
+ evidence: [
1009
+ "topolo.cloudcontrol.json lists production deploy targets and URLs",
1010
+ "Wrangler/Pages configuration matches CloudControl metadata",
1011
+ "Secrets and environment variables are not committed"
1012
+ ],
1013
+ implementation: [
1014
+ "Update CloudControl metadata whenever deployment topology changes",
1015
+ "Prefer Cloudflare-native runtime surfaces for new Topolo app infrastructure",
1016
+ "Keep Worker bindings and Pages domains explicit enough for agents to inspect before deploying"
1017
+ ]
1018
+ },
1019
+ {
1020
+ id: "agent-and-operator-surfaces",
1021
+ title: "Expose agent-safe operations through SDK, CLI, and MCP",
1022
+ summary: "Agent-accessible functionality should be discoverable, scope-gated, and write-confirmed instead of hidden behind ad hoc HTTP calls.",
1023
+ appliesTo: ["api", "tooling", "agent_surface"],
1024
+ evidence: [
1025
+ "Read operations have typed SDK/CLI/MCP surfaces once their contract stabilizes",
1026
+ "Mutating generic calls require --confirm or confirm:true",
1027
+ "MCP tools never accept orgId and advertise only appropriate scope-gated tools"
1028
+ ],
1029
+ implementation: [
1030
+ "Add SDK types first, then CLI commands and MCP tools for durable workflows",
1031
+ "Use generic API passthrough only as a temporary escape hatch",
1032
+ "Keep command output JSON-stable for agents and human-readable with --no-json"
1033
+ ]
1034
+ },
1035
+ {
1036
+ id: "observability-and-audit",
1037
+ title: "Emit platform audit and debugging signals",
1038
+ summary: "Requests, agent actions, and operational workflows need traceable IDs, client labels, and useful failure evidence.",
1039
+ appliesTo: ["api", "tooling", "agent_surface"],
1040
+ evidence: [
1041
+ "Requests carry X-Topolo-Client and X-Topolo-Request-Id where the SDK is involved",
1042
+ "Agent-originated calls can include X-Topolo-Agent",
1043
+ "Failure modes are documented with request IDs or deployment/log lookup paths"
1044
+ ],
1045
+ implementation: [
1046
+ "Use TopoloClient for platform API calls rather than raw fetch where practical",
1047
+ "Keep logs free of secrets and tokens",
1048
+ "Document live smoke commands and request-id correlation in canonical docs"
1049
+ ]
1050
+ },
1051
+ {
1052
+ id: "verification-gates",
1053
+ title: "Ship with build, test, docs, and smoke verification",
1054
+ summary: "A Topolo app change is not complete until the relevant code checks and docs checks have been run or explicitly reported as blocked.",
1055
+ appliesTo: ["all"],
1056
+ evidence: [
1057
+ "Relevant package build/typecheck/test commands pass",
1058
+ "TopoloDocs validation passes when docs are touched",
1059
+ "Live or local smoke evidence is captured for user-visible or API behavior"
1060
+ ],
1061
+ implementation: [
1062
+ "Prefer existing package scripts before adding new tooling",
1063
+ "Run app-specific checks and shared docs validation for behavior changes",
1064
+ "Report any skipped verification with the blocker and residual risk"
1065
+ ]
1066
+ }
1067
+ ];
1068
+ function applicationRequirementScopes(application) {
1069
+ const scopes = /* @__PURE__ */ new Set(["all"]);
1070
+ const hasBrowserSurface = Boolean(application.productionUrl) || application.deployTargets.some((target) => target.kind === "pages");
1071
+ const hasApiSurface = application.services.length > 0 || application.deployTargets.some((target) => Boolean(target.apiUrl));
1072
+ if (hasBrowserSurface) scopes.add("browser");
1073
+ if (hasApiSurface) scopes.add("api");
1074
+ if (application.id === "cli" || application.id === "mcp" || application.id === "cloudcontrol") {
1075
+ scopes.add("tooling");
1076
+ }
1077
+ if (application.id === "cli" || application.id === "mcp" || hasApiSurface) {
1078
+ scopes.add("agent_surface");
1079
+ }
1080
+ return Array.from(scopes);
1081
+ }
1082
+ function requirementsForApplication(applicationOrId) {
1083
+ const application = typeof applicationOrId === "string" ? APPLICATIONS[applicationOrId] : applicationOrId;
1084
+ const scopes = new Set(applicationRequirementScopes(application));
1085
+ return APPLICATION_REQUIREMENTS.filter(
1086
+ (requirement) => requirement.appliesTo.some((scope) => scopes.has(scope))
1087
+ );
1088
+ }
1089
+ function auditApplicationRequirements(applicationOrId) {
1090
+ const application = typeof applicationOrId === "string" ? APPLICATIONS[applicationOrId] : applicationOrId;
1091
+ const scopes = applicationRequirementScopes(application);
1092
+ const findings = requirementsForApplication(application).map(
1093
+ (requirement) => evaluateRequirement(application, requirement)
1094
+ );
1095
+ return {
1096
+ version: APPLICATION_REQUIREMENTS_VERSION,
1097
+ application,
1098
+ scopes,
1099
+ score: scoreFindings(findings),
1100
+ findings
1101
+ };
1102
+ }
1103
+ function auditAllApplicationRequirements(applicationIds = Object.keys(APPLICATIONS).sort()) {
1104
+ const applications = applicationIds.map(
1105
+ (applicationId) => auditApplicationRequirements(applicationId)
1106
+ );
1107
+ const migrationQueue = applications.flatMap(
1108
+ (audit) => audit.findings.filter((finding2) => finding2.status !== "met").map((finding2) => ({
1109
+ applicationId: audit.application.id,
1110
+ applicationName: audit.application.name,
1111
+ requirementId: finding2.requirementId,
1112
+ title: finding2.title,
1113
+ status: finding2.status,
1114
+ reason: finding2.reason,
1115
+ nextActions: finding2.nextActions
1116
+ }))
1117
+ ).sort((a, b) => {
1118
+ const statusOrder = statusRank(a.status) - statusRank(b.status);
1119
+ if (statusOrder !== 0) return statusOrder;
1120
+ const appOrder = a.applicationId.localeCompare(b.applicationId);
1121
+ if (appOrder !== 0) return appOrder;
1122
+ return a.requirementId.localeCompare(b.requirementId);
1123
+ });
1124
+ return {
1125
+ version: APPLICATION_REQUIREMENTS_VERSION,
1126
+ applications,
1127
+ migrationQueue
1128
+ };
1129
+ }
1130
+ function evaluateRequirement(application, requirement) {
1131
+ const evidence = [];
1132
+ switch (requirement.id) {
1133
+ case "platform-metadata": {
1134
+ if (application.packageName) evidence.push(`package=${application.packageName}`);
1135
+ if (application.productionUrl) evidence.push(`productionUrl=${application.productionUrl}`);
1136
+ if (application.deployTargets.length > 0) {
1137
+ evidence.push(`deployTargets=${application.deployTargets.length}`);
1138
+ }
1139
+ if (application.services.length > 0) {
1140
+ evidence.push(`services=${application.services.join(",")}`);
1141
+ }
1142
+ if (evidence.length === 0) {
1143
+ return finding(requirement, "missing", "No package, production URL, deploy target, or service metadata is available.", evidence);
1144
+ }
1145
+ return finding(requirement, "met", "Catalog metadata exists for this application.", evidence);
1146
+ }
1147
+ case "canonical-docs":
1148
+ return finding(
1149
+ requirement,
1150
+ "needs_review",
1151
+ "Catalog metadata cannot verify matching TopoloDocs system and handbook coverage.",
1152
+ evidence
1153
+ );
1154
+ case "shared-auth-boundary":
1155
+ return finding(
1156
+ requirement,
1157
+ "needs_review",
1158
+ "Catalog metadata cannot verify that implementation uses shared Topolo auth packages and derives org from credentials.",
1159
+ evidence
1160
+ );
1161
+ case "shared-shell-and-launcher":
1162
+ return finding(
1163
+ requirement,
1164
+ "needs_review",
1165
+ "Catalog metadata cannot verify shared shell, launcher, and account menu adoption.",
1166
+ evidence
1167
+ );
1168
+ case "service-registration-and-scopes": {
1169
+ if (application.services.length > 0) {
1170
+ evidence.push(`services=${application.services.join(",")}`);
1171
+ return finding(
1172
+ requirement,
1173
+ "partial",
1174
+ "SDK service discovery exists, but Auth catalog permissions, role bundles, and API-key scopes still need confirmation.",
1175
+ evidence
1176
+ );
1177
+ }
1178
+ return finding(requirement, "missing", "No SDK service ID is registered for this callable API surface.", evidence);
1179
+ }
1180
+ case "organization-scoped-data":
1181
+ return finding(
1182
+ requirement,
1183
+ "needs_review",
1184
+ "Catalog metadata cannot verify backend tenant filters, storage keys, or Durable Object boundaries.",
1185
+ evidence
1186
+ );
1187
+ case "cloudflare-deployment-contract": {
1188
+ if (application.deployTargets.length === 0) {
1189
+ return finding(requirement, "missing", "No CloudControl deploy targets are registered.", evidence);
1190
+ }
1191
+ evidence.push(`deployTargets=${application.deployTargets.length}`);
1192
+ if (application.productionUrl) evidence.push(`productionUrl=${application.productionUrl}`);
1193
+ return finding(requirement, "met", "CloudControl deploy target metadata is present.", evidence);
1194
+ }
1195
+ case "agent-and-operator-surfaces": {
1196
+ if (application.services.length > 0) {
1197
+ evidence.push(`services=${application.services.join(",")}`);
1198
+ return finding(requirement, "partial", "SDK service discovery exists; typed SDK/CLI/MCP workflow coverage should be checked as APIs stabilize.", evidence);
1199
+ }
1200
+ if (application.id === "cli" || application.id === "mcp" || application.id === "cloudcontrol") {
1201
+ evidence.push(`tooling=${application.id}`);
1202
+ return finding(requirement, "met", "This application is itself an agent/operator surface.", evidence);
1203
+ }
1204
+ return finding(requirement, "missing", "No SDK service or tooling surface is registered.", evidence);
1205
+ }
1206
+ case "observability-and-audit":
1207
+ return finding(
1208
+ requirement,
1209
+ "needs_review",
1210
+ "Catalog metadata cannot verify runtime request IDs, client labels, or log redaction.",
1211
+ evidence
1212
+ );
1213
+ case "verification-gates":
1214
+ return finding(
1215
+ requirement,
1216
+ "needs_review",
1217
+ "Catalog metadata cannot verify package checks, docs validation, or smoke evidence.",
1218
+ evidence
1219
+ );
1220
+ default:
1221
+ return finding(requirement, "needs_review", "No automated evaluator exists for this requirement yet.", evidence);
1222
+ }
1223
+ }
1224
+ function finding(requirement, status, reason, evidence) {
1225
+ return {
1226
+ requirementId: requirement.id,
1227
+ title: requirement.title,
1228
+ status,
1229
+ reason,
1230
+ evidence,
1231
+ nextActions: status === "met" ? [] : requirement.implementation
1232
+ };
1233
+ }
1234
+ function scoreFindings(findings) {
1235
+ const met = findings.filter((finding2) => finding2.status === "met").length;
1236
+ const partial = findings.filter((finding2) => finding2.status === "partial").length;
1237
+ const missing = findings.filter((finding2) => finding2.status === "missing").length;
1238
+ const needsReview = findings.filter((finding2) => finding2.status === "needs_review").length;
1239
+ const total = findings.length;
1240
+ const weighted = met + partial * 0.5;
1241
+ return {
1242
+ met,
1243
+ partial,
1244
+ missing,
1245
+ needsReview,
1246
+ total,
1247
+ percent: total === 0 ? 100 : Math.round(weighted / total * 100)
1248
+ };
1249
+ }
1250
+ function statusRank(status) {
1251
+ if (status === "missing") return 0;
1252
+ if (status === "partial") return 1;
1253
+ return 2;
1254
+ }
1255
+
1256
+ // src/services.ts
1257
+ var DEFAULT_SERVICE_URLS = SERVICES;
67
1258
  function resolveServiceUrl(service, overrides) {
68
1259
  const override = overrides?.[service];
69
1260
  if (override) return override;
70
- const envKey = `TOPOLO_SERVICE_URL_${service.toUpperCase()}`;
1261
+ const envKey = `TOPOLO_SERVICE_URL_${service.replace(/\./g, "_").toUpperCase()}`;
71
1262
  const envValue = typeof process !== "undefined" ? process.env?.[envKey] : void 0;
72
1263
  if (envValue) return envValue;
73
1264
  return DEFAULT_SERVICE_URLS[service];
@@ -420,6 +1611,9 @@ function createTopolo(options) {
420
1611
  };
421
1612
  }
422
1613
  export {
1614
+ APPLICATIONS,
1615
+ APPLICATION_REQUIREMENTS,
1616
+ APPLICATION_REQUIREMENTS_VERSION,
423
1617
  CrmModule,
424
1618
  DEFAULT_SERVICE_URLS,
425
1619
  IdentityModule,
@@ -430,6 +1624,10 @@ export {
430
1624
  TopoloOAuth,
431
1625
  TopoloPermissionError,
432
1626
  TopoloSdkError,
1627
+ applicationRequirementScopes,
1628
+ auditAllApplicationRequirements,
1629
+ auditApplicationRequirements,
433
1630
  createTopolo,
1631
+ requirementsForApplication,
434
1632
  resolveServiceUrl
435
1633
  };