@topolo/sdk 0.9.2 → 0.9.4

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.d.cts CHANGED
@@ -188,8 +188,9 @@ interface TopoloActionCatalogEntry {
188
188
  path: string;
189
189
  permissionName: string;
190
190
  requiredPermission: string;
191
- /** Static catalog permission or target-enforced input-dependent authorization. */
192
- authorizationMode?: 'static' | 'runtime';
191
+ /** Static RBAC, contextual runtime policy, or an explicit public/service exception. */
192
+ authorizationMode?: 'static' | 'runtime' | 'public' | 'service';
193
+ allowedServices?: string[];
193
194
  inputSchema: Record<string, unknown>;
194
195
  outputSchema: Record<string, unknown>;
195
196
  agentContract?: TopoloActionAgentContract;
@@ -425,15 +426,52 @@ interface TopoloActionDigestInput {
425
426
  permission?: string | null;
426
427
  permissionName?: string | null;
427
428
  authorizationMode?: string | null;
429
+ allowedServices?: string[] | null;
428
430
  target?: string | null;
429
431
  readOnly: boolean;
430
432
  requiresConfirmation: boolean;
431
433
  agentAccess?: string | null;
432
434
  inputSchema: Record<string, unknown>;
433
435
  outputSchema: Record<string, unknown>;
436
+ agentContract?: Record<string, unknown>;
434
437
  }
435
438
  declare function digestTopoloActionCatalog(actions: TopoloActionDigestInput[], appId: string): Promise<string>;
436
439
 
440
+ interface ActionContractManifest {
441
+ appId?: string;
442
+ app_id?: string;
443
+ slug?: string;
444
+ name?: string;
445
+ actions?: ActionContractSource[];
446
+ }
447
+
448
+ interface ActionContractSource {
449
+ name?: string;
450
+ title?: string;
451
+ method?: string;
452
+ path?: string;
453
+ permission?: string;
454
+ permissionName?: string;
455
+ readOnly?: boolean;
456
+ destructive?: boolean;
457
+ inputSchema?: Record<string, unknown>;
458
+ outputSchema?: Record<string, unknown>;
459
+ agentContract?: Record<string, unknown>;
460
+ }
461
+
462
+ declare function enrichActionContract(
463
+ manifest: ActionContractManifest,
464
+ action: ActionContractSource,
465
+ allActions?: ActionContractSource[],
466
+ ): {
467
+ outputSchema: Record<string, unknown>;
468
+ agentContract: Record<string, unknown>;
469
+ };
470
+
471
+ declare function actionContractCompleteness(
472
+ action: ActionContractSource,
473
+ ): Record<string, boolean>;
474
+
437
475
  declare const APP_API_URLS: {
438
476
  readonly agent: "https://agent.topolo.app";
439
477
  readonly auth: "https://auth.topolo.app";
@@ -500,7 +538,7 @@ declare const APPLICATIONS: {
500
538
  readonly kind: "worker";
501
539
  readonly apiUrl: "https://admin.topolo.app";
502
540
  readonly domains: readonly ["admin.topolo.app"];
503
- readonly routes: readonly [];
541
+ readonly routes: readonly ["admin.topolo.app"];
504
542
  readonly appId: null;
505
543
  }, {
506
544
  readonly name: "topolo-admin-api";
@@ -539,7 +577,7 @@ declare const APPLICATIONS: {
539
577
  readonly appDir: "TopoloAuth";
540
578
  readonly name: "topolo-auth";
541
579
  readonly packageName: "topolo-auth";
542
- readonly productionUrl: "https://auth.topolo.app/login";
580
+ readonly productionUrl: "https://auth.topolo.app";
543
581
  readonly services: readonly ["auth"];
544
582
  readonly deployTargets: readonly [{
545
583
  readonly name: "topolo-auth";
@@ -562,7 +600,7 @@ declare const APPLICATIONS: {
562
600
  readonly kind: "worker";
563
601
  readonly apiUrl: "https://backup.topolo.app";
564
602
  readonly domains: readonly ["backup.topolo.app"];
565
- readonly routes: readonly [];
603
+ readonly routes: readonly ["backup.topolo.app"];
566
604
  readonly appId: "backup";
567
605
  }];
568
606
  };
@@ -601,7 +639,7 @@ declare const APPLICATIONS: {
601
639
  readonly kind: "worker";
602
640
  readonly apiUrl: "https://brand.topolo.app";
603
641
  readonly domains: readonly ["brand.topolo.app"];
604
- readonly routes: readonly ["brand.topolo.app"];
642
+ readonly routes: readonly [];
605
643
  readonly appId: "brand";
606
644
  }, {
607
645
  readonly name: "topolo-brand-api";
@@ -640,7 +678,7 @@ declare const APPLICATIONS: {
640
678
  readonly kind: "worker";
641
679
  readonly apiUrl: "https://bytes.topolo.app";
642
680
  readonly domains: readonly ["bytes.topolo.app"];
643
- readonly routes: readonly [];
681
+ readonly routes: readonly ["bytes.topolo.app"];
644
682
  readonly appId: "bytes";
645
683
  }, {
646
684
  readonly name: "topolo-bytes-api";
@@ -663,7 +701,7 @@ declare const APPLICATIONS: {
663
701
  readonly kind: "worker";
664
702
  readonly apiUrl: "https://calendar.topolo.app";
665
703
  readonly domains: readonly ["calendar.topolo.app"];
666
- readonly routes: readonly [];
704
+ readonly routes: readonly ["calendar.topolo.app"];
667
705
  readonly appId: "calendar";
668
706
  }, {
669
707
  readonly name: "topolo-calendar-api";
@@ -686,7 +724,7 @@ declare const APPLICATIONS: {
686
724
  readonly kind: "worker";
687
725
  readonly apiUrl: "https://campaigns.topolo.app";
688
726
  readonly domains: readonly ["campaigns.topolo.app"];
689
- readonly routes: readonly ["campaigns.topolo.app"];
727
+ readonly routes: readonly [];
690
728
  readonly appId: "campaigns";
691
729
  }, {
692
730
  readonly name: "topolo-campaigns-api";
@@ -755,21 +793,21 @@ declare const APPLICATIONS: {
755
793
  readonly kind: "worker";
756
794
  readonly apiUrl: "https://guest.topolo.app";
757
795
  readonly domains: readonly ["guest.topolo.app"];
758
- readonly routes: readonly [];
796
+ readonly routes: readonly ["guest.topolo.app"];
759
797
  readonly appId: null;
760
798
  }, {
761
799
  readonly name: "topolo-commerce-ops-web";
762
800
  readonly kind: "worker";
763
801
  readonly apiUrl: "https://commerce.topolo.app";
764
802
  readonly domains: readonly ["commerce.topolo.app"];
765
- readonly routes: readonly [];
803
+ readonly routes: readonly ["commerce.topolo.app"];
766
804
  readonly appId: "commerce";
767
805
  }, {
768
806
  readonly name: "topolo-commerce-station-web";
769
807
  readonly kind: "worker";
770
808
  readonly apiUrl: "https://station-commerce.topolo.app";
771
809
  readonly domains: readonly ["station-commerce.topolo.app"];
772
- readonly routes: readonly [];
810
+ readonly routes: readonly ["station-commerce.topolo.app"];
773
811
  readonly appId: null;
774
812
  }];
775
813
  };
@@ -907,7 +945,7 @@ declare const APPLICATIONS: {
907
945
  readonly kind: "worker";
908
946
  readonly apiUrl: "https://docs.topolo.app";
909
947
  readonly domains: readonly ["docs.topolo.app"];
910
- readonly routes: readonly [];
948
+ readonly routes: readonly ["docs.topolo.app"];
911
949
  readonly appId: null;
912
950
  }, {
913
951
  readonly name: "topolo-docs-api";
@@ -930,21 +968,21 @@ declare const APPLICATIONS: {
930
968
  readonly kind: "worker";
931
969
  readonly apiUrl: "https://feed-analytics-api.topolo.app";
932
970
  readonly domains: readonly ["feed-analytics-api.topolo.app"];
933
- readonly routes: readonly [];
971
+ readonly routes: readonly ["feed-analytics-api.topolo.app"];
934
972
  readonly appId: null;
935
973
  }, {
936
974
  readonly name: "topolo-feed-api";
937
975
  readonly kind: "worker";
938
976
  readonly apiUrl: "https://feed-api.topolo.app";
939
977
  readonly domains: readonly ["feed-api.topolo.app"];
940
- readonly routes: readonly [];
978
+ readonly routes: readonly ["feed-api.topolo.app"];
941
979
  readonly appId: null;
942
980
  }, {
943
981
  readonly name: "topolo-feed-web";
944
982
  readonly kind: "worker";
945
983
  readonly apiUrl: "https://feed.topolo.app";
946
984
  readonly domains: readonly ["feed.topolo.app"];
947
- readonly routes: readonly [];
985
+ readonly routes: readonly ["feed.topolo.app"];
948
986
  readonly appId: "feed";
949
987
  }];
950
988
  };
@@ -1029,7 +1067,7 @@ declare const APPLICATIONS: {
1029
1067
  readonly kind: "worker";
1030
1068
  readonly apiUrl: "https://home.topolo.app";
1031
1069
  readonly domains: readonly ["home.topolo.app"];
1032
- readonly routes: readonly [];
1070
+ readonly routes: readonly ["home.topolo.app"];
1033
1071
  readonly appId: "home";
1034
1072
  }, {
1035
1073
  readonly name: "topolo-home-api";
@@ -1098,7 +1136,7 @@ declare const APPLICATIONS: {
1098
1136
  readonly kind: "worker";
1099
1137
  readonly apiUrl: "https://learn.topolo.app";
1100
1138
  readonly domains: readonly ["learn.topolo.app"];
1101
- readonly routes: readonly [];
1139
+ readonly routes: readonly ["learn.topolo.app"];
1102
1140
  readonly appId: "learn";
1103
1141
  }, {
1104
1142
  readonly name: "topolo-learn-api";
@@ -1167,7 +1205,7 @@ declare const APPLICATIONS: {
1167
1205
  readonly kind: "worker";
1168
1206
  readonly apiUrl: "https://mdm.topolo.app";
1169
1207
  readonly domains: readonly ["mdm.topolo.app"];
1170
- readonly routes: readonly [];
1208
+ readonly routes: readonly ["mdm.topolo.app"];
1171
1209
  readonly appId: "mdm";
1172
1210
  }];
1173
1211
  };
@@ -1183,7 +1221,7 @@ declare const APPLICATIONS: {
1183
1221
  readonly kind: "worker";
1184
1222
  readonly apiUrl: "https://messages.topolo.app";
1185
1223
  readonly domains: readonly ["messages.topolo.app"];
1186
- readonly routes: readonly [];
1224
+ readonly routes: readonly ["messages.topolo.app"];
1187
1225
  readonly appId: "messages";
1188
1226
  }, {
1189
1227
  readonly name: "topolo-messages-api";
@@ -1211,9 +1249,9 @@ declare const APPLICATIONS: {
1211
1249
  readonly deployTargets: readonly [{
1212
1250
  readonly name: "topolo-nexus-dashboard";
1213
1251
  readonly kind: "worker";
1214
- readonly apiUrl: null;
1252
+ readonly apiUrl: "https://nexus.topolo.app";
1215
1253
  readonly domains: readonly ["nexus.topolo.app"];
1216
- readonly routes: readonly [];
1254
+ readonly routes: readonly ["nexus.topolo.app"];
1217
1255
  readonly appId: null;
1218
1256
  }, {
1219
1257
  readonly name: "topolo-nexus-gateway";
@@ -1298,7 +1336,7 @@ declare const APPLICATIONS: {
1298
1336
  readonly kind: "worker";
1299
1337
  readonly apiUrl: "https://p2p.topolo.app";
1300
1338
  readonly domains: readonly ["p2p.topolo.app"];
1301
- readonly routes: readonly [];
1339
+ readonly routes: readonly ["p2p.topolo.app"];
1302
1340
  readonly appId: "p2p";
1303
1341
  }, {
1304
1342
  readonly name: "topolo-p2p-api";
@@ -1443,7 +1481,7 @@ declare const APPLICATIONS: {
1443
1481
  readonly kind: "worker";
1444
1482
  readonly apiUrl: "https://studio.topolo.app";
1445
1483
  readonly domains: readonly ["studio.topolo.app"];
1446
- readonly routes: readonly [];
1484
+ readonly routes: readonly ["studio.topolo.app"];
1447
1485
  readonly appId: "social_studio";
1448
1486
  }, {
1449
1487
  readonly name: "topolo-social-studio-api";
@@ -1473,14 +1511,14 @@ declare const APPLICATIONS: {
1473
1511
  readonly kind: "worker";
1474
1512
  readonly apiUrl: "https://socialize.topolo.app";
1475
1513
  readonly domains: readonly ["socialize.topolo.app"];
1476
- readonly routes: readonly [];
1514
+ readonly routes: readonly ["socialize.topolo.app"];
1477
1515
  readonly appId: "socialize";
1478
1516
  }, {
1479
1517
  readonly name: "topolo-socialize-api";
1480
1518
  readonly kind: "worker";
1481
1519
  readonly apiUrl: "https://socialize-api.topolo.app";
1482
1520
  readonly domains: readonly ["socialize-api.topolo.app"];
1483
- readonly routes: readonly [];
1521
+ readonly routes: readonly ["socialize-api.topolo.app"];
1484
1522
  readonly appId: null;
1485
1523
  }, {
1486
1524
  readonly name: "topolo-socialize-scheduler";
@@ -1526,7 +1564,7 @@ declare const APPLICATIONS: {
1526
1564
  readonly kind: "worker";
1527
1565
  readonly apiUrl: "https://status.topolo.app";
1528
1566
  readonly domains: readonly ["status.topolo.app"];
1529
- readonly routes: readonly [];
1567
+ readonly routes: readonly ["status.topolo.app"];
1530
1568
  readonly appId: "status";
1531
1569
  }];
1532
1570
  };
@@ -1611,7 +1649,7 @@ declare const APPLICATIONS: {
1611
1649
  readonly kind: "worker";
1612
1650
  readonly apiUrl: "https://voice.topolo.app";
1613
1651
  readonly domains: readonly ["voice.topolo.app"];
1614
- readonly routes: readonly [];
1652
+ readonly routes: readonly ["voice.topolo.app"];
1615
1653
  readonly appId: "voice";
1616
1654
  }, {
1617
1655
  readonly name: "topolo-voice-api";
@@ -1648,7 +1686,7 @@ declare const APPLICATIONS: {
1648
1686
  readonly kind: "worker";
1649
1687
  readonly apiUrl: "https://web.topolo.app";
1650
1688
  readonly domains: readonly ["web.topolo.app"];
1651
- readonly routes: readonly [];
1689
+ readonly routes: readonly ["web.topolo.app"];
1652
1690
  readonly appId: "web";
1653
1691
  }];
1654
1692
  };
@@ -1732,7 +1770,7 @@ declare const APPLICATION_REQUIREMENTS: readonly [{
1732
1770
  readonly summary: "Browser applications should feel like one platform and should not create isolated navigation or account surfaces.";
1733
1771
  readonly appliesTo: readonly ["browser"];
1734
1772
  readonly evidence: readonly ["@topolo-io/app-shell is used for the platform shell where the app has authenticated UI", "@topolo-io/app-launcher keeps the shared launcher/app switcher reachable from authenticated app chrome", "Account menu and sign-out behavior use TopoloAppShell or the ui-kit TopoloAccountMenu primitive", "Repeated app body surfaces use shared TopoloAppLayout primitives instead of local stat cards, empty states, or status badges", "Local preview supports deterministic visual QA fixtures for overview, list, detail, settings, and empty/loading states", "Authenticated app body content stays inside the viewport on mobile and desktop widths"];
1735
- readonly implementation: readonly ["Use @topolo-io/app-shell TopoloAppShell for authenticated app layouts", "Use the @topolo-io/ui-kit TopoloAccountMenu primitive when a partial-shell surface still needs account chrome", "Pass app-specific account actions as additive menu items instead of forking dropdowns", "Use shared design tokens and platform UI primitives before creating local equivalents", "Use TopoloAppMetricCard, TopoloAppEmptyState, TopoloAppStatusBadge, TopoloAppGrid, and TopoloAppSection for repeated app body patterns", "Keep visual QA fixtures available through visualQa=1 or __devpreview=1 so screenshot checks do not depend on live API state", "Keep mobile and desktop shell behavior aligned with the platform UI kit", "Constrain app-owned workspace wrappers with min-width: 0, width: auto, and viewport-aware max-width so shell padding cannot create page-level horizontal overflow"];
1773
+ readonly implementation: readonly ["Use @topolo-io/app-shell TopoloAppShell for authenticated app layouts", "Use the @topolo-io/ui-kit TopoloAccountMenu primitive when a partial-shell surface still needs account chrome", "Pass app-specific account actions as additive menu items instead of forking dropdowns", "Use shared design tokens and platform UI primitives before creating local equivalents", "Use TopoloAppMetricCard, TopoloAppEmptyState, TopoloAppStatusBadge, TopoloAppGrid, and TopoloAppSection for repeated app body patterns", "Keep visual QA fixtures available through visualQa=1 or __devpreview=1 so screenshot checks do not depend on live API state", "Keep mobile and desktop shell behavior aligned with the platform UI kit", "Constrain the app workspace-view layout wrappers with min-width: 0, width: auto, and viewport-aware max-width so shell padding cannot create page-level horizontal overflow"];
1736
1774
  }, {
1737
1775
  readonly id: "app-registration-and-scopes";
1738
1776
  readonly title: "Register protected APIs as platform apps";
@@ -2325,4 +2363,4 @@ declare function createTopolo(options: TopoloClientOptions): {
2325
2363
  };
2326
2364
  type Topolo = ReturnType<typeof createTopolo>;
2327
2365
 
2328
- export { ACTION_CATALOG_DIGEST_ALGORITHM, APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationId, type ApplicationRequirement, type ApplicationRequirementAudit, type ApplicationRequirementFinding, type ApplicationRequirementMigrationItem, type ApplicationRequirementScope, type ApplicationRequirementScore, type ApplicationRequirementStatus, type ApplicationRequirementsAuditReport, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionAgentContract, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloActionPlan, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloQuickActionsWidget, type TopoloRecentActivityWidget, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetActionItem, type TopoloWidgetActivityItem, type TopoloWidgetApiResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetDraft, type TopoloWidgetMetric, type TopoloWidgetNotificationItem, type TopoloWidgetResponseOptions, type TopoloWidgetSnapshotMetadata, type TopoloWidgetSnapshotMetric, type TopoloWidgetType, type TopoloWidgetValidationResult, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloActionInput, validateTopoloWidgetResponse };
2366
+ export { ACTION_CATALOG_DIGEST_ALGORITHM, APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type ActionContractManifest, type ActionContractSource, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationId, type ApplicationRequirement, type ApplicationRequirementAudit, type ApplicationRequirementFinding, type ApplicationRequirementMigrationItem, type ApplicationRequirementScope, type ApplicationRequirementScore, type ApplicationRequirementStatus, type ApplicationRequirementsAuditReport, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionAgentContract, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloActionPlan, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloQuickActionsWidget, type TopoloRecentActivityWidget, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetActionItem, type TopoloWidgetActivityItem, type TopoloWidgetApiResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetDraft, type TopoloWidgetMetric, type TopoloWidgetNotificationItem, type TopoloWidgetResponseOptions, type TopoloWidgetSnapshotMetadata, type TopoloWidgetSnapshotMetric, type TopoloWidgetType, type TopoloWidgetValidationResult, actionContractCompleteness, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, enrichActionContract, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloActionInput, validateTopoloWidgetResponse };
package/dist/index.d.ts CHANGED
@@ -188,8 +188,9 @@ interface TopoloActionCatalogEntry {
188
188
  path: string;
189
189
  permissionName: string;
190
190
  requiredPermission: string;
191
- /** Static catalog permission or target-enforced input-dependent authorization. */
192
- authorizationMode?: 'static' | 'runtime';
191
+ /** Static RBAC, contextual runtime policy, or an explicit public/service exception. */
192
+ authorizationMode?: 'static' | 'runtime' | 'public' | 'service';
193
+ allowedServices?: string[];
193
194
  inputSchema: Record<string, unknown>;
194
195
  outputSchema: Record<string, unknown>;
195
196
  agentContract?: TopoloActionAgentContract;
@@ -425,15 +426,52 @@ interface TopoloActionDigestInput {
425
426
  permission?: string | null;
426
427
  permissionName?: string | null;
427
428
  authorizationMode?: string | null;
429
+ allowedServices?: string[] | null;
428
430
  target?: string | null;
429
431
  readOnly: boolean;
430
432
  requiresConfirmation: boolean;
431
433
  agentAccess?: string | null;
432
434
  inputSchema: Record<string, unknown>;
433
435
  outputSchema: Record<string, unknown>;
436
+ agentContract?: Record<string, unknown>;
434
437
  }
435
438
  declare function digestTopoloActionCatalog(actions: TopoloActionDigestInput[], appId: string): Promise<string>;
436
439
 
440
+ interface ActionContractManifest {
441
+ appId?: string;
442
+ app_id?: string;
443
+ slug?: string;
444
+ name?: string;
445
+ actions?: ActionContractSource[];
446
+ }
447
+
448
+ interface ActionContractSource {
449
+ name?: string;
450
+ title?: string;
451
+ method?: string;
452
+ path?: string;
453
+ permission?: string;
454
+ permissionName?: string;
455
+ readOnly?: boolean;
456
+ destructive?: boolean;
457
+ inputSchema?: Record<string, unknown>;
458
+ outputSchema?: Record<string, unknown>;
459
+ agentContract?: Record<string, unknown>;
460
+ }
461
+
462
+ declare function enrichActionContract(
463
+ manifest: ActionContractManifest,
464
+ action: ActionContractSource,
465
+ allActions?: ActionContractSource[],
466
+ ): {
467
+ outputSchema: Record<string, unknown>;
468
+ agentContract: Record<string, unknown>;
469
+ };
470
+
471
+ declare function actionContractCompleteness(
472
+ action: ActionContractSource,
473
+ ): Record<string, boolean>;
474
+
437
475
  declare const APP_API_URLS: {
438
476
  readonly agent: "https://agent.topolo.app";
439
477
  readonly auth: "https://auth.topolo.app";
@@ -500,7 +538,7 @@ declare const APPLICATIONS: {
500
538
  readonly kind: "worker";
501
539
  readonly apiUrl: "https://admin.topolo.app";
502
540
  readonly domains: readonly ["admin.topolo.app"];
503
- readonly routes: readonly [];
541
+ readonly routes: readonly ["admin.topolo.app"];
504
542
  readonly appId: null;
505
543
  }, {
506
544
  readonly name: "topolo-admin-api";
@@ -539,7 +577,7 @@ declare const APPLICATIONS: {
539
577
  readonly appDir: "TopoloAuth";
540
578
  readonly name: "topolo-auth";
541
579
  readonly packageName: "topolo-auth";
542
- readonly productionUrl: "https://auth.topolo.app/login";
580
+ readonly productionUrl: "https://auth.topolo.app";
543
581
  readonly services: readonly ["auth"];
544
582
  readonly deployTargets: readonly [{
545
583
  readonly name: "topolo-auth";
@@ -562,7 +600,7 @@ declare const APPLICATIONS: {
562
600
  readonly kind: "worker";
563
601
  readonly apiUrl: "https://backup.topolo.app";
564
602
  readonly domains: readonly ["backup.topolo.app"];
565
- readonly routes: readonly [];
603
+ readonly routes: readonly ["backup.topolo.app"];
566
604
  readonly appId: "backup";
567
605
  }];
568
606
  };
@@ -601,7 +639,7 @@ declare const APPLICATIONS: {
601
639
  readonly kind: "worker";
602
640
  readonly apiUrl: "https://brand.topolo.app";
603
641
  readonly domains: readonly ["brand.topolo.app"];
604
- readonly routes: readonly ["brand.topolo.app"];
642
+ readonly routes: readonly [];
605
643
  readonly appId: "brand";
606
644
  }, {
607
645
  readonly name: "topolo-brand-api";
@@ -640,7 +678,7 @@ declare const APPLICATIONS: {
640
678
  readonly kind: "worker";
641
679
  readonly apiUrl: "https://bytes.topolo.app";
642
680
  readonly domains: readonly ["bytes.topolo.app"];
643
- readonly routes: readonly [];
681
+ readonly routes: readonly ["bytes.topolo.app"];
644
682
  readonly appId: "bytes";
645
683
  }, {
646
684
  readonly name: "topolo-bytes-api";
@@ -663,7 +701,7 @@ declare const APPLICATIONS: {
663
701
  readonly kind: "worker";
664
702
  readonly apiUrl: "https://calendar.topolo.app";
665
703
  readonly domains: readonly ["calendar.topolo.app"];
666
- readonly routes: readonly [];
704
+ readonly routes: readonly ["calendar.topolo.app"];
667
705
  readonly appId: "calendar";
668
706
  }, {
669
707
  readonly name: "topolo-calendar-api";
@@ -686,7 +724,7 @@ declare const APPLICATIONS: {
686
724
  readonly kind: "worker";
687
725
  readonly apiUrl: "https://campaigns.topolo.app";
688
726
  readonly domains: readonly ["campaigns.topolo.app"];
689
- readonly routes: readonly ["campaigns.topolo.app"];
727
+ readonly routes: readonly [];
690
728
  readonly appId: "campaigns";
691
729
  }, {
692
730
  readonly name: "topolo-campaigns-api";
@@ -755,21 +793,21 @@ declare const APPLICATIONS: {
755
793
  readonly kind: "worker";
756
794
  readonly apiUrl: "https://guest.topolo.app";
757
795
  readonly domains: readonly ["guest.topolo.app"];
758
- readonly routes: readonly [];
796
+ readonly routes: readonly ["guest.topolo.app"];
759
797
  readonly appId: null;
760
798
  }, {
761
799
  readonly name: "topolo-commerce-ops-web";
762
800
  readonly kind: "worker";
763
801
  readonly apiUrl: "https://commerce.topolo.app";
764
802
  readonly domains: readonly ["commerce.topolo.app"];
765
- readonly routes: readonly [];
803
+ readonly routes: readonly ["commerce.topolo.app"];
766
804
  readonly appId: "commerce";
767
805
  }, {
768
806
  readonly name: "topolo-commerce-station-web";
769
807
  readonly kind: "worker";
770
808
  readonly apiUrl: "https://station-commerce.topolo.app";
771
809
  readonly domains: readonly ["station-commerce.topolo.app"];
772
- readonly routes: readonly [];
810
+ readonly routes: readonly ["station-commerce.topolo.app"];
773
811
  readonly appId: null;
774
812
  }];
775
813
  };
@@ -907,7 +945,7 @@ declare const APPLICATIONS: {
907
945
  readonly kind: "worker";
908
946
  readonly apiUrl: "https://docs.topolo.app";
909
947
  readonly domains: readonly ["docs.topolo.app"];
910
- readonly routes: readonly [];
948
+ readonly routes: readonly ["docs.topolo.app"];
911
949
  readonly appId: null;
912
950
  }, {
913
951
  readonly name: "topolo-docs-api";
@@ -930,21 +968,21 @@ declare const APPLICATIONS: {
930
968
  readonly kind: "worker";
931
969
  readonly apiUrl: "https://feed-analytics-api.topolo.app";
932
970
  readonly domains: readonly ["feed-analytics-api.topolo.app"];
933
- readonly routes: readonly [];
971
+ readonly routes: readonly ["feed-analytics-api.topolo.app"];
934
972
  readonly appId: null;
935
973
  }, {
936
974
  readonly name: "topolo-feed-api";
937
975
  readonly kind: "worker";
938
976
  readonly apiUrl: "https://feed-api.topolo.app";
939
977
  readonly domains: readonly ["feed-api.topolo.app"];
940
- readonly routes: readonly [];
978
+ readonly routes: readonly ["feed-api.topolo.app"];
941
979
  readonly appId: null;
942
980
  }, {
943
981
  readonly name: "topolo-feed-web";
944
982
  readonly kind: "worker";
945
983
  readonly apiUrl: "https://feed.topolo.app";
946
984
  readonly domains: readonly ["feed.topolo.app"];
947
- readonly routes: readonly [];
985
+ readonly routes: readonly ["feed.topolo.app"];
948
986
  readonly appId: "feed";
949
987
  }];
950
988
  };
@@ -1029,7 +1067,7 @@ declare const APPLICATIONS: {
1029
1067
  readonly kind: "worker";
1030
1068
  readonly apiUrl: "https://home.topolo.app";
1031
1069
  readonly domains: readonly ["home.topolo.app"];
1032
- readonly routes: readonly [];
1070
+ readonly routes: readonly ["home.topolo.app"];
1033
1071
  readonly appId: "home";
1034
1072
  }, {
1035
1073
  readonly name: "topolo-home-api";
@@ -1098,7 +1136,7 @@ declare const APPLICATIONS: {
1098
1136
  readonly kind: "worker";
1099
1137
  readonly apiUrl: "https://learn.topolo.app";
1100
1138
  readonly domains: readonly ["learn.topolo.app"];
1101
- readonly routes: readonly [];
1139
+ readonly routes: readonly ["learn.topolo.app"];
1102
1140
  readonly appId: "learn";
1103
1141
  }, {
1104
1142
  readonly name: "topolo-learn-api";
@@ -1167,7 +1205,7 @@ declare const APPLICATIONS: {
1167
1205
  readonly kind: "worker";
1168
1206
  readonly apiUrl: "https://mdm.topolo.app";
1169
1207
  readonly domains: readonly ["mdm.topolo.app"];
1170
- readonly routes: readonly [];
1208
+ readonly routes: readonly ["mdm.topolo.app"];
1171
1209
  readonly appId: "mdm";
1172
1210
  }];
1173
1211
  };
@@ -1183,7 +1221,7 @@ declare const APPLICATIONS: {
1183
1221
  readonly kind: "worker";
1184
1222
  readonly apiUrl: "https://messages.topolo.app";
1185
1223
  readonly domains: readonly ["messages.topolo.app"];
1186
- readonly routes: readonly [];
1224
+ readonly routes: readonly ["messages.topolo.app"];
1187
1225
  readonly appId: "messages";
1188
1226
  }, {
1189
1227
  readonly name: "topolo-messages-api";
@@ -1211,9 +1249,9 @@ declare const APPLICATIONS: {
1211
1249
  readonly deployTargets: readonly [{
1212
1250
  readonly name: "topolo-nexus-dashboard";
1213
1251
  readonly kind: "worker";
1214
- readonly apiUrl: null;
1252
+ readonly apiUrl: "https://nexus.topolo.app";
1215
1253
  readonly domains: readonly ["nexus.topolo.app"];
1216
- readonly routes: readonly [];
1254
+ readonly routes: readonly ["nexus.topolo.app"];
1217
1255
  readonly appId: null;
1218
1256
  }, {
1219
1257
  readonly name: "topolo-nexus-gateway";
@@ -1298,7 +1336,7 @@ declare const APPLICATIONS: {
1298
1336
  readonly kind: "worker";
1299
1337
  readonly apiUrl: "https://p2p.topolo.app";
1300
1338
  readonly domains: readonly ["p2p.topolo.app"];
1301
- readonly routes: readonly [];
1339
+ readonly routes: readonly ["p2p.topolo.app"];
1302
1340
  readonly appId: "p2p";
1303
1341
  }, {
1304
1342
  readonly name: "topolo-p2p-api";
@@ -1443,7 +1481,7 @@ declare const APPLICATIONS: {
1443
1481
  readonly kind: "worker";
1444
1482
  readonly apiUrl: "https://studio.topolo.app";
1445
1483
  readonly domains: readonly ["studio.topolo.app"];
1446
- readonly routes: readonly [];
1484
+ readonly routes: readonly ["studio.topolo.app"];
1447
1485
  readonly appId: "social_studio";
1448
1486
  }, {
1449
1487
  readonly name: "topolo-social-studio-api";
@@ -1473,14 +1511,14 @@ declare const APPLICATIONS: {
1473
1511
  readonly kind: "worker";
1474
1512
  readonly apiUrl: "https://socialize.topolo.app";
1475
1513
  readonly domains: readonly ["socialize.topolo.app"];
1476
- readonly routes: readonly [];
1514
+ readonly routes: readonly ["socialize.topolo.app"];
1477
1515
  readonly appId: "socialize";
1478
1516
  }, {
1479
1517
  readonly name: "topolo-socialize-api";
1480
1518
  readonly kind: "worker";
1481
1519
  readonly apiUrl: "https://socialize-api.topolo.app";
1482
1520
  readonly domains: readonly ["socialize-api.topolo.app"];
1483
- readonly routes: readonly [];
1521
+ readonly routes: readonly ["socialize-api.topolo.app"];
1484
1522
  readonly appId: null;
1485
1523
  }, {
1486
1524
  readonly name: "topolo-socialize-scheduler";
@@ -1526,7 +1564,7 @@ declare const APPLICATIONS: {
1526
1564
  readonly kind: "worker";
1527
1565
  readonly apiUrl: "https://status.topolo.app";
1528
1566
  readonly domains: readonly ["status.topolo.app"];
1529
- readonly routes: readonly [];
1567
+ readonly routes: readonly ["status.topolo.app"];
1530
1568
  readonly appId: "status";
1531
1569
  }];
1532
1570
  };
@@ -1611,7 +1649,7 @@ declare const APPLICATIONS: {
1611
1649
  readonly kind: "worker";
1612
1650
  readonly apiUrl: "https://voice.topolo.app";
1613
1651
  readonly domains: readonly ["voice.topolo.app"];
1614
- readonly routes: readonly [];
1652
+ readonly routes: readonly ["voice.topolo.app"];
1615
1653
  readonly appId: "voice";
1616
1654
  }, {
1617
1655
  readonly name: "topolo-voice-api";
@@ -1648,7 +1686,7 @@ declare const APPLICATIONS: {
1648
1686
  readonly kind: "worker";
1649
1687
  readonly apiUrl: "https://web.topolo.app";
1650
1688
  readonly domains: readonly ["web.topolo.app"];
1651
- readonly routes: readonly [];
1689
+ readonly routes: readonly ["web.topolo.app"];
1652
1690
  readonly appId: "web";
1653
1691
  }];
1654
1692
  };
@@ -1732,7 +1770,7 @@ declare const APPLICATION_REQUIREMENTS: readonly [{
1732
1770
  readonly summary: "Browser applications should feel like one platform and should not create isolated navigation or account surfaces.";
1733
1771
  readonly appliesTo: readonly ["browser"];
1734
1772
  readonly evidence: readonly ["@topolo-io/app-shell is used for the platform shell where the app has authenticated UI", "@topolo-io/app-launcher keeps the shared launcher/app switcher reachable from authenticated app chrome", "Account menu and sign-out behavior use TopoloAppShell or the ui-kit TopoloAccountMenu primitive", "Repeated app body surfaces use shared TopoloAppLayout primitives instead of local stat cards, empty states, or status badges", "Local preview supports deterministic visual QA fixtures for overview, list, detail, settings, and empty/loading states", "Authenticated app body content stays inside the viewport on mobile and desktop widths"];
1735
- readonly implementation: readonly ["Use @topolo-io/app-shell TopoloAppShell for authenticated app layouts", "Use the @topolo-io/ui-kit TopoloAccountMenu primitive when a partial-shell surface still needs account chrome", "Pass app-specific account actions as additive menu items instead of forking dropdowns", "Use shared design tokens and platform UI primitives before creating local equivalents", "Use TopoloAppMetricCard, TopoloAppEmptyState, TopoloAppStatusBadge, TopoloAppGrid, and TopoloAppSection for repeated app body patterns", "Keep visual QA fixtures available through visualQa=1 or __devpreview=1 so screenshot checks do not depend on live API state", "Keep mobile and desktop shell behavior aligned with the platform UI kit", "Constrain app-owned workspace wrappers with min-width: 0, width: auto, and viewport-aware max-width so shell padding cannot create page-level horizontal overflow"];
1773
+ readonly implementation: readonly ["Use @topolo-io/app-shell TopoloAppShell for authenticated app layouts", "Use the @topolo-io/ui-kit TopoloAccountMenu primitive when a partial-shell surface still needs account chrome", "Pass app-specific account actions as additive menu items instead of forking dropdowns", "Use shared design tokens and platform UI primitives before creating local equivalents", "Use TopoloAppMetricCard, TopoloAppEmptyState, TopoloAppStatusBadge, TopoloAppGrid, and TopoloAppSection for repeated app body patterns", "Keep visual QA fixtures available through visualQa=1 or __devpreview=1 so screenshot checks do not depend on live API state", "Keep mobile and desktop shell behavior aligned with the platform UI kit", "Constrain the app workspace-view layout wrappers with min-width: 0, width: auto, and viewport-aware max-width so shell padding cannot create page-level horizontal overflow"];
1736
1774
  }, {
1737
1775
  readonly id: "app-registration-and-scopes";
1738
1776
  readonly title: "Register protected APIs as platform apps";
@@ -2325,4 +2363,4 @@ declare function createTopolo(options: TopoloClientOptions): {
2325
2363
  };
2326
2364
  type Topolo = ReturnType<typeof createTopolo>;
2327
2365
 
2328
- export { ACTION_CATALOG_DIGEST_ALGORITHM, APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationId, type ApplicationRequirement, type ApplicationRequirementAudit, type ApplicationRequirementFinding, type ApplicationRequirementMigrationItem, type ApplicationRequirementScope, type ApplicationRequirementScore, type ApplicationRequirementStatus, type ApplicationRequirementsAuditReport, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionAgentContract, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloActionPlan, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloQuickActionsWidget, type TopoloRecentActivityWidget, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetActionItem, type TopoloWidgetActivityItem, type TopoloWidgetApiResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetDraft, type TopoloWidgetMetric, type TopoloWidgetNotificationItem, type TopoloWidgetResponseOptions, type TopoloWidgetSnapshotMetadata, type TopoloWidgetSnapshotMetric, type TopoloWidgetType, type TopoloWidgetValidationResult, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloActionInput, validateTopoloWidgetResponse };
2366
+ export { ACTION_CATALOG_DIGEST_ALGORITHM, APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type ActionContractManifest, type ActionContractSource, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationId, type ApplicationRequirement, type ApplicationRequirementAudit, type ApplicationRequirementFinding, type ApplicationRequirementMigrationItem, type ApplicationRequirementScope, type ApplicationRequirementScore, type ApplicationRequirementStatus, type ApplicationRequirementsAuditReport, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionAgentContract, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloActionPlan, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloQuickActionsWidget, type TopoloRecentActivityWidget, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetActionItem, type TopoloWidgetActivityItem, type TopoloWidgetApiResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetDraft, type TopoloWidgetMetric, type TopoloWidgetNotificationItem, type TopoloWidgetResponseOptions, type TopoloWidgetSnapshotMetadata, type TopoloWidgetSnapshotMetric, type TopoloWidgetType, type TopoloWidgetValidationResult, actionContractCompleteness, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, enrichActionContract, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloActionInput, validateTopoloWidgetResponse };