@topolo/sdk 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -4
- package/dist/index.cjs +482 -221
- package/dist/index.d.cts +466 -271
- package/dist/index.d.ts +466 -271
- package/dist/index.js +482 -221
- package/package.json +1 -1
- package/src/application-requirements.ts +16 -5
- package/src/applications.generated.ts +349 -171
- package/src/client.test.ts +170 -11
- package/src/client.ts +165 -64
- package/src/modules/p2p.test.ts +25 -2
- package/src/services.generated.ts +4 -2
- package/src/services.test.ts +11 -5
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,9 +84,10 @@ 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
|
-
|
|
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",
|
|
@@ -100,6 +101,7 @@ var SERVICES = {
|
|
|
100
101
|
socialize: "https://socialize-api.topolo.app",
|
|
101
102
|
spaces: "https://spaces.topolo.app",
|
|
102
103
|
status: "https://status.topolo.app",
|
|
104
|
+
success: "https://success.topolo.app",
|
|
103
105
|
support: "https://support.topolo.app",
|
|
104
106
|
survey: "https://survey.topolo.app",
|
|
105
107
|
voice: "https://voice.topolo.app",
|
|
@@ -118,13 +120,21 @@ var APPLICATIONS = {
|
|
|
118
120
|
"deployTargets": [
|
|
119
121
|
{
|
|
120
122
|
"name": "topolo-admin",
|
|
121
|
-
"kind": "
|
|
122
|
-
"apiUrl":
|
|
123
|
+
"kind": "worker",
|
|
124
|
+
"apiUrl": "https://admin.topolo.app",
|
|
123
125
|
"domains": [
|
|
124
126
|
"admin.topolo.app"
|
|
125
127
|
],
|
|
126
128
|
"routes": [],
|
|
127
129
|
"serviceId": null
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "topolo-admin-api",
|
|
133
|
+
"kind": "worker",
|
|
134
|
+
"apiUrl": null,
|
|
135
|
+
"domains": [],
|
|
136
|
+
"routes": [],
|
|
137
|
+
"serviceId": null
|
|
128
138
|
}
|
|
129
139
|
]
|
|
130
140
|
},
|
|
@@ -141,7 +151,7 @@ var APPLICATIONS = {
|
|
|
141
151
|
{
|
|
142
152
|
"name": "topolo-agent",
|
|
143
153
|
"kind": "worker",
|
|
144
|
-
"apiUrl":
|
|
154
|
+
"apiUrl": "https://agent.topolo.app",
|
|
145
155
|
"domains": [
|
|
146
156
|
"agent.topolo.app"
|
|
147
157
|
],
|
|
@@ -149,7 +159,7 @@ var APPLICATIONS = {
|
|
|
149
159
|
"serviceId": null
|
|
150
160
|
},
|
|
151
161
|
{
|
|
152
|
-
"name": "topolo-agent-
|
|
162
|
+
"name": "topolo-agent-api",
|
|
153
163
|
"kind": "worker",
|
|
154
164
|
"apiUrl": "https://agent-api.topolo.app",
|
|
155
165
|
"domains": [
|
|
@@ -189,16 +199,20 @@ var APPLICATIONS = {
|
|
|
189
199
|
"appDir": "TopoloBackup",
|
|
190
200
|
"name": "topolo-backup",
|
|
191
201
|
"packageName": "topolo-backup",
|
|
192
|
-
"productionUrl":
|
|
193
|
-
"services": [
|
|
202
|
+
"productionUrl": "https://backup.topolo.app",
|
|
203
|
+
"services": [
|
|
204
|
+
"backup"
|
|
205
|
+
],
|
|
194
206
|
"deployTargets": [
|
|
195
207
|
{
|
|
196
208
|
"name": "topolo-backup",
|
|
197
209
|
"kind": "worker",
|
|
198
|
-
"apiUrl":
|
|
199
|
-
"domains": [
|
|
210
|
+
"apiUrl": "https://backup.topolo.app",
|
|
211
|
+
"domains": [
|
|
212
|
+
"backup.topolo.app"
|
|
213
|
+
],
|
|
200
214
|
"routes": [],
|
|
201
|
-
"serviceId":
|
|
215
|
+
"serviceId": "backup"
|
|
202
216
|
}
|
|
203
217
|
]
|
|
204
218
|
},
|
|
@@ -219,10 +233,16 @@ var APPLICATIONS = {
|
|
|
219
233
|
"domains": [
|
|
220
234
|
"books.topolo.app"
|
|
221
235
|
],
|
|
222
|
-
"routes": [
|
|
223
|
-
"books.topolo.app"
|
|
224
|
-
],
|
|
236
|
+
"routes": [],
|
|
225
237
|
"serviceId": "books"
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"name": "topolo-books-api",
|
|
241
|
+
"kind": "worker",
|
|
242
|
+
"apiUrl": null,
|
|
243
|
+
"domains": [],
|
|
244
|
+
"routes": [],
|
|
245
|
+
"serviceId": null
|
|
226
246
|
}
|
|
227
247
|
]
|
|
228
248
|
},
|
|
@@ -243,9 +263,7 @@ var APPLICATIONS = {
|
|
|
243
263
|
"domains": [
|
|
244
264
|
"bugfix.topolo.app"
|
|
245
265
|
],
|
|
246
|
-
"routes": [
|
|
247
|
-
"bugfix.topolo.app"
|
|
248
|
-
],
|
|
266
|
+
"routes": [],
|
|
249
267
|
"serviceId": "bugfix"
|
|
250
268
|
}
|
|
251
269
|
]
|
|
@@ -262,8 +280,8 @@ var APPLICATIONS = {
|
|
|
262
280
|
"deployTargets": [
|
|
263
281
|
{
|
|
264
282
|
"name": "topolo-bytes",
|
|
265
|
-
"kind": "
|
|
266
|
-
"apiUrl":
|
|
283
|
+
"kind": "worker",
|
|
284
|
+
"apiUrl": "https://bytes.topolo.app",
|
|
267
285
|
"domains": [
|
|
268
286
|
"bytes.topolo.app"
|
|
269
287
|
],
|
|
@@ -299,10 +317,16 @@ var APPLICATIONS = {
|
|
|
299
317
|
"domains": [
|
|
300
318
|
"calendar.topolo.app"
|
|
301
319
|
],
|
|
302
|
-
"routes": [
|
|
303
|
-
"calendar.topolo.app"
|
|
304
|
-
],
|
|
320
|
+
"routes": [],
|
|
305
321
|
"serviceId": "calendar"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "topolo-calendar-api",
|
|
325
|
+
"kind": "worker",
|
|
326
|
+
"apiUrl": null,
|
|
327
|
+
"domains": [],
|
|
328
|
+
"routes": [],
|
|
329
|
+
"serviceId": null
|
|
306
330
|
}
|
|
307
331
|
]
|
|
308
332
|
},
|
|
@@ -345,22 +369,19 @@ var APPLICATIONS = {
|
|
|
345
369
|
"domains": [
|
|
346
370
|
"chat.topolo.app"
|
|
347
371
|
],
|
|
348
|
-
"routes": [
|
|
349
|
-
"chat.topolo.app"
|
|
350
|
-
],
|
|
372
|
+
"routes": [],
|
|
351
373
|
"serviceId": "chat"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"name": "topolo-chat-api",
|
|
377
|
+
"kind": "worker",
|
|
378
|
+
"apiUrl": null,
|
|
379
|
+
"domains": [],
|
|
380
|
+
"routes": [],
|
|
381
|
+
"serviceId": null
|
|
352
382
|
}
|
|
353
383
|
]
|
|
354
384
|
},
|
|
355
|
-
"cloudcontrol": {
|
|
356
|
-
"id": "cloudcontrol",
|
|
357
|
-
"appDir": "TopoloCloudControl",
|
|
358
|
-
"name": "cloudcontrol",
|
|
359
|
-
"packageName": "topolo-cloudcontrol",
|
|
360
|
-
"productionUrl": null,
|
|
361
|
-
"services": [],
|
|
362
|
-
"deployTargets": []
|
|
363
|
-
},
|
|
364
385
|
"commerce": {
|
|
365
386
|
"id": "commerce",
|
|
366
387
|
"appDir": "TopoloCommerce",
|
|
@@ -383,8 +404,8 @@ var APPLICATIONS = {
|
|
|
383
404
|
},
|
|
384
405
|
{
|
|
385
406
|
"name": "topolo-commerce-guest-web",
|
|
386
|
-
"kind": "
|
|
387
|
-
"apiUrl":
|
|
407
|
+
"kind": "worker",
|
|
408
|
+
"apiUrl": "https://guest.topolo.app",
|
|
388
409
|
"domains": [
|
|
389
410
|
"guest.topolo.app"
|
|
390
411
|
],
|
|
@@ -393,8 +414,8 @@ var APPLICATIONS = {
|
|
|
393
414
|
},
|
|
394
415
|
{
|
|
395
416
|
"name": "topolo-commerce-ops-web",
|
|
396
|
-
"kind": "
|
|
397
|
-
"apiUrl":
|
|
417
|
+
"kind": "worker",
|
|
418
|
+
"apiUrl": "https://commerce.topolo.app",
|
|
398
419
|
"domains": [
|
|
399
420
|
"commerce.topolo.app"
|
|
400
421
|
],
|
|
@@ -403,8 +424,8 @@ var APPLICATIONS = {
|
|
|
403
424
|
},
|
|
404
425
|
{
|
|
405
426
|
"name": "topolo-commerce-station-web",
|
|
406
|
-
"kind": "
|
|
407
|
-
"apiUrl":
|
|
427
|
+
"kind": "worker",
|
|
428
|
+
"apiUrl": "https://station-commerce.topolo.app",
|
|
408
429
|
"domains": [
|
|
409
430
|
"station-commerce.topolo.app"
|
|
410
431
|
],
|
|
@@ -430,10 +451,16 @@ var APPLICATIONS = {
|
|
|
430
451
|
"domains": [
|
|
431
452
|
"compose.topolo.app"
|
|
432
453
|
],
|
|
433
|
-
"routes": [
|
|
434
|
-
"compose.topolo.app"
|
|
435
|
-
],
|
|
454
|
+
"routes": [],
|
|
436
455
|
"serviceId": "compose"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"name": "topolo-compose-api",
|
|
459
|
+
"kind": "worker",
|
|
460
|
+
"apiUrl": null,
|
|
461
|
+
"domains": [],
|
|
462
|
+
"routes": [],
|
|
463
|
+
"serviceId": null
|
|
437
464
|
}
|
|
438
465
|
]
|
|
439
466
|
},
|
|
@@ -454,10 +481,16 @@ var APPLICATIONS = {
|
|
|
454
481
|
"domains": [
|
|
455
482
|
"consent.topolo.app"
|
|
456
483
|
],
|
|
457
|
-
"routes": [
|
|
458
|
-
"consent.topolo.app"
|
|
459
|
-
],
|
|
484
|
+
"routes": [],
|
|
460
485
|
"serviceId": "consent"
|
|
486
|
+
},
|
|
487
|
+
{
|
|
488
|
+
"name": "topolo-consent-api",
|
|
489
|
+
"kind": "worker",
|
|
490
|
+
"apiUrl": null,
|
|
491
|
+
"domains": [],
|
|
492
|
+
"routes": [],
|
|
493
|
+
"serviceId": null
|
|
461
494
|
}
|
|
462
495
|
]
|
|
463
496
|
},
|
|
@@ -484,7 +517,7 @@ var APPLICATIONS = {
|
|
|
484
517
|
{
|
|
485
518
|
"name": "topolo-crm-app",
|
|
486
519
|
"kind": "worker",
|
|
487
|
-
"apiUrl":
|
|
520
|
+
"apiUrl": "https://crm.topolo.app",
|
|
488
521
|
"domains": [
|
|
489
522
|
"crm.topolo.app"
|
|
490
523
|
],
|
|
@@ -493,30 +526,6 @@ var APPLICATIONS = {
|
|
|
493
526
|
}
|
|
494
527
|
]
|
|
495
528
|
},
|
|
496
|
-
"customer_success": {
|
|
497
|
-
"id": "customer_success",
|
|
498
|
-
"appDir": "TopoloSuccess",
|
|
499
|
-
"name": "topolo-success",
|
|
500
|
-
"packageName": "topolo-success",
|
|
501
|
-
"productionUrl": "https://success.topolo.app",
|
|
502
|
-
"services": [
|
|
503
|
-
"customer_success"
|
|
504
|
-
],
|
|
505
|
-
"deployTargets": [
|
|
506
|
-
{
|
|
507
|
-
"name": "topolo-success",
|
|
508
|
-
"kind": "worker",
|
|
509
|
-
"apiUrl": "https://success.topolo.app",
|
|
510
|
-
"domains": [
|
|
511
|
-
"success.topolo.app"
|
|
512
|
-
],
|
|
513
|
-
"routes": [
|
|
514
|
-
"success.topolo.app"
|
|
515
|
-
],
|
|
516
|
-
"serviceId": "customer_success"
|
|
517
|
-
}
|
|
518
|
-
]
|
|
519
|
-
},
|
|
520
529
|
"developers": {
|
|
521
530
|
"id": "developers",
|
|
522
531
|
"appDir": "TopoloDevelopers",
|
|
@@ -544,6 +553,14 @@ var APPLICATIONS = {
|
|
|
544
553
|
],
|
|
545
554
|
"routes": [],
|
|
546
555
|
"serviceId": "developers"
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
"name": "topolo-developers-api",
|
|
559
|
+
"kind": "worker",
|
|
560
|
+
"apiUrl": null,
|
|
561
|
+
"domains": [],
|
|
562
|
+
"routes": [],
|
|
563
|
+
"serviceId": null
|
|
547
564
|
}
|
|
548
565
|
]
|
|
549
566
|
},
|
|
@@ -564,10 +581,16 @@ var APPLICATIONS = {
|
|
|
564
581
|
"domains": [
|
|
565
582
|
"director.topolo.app"
|
|
566
583
|
],
|
|
567
|
-
"routes": [
|
|
568
|
-
"director.topolo.app"
|
|
569
|
-
],
|
|
584
|
+
"routes": [],
|
|
570
585
|
"serviceId": "director"
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"name": "topolo-director-api",
|
|
589
|
+
"kind": "worker",
|
|
590
|
+
"apiUrl": null,
|
|
591
|
+
"domains": [],
|
|
592
|
+
"routes": [],
|
|
593
|
+
"serviceId": null
|
|
571
594
|
}
|
|
572
595
|
]
|
|
573
596
|
},
|
|
@@ -581,13 +604,21 @@ var APPLICATIONS = {
|
|
|
581
604
|
"deployTargets": [
|
|
582
605
|
{
|
|
583
606
|
"name": "topolo-docs",
|
|
584
|
-
"kind": "
|
|
585
|
-
"apiUrl":
|
|
607
|
+
"kind": "worker",
|
|
608
|
+
"apiUrl": "https://docs.topolo.app",
|
|
586
609
|
"domains": [
|
|
587
610
|
"docs.topolo.app"
|
|
588
611
|
],
|
|
589
612
|
"routes": [],
|
|
590
613
|
"serviceId": null
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "topolo-docs-api",
|
|
617
|
+
"kind": "worker",
|
|
618
|
+
"apiUrl": null,
|
|
619
|
+
"domains": [],
|
|
620
|
+
"routes": [],
|
|
621
|
+
"serviceId": null
|
|
591
622
|
}
|
|
592
623
|
]
|
|
593
624
|
},
|
|
@@ -596,7 +627,7 @@ var APPLICATIONS = {
|
|
|
596
627
|
"appDir": "TopoloFeed",
|
|
597
628
|
"name": "TopoloFeed",
|
|
598
629
|
"packageName": "topolo-feed",
|
|
599
|
-
"productionUrl": "https://feed
|
|
630
|
+
"productionUrl": "https://feed.topolo.app",
|
|
600
631
|
"services": [
|
|
601
632
|
"feed"
|
|
602
633
|
],
|
|
@@ -608,9 +639,7 @@ var APPLICATIONS = {
|
|
|
608
639
|
"domains": [
|
|
609
640
|
"feed-analytics-api.topolo.app"
|
|
610
641
|
],
|
|
611
|
-
"routes": [
|
|
612
|
-
"feed-analytics-api.topolo.app"
|
|
613
|
-
],
|
|
642
|
+
"routes": [],
|
|
614
643
|
"serviceId": null
|
|
615
644
|
},
|
|
616
645
|
{
|
|
@@ -620,10 +649,18 @@ var APPLICATIONS = {
|
|
|
620
649
|
"domains": [
|
|
621
650
|
"feed-api.topolo.app"
|
|
622
651
|
],
|
|
623
|
-
"routes": [
|
|
624
|
-
"feed-api.topolo.app"
|
|
625
|
-
],
|
|
652
|
+
"routes": [],
|
|
626
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
|
|
627
664
|
}
|
|
628
665
|
]
|
|
629
666
|
},
|
|
@@ -644,17 +681,23 @@ var APPLICATIONS = {
|
|
|
644
681
|
"domains": [
|
|
645
682
|
"flow.topolo.app"
|
|
646
683
|
],
|
|
647
|
-
"routes": [
|
|
648
|
-
"flow.topolo.app"
|
|
649
|
-
],
|
|
684
|
+
"routes": [],
|
|
650
685
|
"serviceId": "flow"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
"name": "topolo-flow-api",
|
|
689
|
+
"kind": "worker",
|
|
690
|
+
"apiUrl": null,
|
|
691
|
+
"domains": [],
|
|
692
|
+
"routes": [],
|
|
693
|
+
"serviceId": null
|
|
651
694
|
}
|
|
652
695
|
]
|
|
653
696
|
},
|
|
654
697
|
"forecast": {
|
|
655
698
|
"id": "forecast",
|
|
656
699
|
"appDir": "TopoloForecast",
|
|
657
|
-
"name": "forecast
|
|
700
|
+
"name": "topolo-forecast",
|
|
658
701
|
"packageName": "topolo-forecast",
|
|
659
702
|
"productionUrl": "https://forecast.topolo.app",
|
|
660
703
|
"services": [
|
|
@@ -664,7 +707,7 @@ var APPLICATIONS = {
|
|
|
664
707
|
{
|
|
665
708
|
"name": "topolo-forecast",
|
|
666
709
|
"kind": "worker",
|
|
667
|
-
"apiUrl":
|
|
710
|
+
"apiUrl": "https://forecast.topolo.app",
|
|
668
711
|
"domains": [
|
|
669
712
|
"forecast.topolo.app"
|
|
670
713
|
],
|
|
@@ -700,10 +743,16 @@ var APPLICATIONS = {
|
|
|
700
743
|
"domains": [
|
|
701
744
|
"forms.topolo.app"
|
|
702
745
|
],
|
|
703
|
-
"routes": [
|
|
704
|
-
"forms.topolo.app"
|
|
705
|
-
],
|
|
746
|
+
"routes": [],
|
|
706
747
|
"serviceId": "forms"
|
|
748
|
+
},
|
|
749
|
+
{
|
|
750
|
+
"name": "topolo-forms-api",
|
|
751
|
+
"kind": "worker",
|
|
752
|
+
"apiUrl": null,
|
|
753
|
+
"domains": [],
|
|
754
|
+
"routes": [],
|
|
755
|
+
"serviceId": null
|
|
707
756
|
}
|
|
708
757
|
]
|
|
709
758
|
},
|
|
@@ -724,10 +773,16 @@ var APPLICATIONS = {
|
|
|
724
773
|
"domains": [
|
|
725
774
|
"home.topolo.app"
|
|
726
775
|
],
|
|
727
|
-
"routes": [
|
|
728
|
-
"home.topolo.app"
|
|
729
|
-
],
|
|
776
|
+
"routes": [],
|
|
730
777
|
"serviceId": "home"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
"name": "topolo-home-api",
|
|
781
|
+
"kind": "worker",
|
|
782
|
+
"apiUrl": null,
|
|
783
|
+
"domains": [],
|
|
784
|
+
"routes": [],
|
|
785
|
+
"serviceId": null
|
|
731
786
|
}
|
|
732
787
|
]
|
|
733
788
|
},
|
|
@@ -748,10 +803,16 @@ var APPLICATIONS = {
|
|
|
748
803
|
"domains": [
|
|
749
804
|
"insights.topolo.app"
|
|
750
805
|
],
|
|
751
|
-
"routes": [
|
|
752
|
-
"insights.topolo.app"
|
|
753
|
-
],
|
|
806
|
+
"routes": [],
|
|
754
807
|
"serviceId": "insights"
|
|
808
|
+
},
|
|
809
|
+
{
|
|
810
|
+
"name": "topolo-insights-api",
|
|
811
|
+
"kind": "worker",
|
|
812
|
+
"apiUrl": null,
|
|
813
|
+
"domains": [],
|
|
814
|
+
"routes": [],
|
|
815
|
+
"serviceId": null
|
|
755
816
|
}
|
|
756
817
|
]
|
|
757
818
|
},
|
|
@@ -772,10 +833,16 @@ var APPLICATIONS = {
|
|
|
772
833
|
"domains": [
|
|
773
834
|
"inventory.topolo.app"
|
|
774
835
|
],
|
|
775
|
-
"routes": [
|
|
776
|
-
"inventory.topolo.app"
|
|
777
|
-
],
|
|
836
|
+
"routes": [],
|
|
778
837
|
"serviceId": "inventory"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
"name": "topolo-inventory-api",
|
|
841
|
+
"kind": "worker",
|
|
842
|
+
"apiUrl": null,
|
|
843
|
+
"domains": [],
|
|
844
|
+
"routes": [],
|
|
845
|
+
"serviceId": null
|
|
779
846
|
}
|
|
780
847
|
]
|
|
781
848
|
},
|
|
@@ -792,7 +859,7 @@ var APPLICATIONS = {
|
|
|
792
859
|
{
|
|
793
860
|
"name": "topolo-learn",
|
|
794
861
|
"kind": "worker",
|
|
795
|
-
"apiUrl":
|
|
862
|
+
"apiUrl": "https://learn.topolo.app",
|
|
796
863
|
"domains": [
|
|
797
864
|
"learn.topolo.app"
|
|
798
865
|
],
|
|
@@ -852,10 +919,16 @@ var APPLICATIONS = {
|
|
|
852
919
|
"domains": [
|
|
853
920
|
"mail.topolo.app"
|
|
854
921
|
],
|
|
855
|
-
"routes": [
|
|
856
|
-
"mail.topolo.app"
|
|
857
|
-
],
|
|
922
|
+
"routes": [],
|
|
858
923
|
"serviceId": "mail"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
"name": "topolo-mail-api",
|
|
927
|
+
"kind": "worker",
|
|
928
|
+
"apiUrl": null,
|
|
929
|
+
"domains": [],
|
|
930
|
+
"routes": [],
|
|
931
|
+
"serviceId": null
|
|
859
932
|
}
|
|
860
933
|
]
|
|
861
934
|
},
|
|
@@ -876,47 +949,51 @@ var APPLICATIONS = {
|
|
|
876
949
|
"domains": [
|
|
877
950
|
"mdm-api.topolo.app"
|
|
878
951
|
],
|
|
879
|
-
"routes": [
|
|
880
|
-
"mdm-api.topolo.app"
|
|
881
|
-
],
|
|
952
|
+
"routes": [],
|
|
882
953
|
"serviceId": "mdm"
|
|
883
954
|
},
|
|
884
955
|
{
|
|
885
956
|
"name": "topolo-mdm-console",
|
|
886
957
|
"kind": "worker",
|
|
887
|
-
"apiUrl":
|
|
958
|
+
"apiUrl": "https://mdm.topolo.app",
|
|
888
959
|
"domains": [
|
|
889
960
|
"mdm.topolo.app"
|
|
890
961
|
],
|
|
891
|
-
"routes": [
|
|
892
|
-
"mdm.topolo.app"
|
|
893
|
-
],
|
|
962
|
+
"routes": [],
|
|
894
963
|
"serviceId": null
|
|
895
964
|
}
|
|
896
965
|
]
|
|
897
966
|
},
|
|
898
|
-
"
|
|
899
|
-
"id": "
|
|
900
|
-
"appDir": "
|
|
901
|
-
"name": "topolo-
|
|
902
|
-
"packageName": "topolo-
|
|
967
|
+
"messages": {
|
|
968
|
+
"id": "messages",
|
|
969
|
+
"appDir": "TopoloMessages",
|
|
970
|
+
"name": "topolo-messages",
|
|
971
|
+
"packageName": "topolo-messages",
|
|
903
972
|
"productionUrl": "https://messages.topolo.app",
|
|
904
973
|
"services": [
|
|
905
|
-
"
|
|
974
|
+
"messages"
|
|
906
975
|
],
|
|
907
976
|
"deployTargets": [
|
|
908
977
|
{
|
|
909
|
-
"name": "topolo-
|
|
978
|
+
"name": "topolo-messages",
|
|
910
979
|
"kind": "worker",
|
|
911
980
|
"apiUrl": "https://messages.topolo.app",
|
|
912
981
|
"domains": [
|
|
913
982
|
"messages.topolo.app"
|
|
914
983
|
],
|
|
915
984
|
"routes": [],
|
|
916
|
-
"serviceId": "
|
|
985
|
+
"serviceId": "messages"
|
|
986
|
+
},
|
|
987
|
+
{
|
|
988
|
+
"name": "topolo-messages-api",
|
|
989
|
+
"kind": "worker",
|
|
990
|
+
"apiUrl": null,
|
|
991
|
+
"domains": [],
|
|
992
|
+
"routes": [],
|
|
993
|
+
"serviceId": null
|
|
917
994
|
},
|
|
918
995
|
{
|
|
919
|
-
"name": "topolo-
|
|
996
|
+
"name": "topolo-messages-dispatch",
|
|
920
997
|
"kind": "worker",
|
|
921
998
|
"apiUrl": null,
|
|
922
999
|
"domains": [],
|
|
@@ -986,9 +1063,22 @@ var APPLICATIONS = {
|
|
|
986
1063
|
"appDir": "TopoloObservabilityWatch",
|
|
987
1064
|
"name": "topolo-observability-watch",
|
|
988
1065
|
"packageName": "topolo-observability-watch",
|
|
989
|
-
"productionUrl":
|
|
990
|
-
"services": [
|
|
991
|
-
|
|
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
|
+
]
|
|
992
1082
|
},
|
|
993
1083
|
"one": {
|
|
994
1084
|
"id": "one",
|
|
@@ -1002,40 +1092,37 @@ var APPLICATIONS = {
|
|
|
1002
1092
|
"deployTargets": [
|
|
1003
1093
|
{
|
|
1004
1094
|
"name": "topolo-one",
|
|
1005
|
-
"kind": "pages",
|
|
1006
|
-
"apiUrl": null,
|
|
1007
|
-
"domains": [
|
|
1008
|
-
"one.topolo.app"
|
|
1009
|
-
],
|
|
1010
|
-
"routes": [],
|
|
1011
|
-
"serviceId": null
|
|
1012
|
-
},
|
|
1013
|
-
{
|
|
1014
|
-
"name": "topolo-one-website",
|
|
1015
1095
|
"kind": "worker",
|
|
1016
1096
|
"apiUrl": null,
|
|
1017
|
-
"domains": [
|
|
1018
|
-
"topolo.io",
|
|
1019
|
-
"www.topolo.io"
|
|
1020
|
-
],
|
|
1097
|
+
"domains": [],
|
|
1021
1098
|
"routes": [],
|
|
1022
1099
|
"serviceId": null
|
|
1023
1100
|
},
|
|
1024
1101
|
{
|
|
1025
|
-
"name": "topolo-one-
|
|
1102
|
+
"name": "topolo-one-api",
|
|
1026
1103
|
"kind": "worker",
|
|
1027
1104
|
"apiUrl": "https://one.topolo.app",
|
|
1028
1105
|
"domains": [
|
|
1029
|
-
"one.topolo.app"
|
|
1030
|
-
"topolo.app",
|
|
1031
|
-
"www.topolo.app"
|
|
1106
|
+
"one.topolo.app"
|
|
1032
1107
|
],
|
|
1033
1108
|
"routes": [
|
|
1034
1109
|
"one.topolo.app/*",
|
|
1035
|
-
"topolo.app",
|
|
1036
1110
|
"www.topolo.app/*"
|
|
1037
1111
|
],
|
|
1038
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
|
|
1039
1126
|
}
|
|
1040
1127
|
]
|
|
1041
1128
|
},
|
|
@@ -1056,10 +1143,16 @@ var APPLICATIONS = {
|
|
|
1056
1143
|
"domains": [
|
|
1057
1144
|
"p2p.topolo.app"
|
|
1058
1145
|
],
|
|
1059
|
-
"routes": [
|
|
1060
|
-
"p2p.topolo.app"
|
|
1061
|
-
],
|
|
1146
|
+
"routes": [],
|
|
1062
1147
|
"serviceId": "p2p"
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
"name": "topolo-p2p-api",
|
|
1151
|
+
"kind": "worker",
|
|
1152
|
+
"apiUrl": null,
|
|
1153
|
+
"domains": [],
|
|
1154
|
+
"routes": [],
|
|
1155
|
+
"serviceId": null
|
|
1063
1156
|
}
|
|
1064
1157
|
]
|
|
1065
1158
|
},
|
|
@@ -1082,6 +1175,14 @@ var APPLICATIONS = {
|
|
|
1082
1175
|
],
|
|
1083
1176
|
"routes": [],
|
|
1084
1177
|
"serviceId": "pay"
|
|
1178
|
+
},
|
|
1179
|
+
{
|
|
1180
|
+
"name": "topolo-pay-api",
|
|
1181
|
+
"kind": "worker",
|
|
1182
|
+
"apiUrl": null,
|
|
1183
|
+
"domains": [],
|
|
1184
|
+
"routes": [],
|
|
1185
|
+
"serviceId": null
|
|
1085
1186
|
}
|
|
1086
1187
|
]
|
|
1087
1188
|
},
|
|
@@ -1102,10 +1203,16 @@ var APPLICATIONS = {
|
|
|
1102
1203
|
"domains": [
|
|
1103
1204
|
"people.topolo.app"
|
|
1104
1205
|
],
|
|
1105
|
-
"routes": [
|
|
1106
|
-
"people.topolo.app"
|
|
1107
|
-
],
|
|
1206
|
+
"routes": [],
|
|
1108
1207
|
"serviceId": "people"
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
"name": "topolo-people-api",
|
|
1211
|
+
"kind": "worker",
|
|
1212
|
+
"apiUrl": null,
|
|
1213
|
+
"domains": [],
|
|
1214
|
+
"routes": [],
|
|
1215
|
+
"serviceId": null
|
|
1109
1216
|
}
|
|
1110
1217
|
]
|
|
1111
1218
|
},
|
|
@@ -1126,10 +1233,16 @@ var APPLICATIONS = {
|
|
|
1126
1233
|
"domains": [
|
|
1127
1234
|
"pulse.topolo.app"
|
|
1128
1235
|
],
|
|
1129
|
-
"routes": [
|
|
1130
|
-
"pulse.topolo.app"
|
|
1131
|
-
],
|
|
1236
|
+
"routes": [],
|
|
1132
1237
|
"serviceId": "pulse"
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
"name": "topolo-pulse-api",
|
|
1241
|
+
"kind": "worker",
|
|
1242
|
+
"apiUrl": null,
|
|
1243
|
+
"domains": [],
|
|
1244
|
+
"routes": [],
|
|
1245
|
+
"serviceId": null
|
|
1133
1246
|
}
|
|
1134
1247
|
]
|
|
1135
1248
|
},
|
|
@@ -1151,7 +1264,9 @@ var APPLICATIONS = {
|
|
|
1151
1264
|
"domains": [
|
|
1152
1265
|
"api.ol0.me"
|
|
1153
1266
|
],
|
|
1154
|
-
"routes": [
|
|
1267
|
+
"routes": [
|
|
1268
|
+
"api.ol0.me/*"
|
|
1269
|
+
],
|
|
1155
1270
|
"serviceId": "quro.api"
|
|
1156
1271
|
},
|
|
1157
1272
|
{
|
|
@@ -1169,7 +1284,7 @@ var APPLICATIONS = {
|
|
|
1169
1284
|
{
|
|
1170
1285
|
"name": "quro-ui",
|
|
1171
1286
|
"kind": "worker",
|
|
1172
|
-
"apiUrl":
|
|
1287
|
+
"apiUrl": "https://quro.topolo.app",
|
|
1173
1288
|
"domains": [
|
|
1174
1289
|
"quro.topolo.app"
|
|
1175
1290
|
],
|
|
@@ -1191,7 +1306,7 @@ var APPLICATIONS = {
|
|
|
1191
1306
|
{
|
|
1192
1307
|
"name": "topolo-roadmapper",
|
|
1193
1308
|
"kind": "worker",
|
|
1194
|
-
"apiUrl":
|
|
1309
|
+
"apiUrl": "https://roadmapper.topolo.app",
|
|
1195
1310
|
"domains": [
|
|
1196
1311
|
"roadmapper.topolo.app"
|
|
1197
1312
|
],
|
|
@@ -1227,10 +1342,16 @@ var APPLICATIONS = {
|
|
|
1227
1342
|
"domains": [
|
|
1228
1343
|
"sign.topolo.app"
|
|
1229
1344
|
],
|
|
1230
|
-
"routes": [
|
|
1231
|
-
"sign.topolo.app"
|
|
1232
|
-
],
|
|
1345
|
+
"routes": [],
|
|
1233
1346
|
"serviceId": "sign"
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "topolo-sign-api",
|
|
1350
|
+
"kind": "worker",
|
|
1351
|
+
"apiUrl": null,
|
|
1352
|
+
"domains": [],
|
|
1353
|
+
"routes": [],
|
|
1354
|
+
"serviceId": null
|
|
1234
1355
|
}
|
|
1235
1356
|
]
|
|
1236
1357
|
},
|
|
@@ -1247,7 +1368,7 @@ var APPLICATIONS = {
|
|
|
1247
1368
|
{
|
|
1248
1369
|
"name": "topolo-social-studio",
|
|
1249
1370
|
"kind": "worker",
|
|
1250
|
-
"apiUrl":
|
|
1371
|
+
"apiUrl": "https://studio.topolo.app",
|
|
1251
1372
|
"domains": [
|
|
1252
1373
|
"studio.topolo.app"
|
|
1253
1374
|
],
|
|
@@ -1286,8 +1407,8 @@ var APPLICATIONS = {
|
|
|
1286
1407
|
"deployTargets": [
|
|
1287
1408
|
{
|
|
1288
1409
|
"name": "topolo-socialize",
|
|
1289
|
-
"kind": "
|
|
1290
|
-
"apiUrl":
|
|
1410
|
+
"kind": "worker",
|
|
1411
|
+
"apiUrl": "https://socialize.topolo.app",
|
|
1291
1412
|
"domains": [
|
|
1292
1413
|
"socialize.topolo.app"
|
|
1293
1414
|
],
|
|
@@ -1331,10 +1452,16 @@ var APPLICATIONS = {
|
|
|
1331
1452
|
"domains": [
|
|
1332
1453
|
"spaces.topolo.app"
|
|
1333
1454
|
],
|
|
1334
|
-
"routes": [
|
|
1335
|
-
"spaces.topolo.app"
|
|
1336
|
-
],
|
|
1455
|
+
"routes": [],
|
|
1337
1456
|
"serviceId": "spaces"
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
"name": "topolo-spaces-api",
|
|
1460
|
+
"kind": "worker",
|
|
1461
|
+
"apiUrl": null,
|
|
1462
|
+
"domains": [],
|
|
1463
|
+
"routes": [],
|
|
1464
|
+
"serviceId": null
|
|
1338
1465
|
}
|
|
1339
1466
|
]
|
|
1340
1467
|
},
|
|
@@ -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
|
-
"
|
|
1508
|
+
"success.topolo.app"
|
|
1360
1509
|
],
|
|
1361
|
-
"serviceId": "
|
|
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":
|
|
1650
|
+
"apiUrl": "https://web.topolo.app",
|
|
1471
1651
|
"domains": [
|
|
1472
1652
|
"web.topolo.app"
|
|
1473
1653
|
],
|
|
@@ -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
|
|
1564
|
-
"
|
|
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
|
},
|
|
@@ -1665,8 +1847,10 @@ var APPLICATION_REQUIREMENTS = [
|
|
|
1665
1847
|
function applicationRequirementScopes(application) {
|
|
1666
1848
|
const scopes = /* @__PURE__ */ new Set(["all"]);
|
|
1667
1849
|
const appId = application.id;
|
|
1668
|
-
const hasBrowserSurface = Boolean(application.productionUrl) ||
|
|
1669
|
-
|
|
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));
|
|
1670
1854
|
if (hasBrowserSurface) scopes.add("browser");
|
|
1671
1855
|
if (hasApiSurface) scopes.add("api");
|
|
1672
1856
|
if (appId === "cli" || appId === "mcp" || appId === "cloudcontrol") {
|
|
@@ -1783,7 +1967,7 @@ function evaluateRequirement(application, requirement) {
|
|
|
1783
1967
|
evidence
|
|
1784
1968
|
);
|
|
1785
1969
|
case "cloudflare-deployment-contract": {
|
|
1786
|
-
if (application.deployTargets.length
|
|
1970
|
+
if (application.deployTargets.length < 1) {
|
|
1787
1971
|
return finding(requirement, "missing", "No CloudControl deploy targets are registered.", evidence);
|
|
1788
1972
|
}
|
|
1789
1973
|
evidence.push(`deployTargets=${application.deployTargets.length}`);
|
|
@@ -1874,6 +2058,7 @@ function resolveServiceUrl(service, overrides) {
|
|
|
1874
2058
|
var WRITE_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
|
|
1875
2059
|
var POSITIVE_CACHE_TTL_MS = 5 * 60 * 1e3;
|
|
1876
2060
|
var NEGATIVE_CACHE_TTL_MS = 60 * 1e3;
|
|
2061
|
+
var CATALOG_CACHE_TTL_MS = 60 * 1e3;
|
|
1877
2062
|
var TopoloClient = class _TopoloClient {
|
|
1878
2063
|
credential;
|
|
1879
2064
|
agent;
|
|
@@ -1883,6 +2068,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
1883
2068
|
timeoutMs;
|
|
1884
2069
|
fetchImpl;
|
|
1885
2070
|
debug;
|
|
2071
|
+
serviceCatalogCache = null;
|
|
1886
2072
|
/**
|
|
1887
2073
|
* Process-wide cache for slug → service-id lookups. Keyed by
|
|
1888
2074
|
* `${authBaseUrl}|${slug}` so multiple `TopoloClient` instances pointing at
|
|
@@ -1928,7 +2114,8 @@ var TopoloClient = class _TopoloClient {
|
|
|
1928
2114
|
`Mutating ${method} requests require { confirm: true }. This guardrail prevents agents from issuing writes without an explicit human-in-the-loop acknowledgement.`
|
|
1929
2115
|
);
|
|
1930
2116
|
}
|
|
1931
|
-
const
|
|
2117
|
+
const resolvedService = await this.resolveRequestService(opts.service);
|
|
2118
|
+
const baseUrl = resolvedService.baseUrl;
|
|
1932
2119
|
const url = new URL(opts.path, baseUrl.endsWith("/") ? baseUrl : `${baseUrl}/`);
|
|
1933
2120
|
if (opts.query) {
|
|
1934
2121
|
for (const [k, v] of Object.entries(opts.query)) {
|
|
@@ -1938,7 +2125,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
1938
2125
|
const headers = new Headers();
|
|
1939
2126
|
headers.set("Accept", "application/json");
|
|
1940
2127
|
if (opts.body !== void 0) headers.set("Content-Type", "application/json");
|
|
1941
|
-
const platformServiceId = resolveConfiguredServiceId(
|
|
2128
|
+
const platformServiceId = resolveConfiguredServiceId(resolvedService.serviceKey, this.serviceIds);
|
|
1942
2129
|
if (platformServiceId) headers.set("X-Service-ID", platformServiceId);
|
|
1943
2130
|
applyAuthHeaders(headers, this.credential);
|
|
1944
2131
|
const requestId = generateRequestId();
|
|
@@ -1951,7 +2138,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
1951
2138
|
const signal = opts.signal ? mergeSignals(opts.signal, controller.signal) : controller.signal;
|
|
1952
2139
|
const urlStr = url.toString();
|
|
1953
2140
|
const startedAt = Date.now();
|
|
1954
|
-
this.emit({ phase: "request", method, service:
|
|
2141
|
+
this.emit({ phase: "request", method, service: resolvedService.serviceKey, path: opts.path, url: urlStr, requestId });
|
|
1955
2142
|
let res;
|
|
1956
2143
|
try {
|
|
1957
2144
|
res = await this.fetchImpl(urlStr, {
|
|
@@ -1964,7 +2151,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
1964
2151
|
this.emit({
|
|
1965
2152
|
phase: "error",
|
|
1966
2153
|
method,
|
|
1967
|
-
service:
|
|
2154
|
+
service: resolvedService.serviceKey,
|
|
1968
2155
|
path: opts.path,
|
|
1969
2156
|
url: urlStr,
|
|
1970
2157
|
requestId,
|
|
@@ -1983,7 +2170,7 @@ var TopoloClient = class _TopoloClient {
|
|
|
1983
2170
|
this.emit({
|
|
1984
2171
|
phase: "error",
|
|
1985
2172
|
method,
|
|
1986
|
-
service:
|
|
2173
|
+
service: resolvedService.serviceKey,
|
|
1987
2174
|
path: opts.path,
|
|
1988
2175
|
url: urlStr,
|
|
1989
2176
|
requestId,
|
|
@@ -1998,12 +2185,12 @@ var TopoloClient = class _TopoloClient {
|
|
|
1998
2185
|
extractRequired(parsed)
|
|
1999
2186
|
);
|
|
2000
2187
|
}
|
|
2001
|
-
throw new TopoloHttpError(
|
|
2188
|
+
throw new TopoloHttpError(resolvedService.serviceKey, opts.path, res.status, parsed);
|
|
2002
2189
|
}
|
|
2003
2190
|
this.emit({
|
|
2004
2191
|
phase: "response",
|
|
2005
2192
|
method,
|
|
2006
|
-
service:
|
|
2193
|
+
service: resolvedService.serviceKey,
|
|
2007
2194
|
path: opts.path,
|
|
2008
2195
|
url: urlStr,
|
|
2009
2196
|
requestId,
|
|
@@ -2012,6 +2199,32 @@ var TopoloClient = class _TopoloClient {
|
|
|
2012
2199
|
});
|
|
2013
2200
|
return parsed;
|
|
2014
2201
|
}
|
|
2202
|
+
async resolveRequestService(service) {
|
|
2203
|
+
const serviceKey = normalizeLookupKey(service);
|
|
2204
|
+
if (!serviceKey) {
|
|
2205
|
+
throw new TopoloSdkError("unknown_service", "service is required");
|
|
2206
|
+
}
|
|
2207
|
+
if (serviceKey === "auth") {
|
|
2208
|
+
const overrideUrl = resolveConfiguredServiceUrl(serviceKey, this.serviceUrls);
|
|
2209
|
+
if (overrideUrl) return { serviceKey, baseUrl: overrideUrl };
|
|
2210
|
+
return { serviceKey, baseUrl: DEFAULT_SERVICE_URLS.auth };
|
|
2211
|
+
}
|
|
2212
|
+
const live = await this.resolveLiveCallableService(serviceKey);
|
|
2213
|
+
if (live) {
|
|
2214
|
+
const overrideUrl = resolveConfiguredServiceUrl(serviceKey, this.serviceUrls);
|
|
2215
|
+
return overrideUrl ? { ...live, baseUrl: overrideUrl } : live;
|
|
2216
|
+
}
|
|
2217
|
+
throw new TopoloSdkError(
|
|
2218
|
+
"unknown_service",
|
|
2219
|
+
`Unknown Topolo service "${service}". Run service discovery first and pass a callable service id or slug.`
|
|
2220
|
+
);
|
|
2221
|
+
}
|
|
2222
|
+
async resolveLiveCallableService(serviceKey) {
|
|
2223
|
+
const catalog = await this.listServices();
|
|
2224
|
+
const match = catalog.find((entry) => catalogEntryMatches(entry, serviceKey));
|
|
2225
|
+
if (!match?.baseUrl || !isCallableCatalogEntry(match)) return null;
|
|
2226
|
+
return { serviceKey, baseUrl: match.baseUrl };
|
|
2227
|
+
}
|
|
2015
2228
|
/**
|
|
2016
2229
|
* Resolve a service-slug → opaque service-id via caller config or TopoloAuth.
|
|
2017
2230
|
*
|
|
@@ -2072,43 +2285,55 @@ var TopoloClient = class _TopoloClient {
|
|
|
2072
2285
|
/**
|
|
2073
2286
|
* List the platform service catalog from the live registry
|
|
2074
2287
|
* (`GET /api/services/catalog` on TopoloAuth). Credential-aware: the
|
|
2075
|
-
* caller's credential is attached, so
|
|
2076
|
-
*
|
|
2077
|
-
* permits; an unauthenticated/agent caller receives `active` only.
|
|
2288
|
+
* caller's credential is attached, so the result only includes services the
|
|
2289
|
+
* credential's organization and effective permissions can use.
|
|
2078
2290
|
*
|
|
2079
|
-
*
|
|
2080
|
-
*
|
|
2081
|
-
*
|
|
2082
|
-
* authoritative; the snapshot is a floor, not a cap.
|
|
2291
|
+
* Security boundary: this never falls back to the generated global snapshot.
|
|
2292
|
+
* The live Auth catalog is the authority because it is scoped to the caller's
|
|
2293
|
+
* organization and effective permissions.
|
|
2083
2294
|
*/
|
|
2084
2295
|
async listServices() {
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2296
|
+
const now = Date.now();
|
|
2297
|
+
if (this.serviceCatalogCache && this.serviceCatalogCache.expiresAt > now) {
|
|
2298
|
+
return this.serviceCatalogCache.entries;
|
|
2299
|
+
}
|
|
2300
|
+
const res = await this.request({ service: "auth", method: "GET", path: "/api/services/catalog" });
|
|
2301
|
+
const raw = res.data?.services ?? res.services;
|
|
2302
|
+
if (!Array.isArray(raw)) {
|
|
2303
|
+
throw new TopoloSdkError(
|
|
2304
|
+
"service_catalog_unavailable",
|
|
2305
|
+
"TopoloAuth did not return a service catalog for the current credential."
|
|
2306
|
+
);
|
|
2307
|
+
}
|
|
2308
|
+
const entries = [];
|
|
2309
|
+
for (const item of raw) {
|
|
2310
|
+
const s = item;
|
|
2311
|
+
const serviceId = typeof s.service_id === "string" ? s.service_id : typeof s.id === "string" ? s.id : null;
|
|
2312
|
+
if (!serviceId) continue;
|
|
2313
|
+
const permissions = Array.isArray(s.granted_permissions) ? s.granted_permissions.filter((permission) => typeof permission === "string" && permission.trim().length > 0) : [];
|
|
2314
|
+
entries.push({
|
|
2315
|
+
serviceId,
|
|
2316
|
+
slug: typeof s.app_slug === "string" ? s.app_slug : null,
|
|
2317
|
+
name: typeof s.name === "string" ? s.name : null,
|
|
2318
|
+
description: typeof s.description === "string" ? s.description : null,
|
|
2319
|
+
baseUrl: typeof s.base_url === "string" ? s.base_url : null,
|
|
2320
|
+
status: typeof s.status === "string" ? s.status : null,
|
|
2321
|
+
surfaceKind: typeof s.surface_kind === "string" ? s.surface_kind : null,
|
|
2322
|
+
launchable: s.launchable === true,
|
|
2323
|
+
permissions
|
|
2324
|
+
});
|
|
2108
2325
|
}
|
|
2109
|
-
|
|
2326
|
+
this.serviceCatalogCache = {
|
|
2327
|
+
entries,
|
|
2328
|
+
expiresAt: now + CATALOG_CACHE_TTL_MS
|
|
2329
|
+
};
|
|
2330
|
+
return entries;
|
|
2110
2331
|
}
|
|
2111
|
-
|
|
2332
|
+
/**
|
|
2333
|
+
* Bundled generated registry for tooling that audits platform packaging, not
|
|
2334
|
+
* for deciding what the current credential may use.
|
|
2335
|
+
*/
|
|
2336
|
+
listBundledServices() {
|
|
2112
2337
|
const apps = Object.values(APPLICATIONS);
|
|
2113
2338
|
return apps.map((app) => ({
|
|
2114
2339
|
serviceId: app.id,
|
|
@@ -2116,9 +2341,10 @@ var TopoloClient = class _TopoloClient {
|
|
|
2116
2341
|
name: app.name ?? app.id,
|
|
2117
2342
|
description: null,
|
|
2118
2343
|
baseUrl: app.productionUrl ?? null,
|
|
2119
|
-
status: "
|
|
2344
|
+
status: "bundled",
|
|
2120
2345
|
surfaceKind: "application",
|
|
2121
|
-
launchable: Boolean(app.productionUrl)
|
|
2346
|
+
launchable: Boolean(app.productionUrl),
|
|
2347
|
+
permissions: []
|
|
2122
2348
|
}));
|
|
2123
2349
|
}
|
|
2124
2350
|
/**
|
|
@@ -2167,8 +2393,18 @@ function resolveConfiguredServiceId(slug, serviceIds) {
|
|
|
2167
2393
|
}
|
|
2168
2394
|
return null;
|
|
2169
2395
|
}
|
|
2396
|
+
function resolveConfiguredServiceUrl(slug, serviceUrls) {
|
|
2397
|
+
for (const serviceKey of serviceKeyCandidates(slug)) {
|
|
2398
|
+
const configured = serviceUrls?.[serviceKey];
|
|
2399
|
+
if (typeof configured === "string" && configured.trim()) return configured.trim();
|
|
2400
|
+
const envKey = `TOPOLO_SERVICE_URL_${serviceKey.replace(/\./g, "_").toUpperCase()}`;
|
|
2401
|
+
const envValue = typeof process !== "undefined" ? process.env?.[envKey] : void 0;
|
|
2402
|
+
if (typeof envValue === "string" && envValue.trim()) return envValue.trim();
|
|
2403
|
+
}
|
|
2404
|
+
return null;
|
|
2405
|
+
}
|
|
2170
2406
|
function serviceKeyCandidates(slug) {
|
|
2171
|
-
const normalized = slug
|
|
2407
|
+
const normalized = normalizeLookupKey(slug);
|
|
2172
2408
|
const withoutTopolo = normalized.startsWith("topolo-") ? normalized.slice("topolo-".length) : normalized;
|
|
2173
2409
|
return [.../* @__PURE__ */ new Set([
|
|
2174
2410
|
normalized,
|
|
@@ -2177,6 +2413,31 @@ function serviceKeyCandidates(slug) {
|
|
|
2177
2413
|
withoutTopolo.replace(/-/g, "_")
|
|
2178
2414
|
])];
|
|
2179
2415
|
}
|
|
2416
|
+
function normalizeLookupKey(value) {
|
|
2417
|
+
return String(value || "").trim().toLowerCase().replace(/\s+/g, "-");
|
|
2418
|
+
}
|
|
2419
|
+
function catalogEntryMatches(entry, needle) {
|
|
2420
|
+
return catalogEntryLookupKeys(entry).includes(needle);
|
|
2421
|
+
}
|
|
2422
|
+
function catalogEntryLookupKeys(entry) {
|
|
2423
|
+
const values = [entry.serviceId, entry.slug, entry.name].filter((value) => typeof value === "string" && value.trim().length > 0);
|
|
2424
|
+
const keys = /* @__PURE__ */ new Set();
|
|
2425
|
+
for (const value of values) {
|
|
2426
|
+
const normalized = normalizeLookupKey(value);
|
|
2427
|
+
if (!normalized) continue;
|
|
2428
|
+
for (const candidate of serviceKeyCandidates(normalized)) {
|
|
2429
|
+
keys.add(candidate);
|
|
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(
|
|
2438
|
+
entry.baseUrl && catalogEntryLookupKeys(entry).some((key) => Object.prototype.hasOwnProperty.call(DEFAULT_SERVICE_URLS, key))
|
|
2439
|
+
);
|
|
2440
|
+
}
|
|
2180
2441
|
function describeError(body, fallback) {
|
|
2181
2442
|
if (body && typeof body === "object") {
|
|
2182
2443
|
const maybe = body;
|