@topolo/sdk 0.9.10 → 0.10.0

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
@@ -427,8 +427,9 @@ declare class TopoloClient {
427
427
  }): Promise<T>;
428
428
  private executeResolvedAction;
429
429
  /**
430
- * Bundled generated registry for tooling that audits platform packaging, not
431
- * for deciding what the current credential may use.
430
+ * @deprecated Static fallback snapshot only. Use `searchServices()` (the
431
+ * live credential-scoped registry) for anything that decides behavior; this
432
+ * exists for offline packaging audits when the registry is unreachable.
432
433
  */
433
434
  listBundledServices(): TopoloServiceCatalogEntry[];
434
435
  /**
@@ -524,58 +525,20 @@ declare function actionContractCompleteness(
524
525
  action: ActionContractSource,
525
526
  ): Record<string, boolean>;
526
527
 
528
+ /**
529
+ * Bootstrap seed URLs — the ONLY static service endpoints in the SDK.
530
+ *
531
+ * `auth` and `developers` must be reachable before the live registry can be
532
+ * consulted at all: developers serves the service catalog itself, so resolving
533
+ * it through the catalog would recurse, and auth issues the credentials the
534
+ * catalog is scoped by. Every other application resolves from the live
535
+ * credential-scoped registry (see application-directory.ts and
536
+ * TopoloClient.resolveRequestService). Never add entries here — a new app
537
+ * belongs in the live registry, not in compiled client code.
538
+ */
527
539
  declare const APP_API_URLS: {
528
- readonly agent: "https://agent.topolo.app";
529
540
  readonly auth: "https://auth.topolo.app";
530
- readonly backup: "https://backup.topolo.app";
531
- readonly blog: "https://blog.topolo.app";
532
- readonly books: "https://books.topolo.app";
533
- readonly brand: "https://brand.topolo.app";
534
- readonly bugfix: "https://bugfix.topolo.app";
535
- readonly bytes: "https://bytes.topolo.app";
536
- readonly calendar: "https://calendar.topolo.app";
537
- readonly campaigns: "https://campaigns.topolo.app";
538
- readonly capacity: "https://capacity.topolo.app";
539
- readonly chat: "https://chat.topolo.app";
540
- readonly commerce: "https://commerce.topolo.app";
541
- readonly compose: "https://compose.topolo.app";
542
- readonly consent: "https://consent.topolo.app";
543
- readonly crm: "https://crm.topolo.app";
544
- readonly design: "https://design.topolo.app";
545
541
  readonly developers: "https://developers.topolo.app";
546
- readonly director: "https://director.topolo.app";
547
- readonly feed: "https://feed.topolo.app";
548
- readonly flow: "https://flow.topolo.app";
549
- readonly forecast: "https://forecast.topolo.app";
550
- readonly forms: "https://forms.topolo.app";
551
- readonly home: "https://home.topolo.app";
552
- readonly insights: "https://insights.topolo.app";
553
- readonly inventory: "https://inventory.topolo.app";
554
- readonly learn: "https://learn.topolo.app";
555
- readonly localize: "https://localize.topolo.app";
556
- readonly mail: "https://mail.topolo.app";
557
- readonly mdm: "https://mdm.topolo.app";
558
- readonly messages: "https://messages.topolo.app";
559
- readonly nexus: "https://nexus.topolo.app";
560
- readonly notify: "https://notify.topolo.app";
561
- readonly observability_watch: "https://observability-watch.topolo.app";
562
- readonly one: "https://www.topolo.app";
563
- readonly p2p: "https://p2p.topolo.app";
564
- readonly pay: "https://pay.topolo.app";
565
- readonly people: "https://people.topolo.app";
566
- readonly "quro.api": "https://api.ol0.me";
567
- readonly "quro.redirect": "https://ol0.me";
568
- readonly roadmapper: "https://roadmapper.topolo.app";
569
- readonly sign: "https://sign.topolo.app";
570
- readonly social_studio: "https://studio.topolo.app";
571
- readonly socialize: "https://socialize.topolo.app";
572
- readonly spaces: "https://spaces.topolo.app";
573
- readonly status: "https://status.topolo.app";
574
- readonly success: "https://success.topolo.app";
575
- readonly support: "https://support.topolo.app";
576
- readonly survey: "https://survey.topolo.app";
577
- readonly voice: "https://voice.topolo.app";
578
- readonly web: "https://web.topolo.app";
579
542
  };
580
543
  type AppApiId = keyof typeof APP_API_URLS;
581
544
 
@@ -1791,11 +1754,102 @@ declare const APPLICATIONS: {
1791
1754
  }];
1792
1755
  };
1793
1756
  };
1794
- type ApplicationId = keyof typeof APPLICATIONS;
1795
- type ApplicationCatalogEntry = (typeof APPLICATIONS)[ApplicationId];
1796
- type ApplicationDeployTarget = ApplicationCatalogEntry['deployTargets'][number];
1797
1757
 
1798
- declare const APPLICATION_REQUIREMENTS_VERSION = "2026-06-07.1";
1758
+ /**
1759
+ * Live application directory — resolve, enumerate, and identify platform
1760
+ * applications from the credential-scoped live registry.
1761
+ *
1762
+ * The platform scales to millions of constantly-changing applications, so no
1763
+ * compiled application map may gate behavior. The live registry
1764
+ * (`searchServices` / `getService` on the Catalog service) is the source of
1765
+ * truth. The bundled static snapshot (`applications-fallback.ts`) is consulted
1766
+ * ONLY when the registry is unreachable (network failure, no credential), and
1767
+ * as metadata enrichment for apps the registry already confirmed — it must
1768
+ * never cause a registry-known application to be rejected.
1769
+ */
1770
+
1771
+ interface ApplicationDeployTarget {
1772
+ name: string;
1773
+ kind: string;
1774
+ apiUrl: string | null;
1775
+ domains: readonly string[];
1776
+ routes: readonly string[];
1777
+ appId: string | null;
1778
+ }
1779
+ interface ApplicationCatalogEntry {
1780
+ id: string;
1781
+ appDir: string;
1782
+ name: string;
1783
+ packageName: string | null;
1784
+ productionUrl: string | null;
1785
+ services: readonly string[];
1786
+ deployTargets: readonly ApplicationDeployTarget[];
1787
+ }
1788
+ /**
1789
+ * Application ids are open-ended — they come from the live registry, not a
1790
+ * compiled union. Kept as a named alias for source compatibility.
1791
+ */
1792
+ type ApplicationId = string;
1793
+ /**
1794
+ * Derive the human-friendly application id from a live catalog entry: the
1795
+ * canonical slug with the vendor prefix stripped (`topolo-notify` → `notify`).
1796
+ * Falls back through name and appId (`app_topolo_notify` → `notify`). Never
1797
+ * consults a static map, so newly registered applications get a friendly id
1798
+ * without a client rebuild.
1799
+ */
1800
+ declare function friendlyAppId(entry: {
1801
+ appId: string;
1802
+ slug?: string | null;
1803
+ name?: string | null;
1804
+ }): string;
1805
+ /** Synthesize a catalog entry for an application known only to the live registry. */
1806
+ declare function applicationEntryFromCatalog(live: TopoloServiceCatalogEntry): ApplicationCatalogEntry;
1807
+ type ApplicationDirectorySource = 'live' | 'static_fallback';
1808
+ interface ApplicationDirectoryApplication {
1809
+ id: string;
1810
+ application: ApplicationCatalogEntry;
1811
+ source: 'live' | 'static';
1812
+ live: TopoloServiceCatalogEntry | null;
1813
+ }
1814
+ interface ApplicationDirectory {
1815
+ source: ApplicationDirectorySource;
1816
+ applications: ApplicationDirectoryApplication[];
1817
+ }
1818
+ /** The subset of TopoloClient the directory helpers need (test-injectable). */
1819
+ interface ApplicationDirectoryClient {
1820
+ searchServices(options?: {
1821
+ query?: string;
1822
+ cursor?: string;
1823
+ limit?: number;
1824
+ }): Promise<{
1825
+ services: TopoloServiceCatalogEntry[];
1826
+ page: {
1827
+ nextCursor: string | null;
1828
+ };
1829
+ }>;
1830
+ getService(application: string): Promise<TopoloServiceCatalogEntry>;
1831
+ }
1832
+ /** Static snapshot as a directory — the registry-unreachable fallback. */
1833
+ declare function staticApplicationDirectory(): ApplicationDirectory;
1834
+ /**
1835
+ * Enumerate every application the current credential can see in the live
1836
+ * registry (walking the continuation cursor to exhaustion). Falls back to the
1837
+ * bundled static snapshot only when the registry cannot be reached — pass
1838
+ * `null` as the client to request the fallback explicitly (e.g. no credential
1839
+ * configured).
1840
+ */
1841
+ declare function listApplicationDirectory(client: ApplicationDirectoryClient | null): Promise<ApplicationDirectory>;
1842
+ declare function formatDirectoryApplicationIds(directory: ApplicationDirectory): string;
1843
+ /**
1844
+ * Resolve one application by id, slug, or name against the live registry.
1845
+ * Registry-known apps always resolve — the static snapshot can only enrich
1846
+ * them, never reject them. When the registry is reachable and does not know
1847
+ * the application, the error lists the live ids. When the registry is
1848
+ * unreachable (or `client` is null), the static snapshot answers instead.
1849
+ */
1850
+ declare function resolveApplicationDirectoryEntry(client: ApplicationDirectoryClient | null, application: string): Promise<ApplicationDirectoryApplication>;
1851
+
1852
+ declare const APPLICATION_REQUIREMENTS_VERSION = "2026-08-11.1";
1799
1853
  type ApplicationRequirementScope = 'all' | 'browser' | 'api' | 'tooling' | 'agent_surface';
1800
1854
  interface ApplicationRequirement {
1801
1855
  id: string;
@@ -1848,8 +1902,8 @@ declare const APPLICATION_REQUIREMENTS: readonly [{
1848
1902
  readonly title: "Register the application in platform metadata";
1849
1903
  readonly summary: "Every app must have a stable application ID, CloudControl metadata for deployed surfaces, and package metadata where code is shipped.";
1850
1904
  readonly appliesTo: readonly ["all"];
1851
- readonly evidence: readonly ["topolo.cloudcontrol.json exists for every deployed app surface", "package.json names the package or app when the repo ships code", "The SDK application catalog exposes the app through topolo apps and MCP discovery"];
1852
- readonly implementation: readonly ["Add the app to the SDK application catalog generator before exposing it to agents", "Keep production URLs, Worker names, Pages projects, routes, domains, and bindings current in CloudControl metadata", "Do not leave a new Topolo* app directory without an explicit application ID"];
1905
+ readonly evidence: readonly ["topolo.cloudcontrol.json exists for every deployed app surface", "package.json names the package or app when the repo ships code", "The live platform registry exposes the app through topolo apps and MCP discovery"];
1906
+ readonly implementation: readonly ["Register the app in the live platform registry (Auth service catalog) before exposing it to agents", "Keep production URLs, Worker names, Pages projects, routes, domains, and bindings current in CloudControl metadata", "Do not leave a new Topolo* app directory without an explicit application ID"];
1853
1907
  }, {
1854
1908
  readonly id: "canonical-docs";
1855
1909
  readonly title: "Update canonical docs with the code change";
@@ -1877,7 +1931,7 @@ declare const APPLICATION_REQUIREMENTS: readonly [{
1877
1931
  readonly summary: "Callable app APIs need a stable app ID, app slug, permissions, role bundles, and API-key scopes before agents or users rely on them.";
1878
1932
  readonly appliesTo: readonly ["api"];
1879
1933
  readonly evidence: readonly ["Auth app catalog contains the app ID and slug", "Permissions, role bundles, and API-key scopes exist for the app", "SDK, CLI, and MCP app discovery include the callable production API", "CloudControl production HTTP targets classify agent reachability with sdk_app_id or agent_callable:false"];
1880
- readonly implementation: readonly ["Add production Worker api_url metadata and sdk_app_id for every agent-callable API target", "Mark browser, documentation, and runtime-only Worker targets with agent_callable:false", "Expose stable app IDs through generated DEFAULT_APP_URLS and live catalog discovery", "Keep typed SDK/CLI/MCP surfaces in sync when an API contract stabilizes"];
1934
+ readonly implementation: readonly ["Add production Worker api_url metadata and sdk_app_id for every agent-callable API target", "Mark browser, documentation, and runtime-only Worker targets with agent_callable:false", "Expose stable app IDs through live catalog discovery", "Keep typed SDK/CLI/MCP surfaces in sync when an API contract stabilizes"];
1881
1935
  }, {
1882
1936
  readonly id: "organization-scoped-data";
1883
1937
  readonly title: "Keep application data organization-scoped";
@@ -1924,24 +1978,33 @@ declare const APPLICATION_REQUIREMENTS: readonly [{
1924
1978
  declare function applicationRequirementScopes(application: ApplicationCatalogEntry): ApplicationRequirementScope[];
1925
1979
  declare function requirementsForApplication(applicationOrId: ApplicationCatalogEntry | ApplicationId): ApplicationRequirement[];
1926
1980
  declare function auditApplicationRequirements(applicationOrId: ApplicationCatalogEntry | ApplicationId): ApplicationRequirementAudit;
1981
+ /**
1982
+ * Build the full audit report for a set of already-resolved catalog entries.
1983
+ * Live callers resolve entries through the application directory and pass them
1984
+ * here; the id-based wrapper below serves only the static-fallback path.
1985
+ */
1986
+ declare function auditApplicationEntries(applications: readonly ApplicationCatalogEntry[]): ApplicationRequirementsAuditReport;
1927
1987
  declare function auditAllApplicationRequirements(applicationIds?: readonly ApplicationId[]): ApplicationRequirementsAuditReport;
1928
1988
 
1929
1989
  /**
1930
- * App API registry — base URLs for callable Topolo platform APIs.
1990
+ * Service URL resolution.
1931
1991
  *
1932
- * Source of truth lives in each app's `topolo.cloudcontrol.json`. The
1933
- * `APP_API_URLS` map is regenerated from those files via
1934
- * `scripts/generate-services.mjs`; edit the JSON, not the generated file.
1992
+ * The live credential-scoped registry is the source of truth for every
1993
+ * callable application (see application-directory.ts and
1994
+ * `TopoloClient.searchServices`). The only static URLs the SDK ships are the
1995
+ * bootstrap seeds in `bootstrap-services.ts` (`auth` + `developers`) — the two
1996
+ * endpoints that must be reachable before the registry can be consulted.
1935
1997
  *
1936
- * Any entry can be overridden per-call via `TopoloClient` options, or globally
1937
- * via env vars like `TOPOLO_APP_URL_MAIL` or `TOPOLO_APP_URL_WEB_API`
1938
- * (dots in app API keys become underscores in env vars).
1998
+ * Any URL can be overridden per-call via `TopoloClient` options, or globally
1999
+ * via env vars like `TOPOLO_APP_URL_AUTH` (dots in service keys become
2000
+ * underscores in env vars).
1939
2001
  *
1940
2002
  * IMPORTANT: The SDK NEVER accepts `orgId` as a parameter. Every request is
1941
2003
  * scoped to the organization embedded in the auth credential (JWT claim or
1942
2004
  * API-key binding). This is the load-bearing cross-org isolation guarantee.
1943
2005
  */
1944
2006
 
2007
+ /** Bootstrap seed URLs (auth + developers). Kept under the legacy name. */
1945
2008
  declare const DEFAULT_APP_URLS: Record<AppApiId, string>;
1946
2009
  interface ServiceCatalogUrlEntry {
1947
2010
  appId?: string | null;
@@ -1956,7 +2019,7 @@ declare function resolveCatalogServiceUrl(entry: ServiceCatalogUrlEntry, options
1956
2019
  serviceKey?: string;
1957
2020
  overrides?: Record<string, string> | Partial<Record<AppApiId, string>>;
1958
2021
  }): string | null;
1959
- declare function resolveServiceUrl(service: AppApiId, overrides?: Partial<Record<AppApiId, string>>): string;
2022
+ declare function resolveServiceUrl(service: AppApiId, overrides?: Partial<Record<AppApiId, string>> | Record<string, string>): string;
1960
2023
 
1961
2024
  declare class TopoloSdkError extends Error {
1962
2025
  readonly code: string;
@@ -2546,4 +2609,4 @@ declare function createTopolo(options: TopoloClientOptions): {
2546
2609
  };
2547
2610
  type Topolo = ReturnType<typeof createTopolo>;
2548
2611
 
2549
- 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 TopoloActionUploadOptions, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloInlineBase64UploadContract, 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, type TopoloWorkspace, type TopoloWorkspaceListResult, type TopoloWorkspaceMutationResult, type TopoloWorkspacePolicy, WorkspacesModule, actionContractCompleteness, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, enrichActionContract, parseTopoloActionUploadContract, prepareTopoloActionBase64UploadInput, prepareTopoloActionUploadInput, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloActionInput, validateTopoloWidgetResponse };
2612
+ export { ACTION_CATALOG_DIGEST_ALGORITHM, APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type ActionContractManifest, type ActionContractSource, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationDirectory, type ApplicationDirectoryApplication, type ApplicationDirectoryClient, type ApplicationDirectorySource, 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 TopoloActionUploadOptions, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloInlineBase64UploadContract, 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, type TopoloWorkspace, type TopoloWorkspaceListResult, type TopoloWorkspaceMutationResult, type TopoloWorkspacePolicy, WorkspacesModule, actionContractCompleteness, applicationEntryFromCatalog, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationEntries, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, enrichActionContract, formatDirectoryApplicationIds, friendlyAppId, listApplicationDirectory, parseTopoloActionUploadContract, prepareTopoloActionBase64UploadInput, prepareTopoloActionUploadInput, requirementsForApplication, resolveApplicationDirectoryEntry, resolveCatalogServiceUrl, resolveServiceUrl, staticApplicationDirectory, validateTopoloActionInput, validateTopoloWidgetResponse };
package/dist/index.d.ts CHANGED
@@ -427,8 +427,9 @@ declare class TopoloClient {
427
427
  }): Promise<T>;
428
428
  private executeResolvedAction;
429
429
  /**
430
- * Bundled generated registry for tooling that audits platform packaging, not
431
- * for deciding what the current credential may use.
430
+ * @deprecated Static fallback snapshot only. Use `searchServices()` (the
431
+ * live credential-scoped registry) for anything that decides behavior; this
432
+ * exists for offline packaging audits when the registry is unreachable.
432
433
  */
433
434
  listBundledServices(): TopoloServiceCatalogEntry[];
434
435
  /**
@@ -524,58 +525,20 @@ declare function actionContractCompleteness(
524
525
  action: ActionContractSource,
525
526
  ): Record<string, boolean>;
526
527
 
528
+ /**
529
+ * Bootstrap seed URLs — the ONLY static service endpoints in the SDK.
530
+ *
531
+ * `auth` and `developers` must be reachable before the live registry can be
532
+ * consulted at all: developers serves the service catalog itself, so resolving
533
+ * it through the catalog would recurse, and auth issues the credentials the
534
+ * catalog is scoped by. Every other application resolves from the live
535
+ * credential-scoped registry (see application-directory.ts and
536
+ * TopoloClient.resolveRequestService). Never add entries here — a new app
537
+ * belongs in the live registry, not in compiled client code.
538
+ */
527
539
  declare const APP_API_URLS: {
528
- readonly agent: "https://agent.topolo.app";
529
540
  readonly auth: "https://auth.topolo.app";
530
- readonly backup: "https://backup.topolo.app";
531
- readonly blog: "https://blog.topolo.app";
532
- readonly books: "https://books.topolo.app";
533
- readonly brand: "https://brand.topolo.app";
534
- readonly bugfix: "https://bugfix.topolo.app";
535
- readonly bytes: "https://bytes.topolo.app";
536
- readonly calendar: "https://calendar.topolo.app";
537
- readonly campaigns: "https://campaigns.topolo.app";
538
- readonly capacity: "https://capacity.topolo.app";
539
- readonly chat: "https://chat.topolo.app";
540
- readonly commerce: "https://commerce.topolo.app";
541
- readonly compose: "https://compose.topolo.app";
542
- readonly consent: "https://consent.topolo.app";
543
- readonly crm: "https://crm.topolo.app";
544
- readonly design: "https://design.topolo.app";
545
541
  readonly developers: "https://developers.topolo.app";
546
- readonly director: "https://director.topolo.app";
547
- readonly feed: "https://feed.topolo.app";
548
- readonly flow: "https://flow.topolo.app";
549
- readonly forecast: "https://forecast.topolo.app";
550
- readonly forms: "https://forms.topolo.app";
551
- readonly home: "https://home.topolo.app";
552
- readonly insights: "https://insights.topolo.app";
553
- readonly inventory: "https://inventory.topolo.app";
554
- readonly learn: "https://learn.topolo.app";
555
- readonly localize: "https://localize.topolo.app";
556
- readonly mail: "https://mail.topolo.app";
557
- readonly mdm: "https://mdm.topolo.app";
558
- readonly messages: "https://messages.topolo.app";
559
- readonly nexus: "https://nexus.topolo.app";
560
- readonly notify: "https://notify.topolo.app";
561
- readonly observability_watch: "https://observability-watch.topolo.app";
562
- readonly one: "https://www.topolo.app";
563
- readonly p2p: "https://p2p.topolo.app";
564
- readonly pay: "https://pay.topolo.app";
565
- readonly people: "https://people.topolo.app";
566
- readonly "quro.api": "https://api.ol0.me";
567
- readonly "quro.redirect": "https://ol0.me";
568
- readonly roadmapper: "https://roadmapper.topolo.app";
569
- readonly sign: "https://sign.topolo.app";
570
- readonly social_studio: "https://studio.topolo.app";
571
- readonly socialize: "https://socialize.topolo.app";
572
- readonly spaces: "https://spaces.topolo.app";
573
- readonly status: "https://status.topolo.app";
574
- readonly success: "https://success.topolo.app";
575
- readonly support: "https://support.topolo.app";
576
- readonly survey: "https://survey.topolo.app";
577
- readonly voice: "https://voice.topolo.app";
578
- readonly web: "https://web.topolo.app";
579
542
  };
580
543
  type AppApiId = keyof typeof APP_API_URLS;
581
544
 
@@ -1791,11 +1754,102 @@ declare const APPLICATIONS: {
1791
1754
  }];
1792
1755
  };
1793
1756
  };
1794
- type ApplicationId = keyof typeof APPLICATIONS;
1795
- type ApplicationCatalogEntry = (typeof APPLICATIONS)[ApplicationId];
1796
- type ApplicationDeployTarget = ApplicationCatalogEntry['deployTargets'][number];
1797
1757
 
1798
- declare const APPLICATION_REQUIREMENTS_VERSION = "2026-06-07.1";
1758
+ /**
1759
+ * Live application directory — resolve, enumerate, and identify platform
1760
+ * applications from the credential-scoped live registry.
1761
+ *
1762
+ * The platform scales to millions of constantly-changing applications, so no
1763
+ * compiled application map may gate behavior. The live registry
1764
+ * (`searchServices` / `getService` on the Catalog service) is the source of
1765
+ * truth. The bundled static snapshot (`applications-fallback.ts`) is consulted
1766
+ * ONLY when the registry is unreachable (network failure, no credential), and
1767
+ * as metadata enrichment for apps the registry already confirmed — it must
1768
+ * never cause a registry-known application to be rejected.
1769
+ */
1770
+
1771
+ interface ApplicationDeployTarget {
1772
+ name: string;
1773
+ kind: string;
1774
+ apiUrl: string | null;
1775
+ domains: readonly string[];
1776
+ routes: readonly string[];
1777
+ appId: string | null;
1778
+ }
1779
+ interface ApplicationCatalogEntry {
1780
+ id: string;
1781
+ appDir: string;
1782
+ name: string;
1783
+ packageName: string | null;
1784
+ productionUrl: string | null;
1785
+ services: readonly string[];
1786
+ deployTargets: readonly ApplicationDeployTarget[];
1787
+ }
1788
+ /**
1789
+ * Application ids are open-ended — they come from the live registry, not a
1790
+ * compiled union. Kept as a named alias for source compatibility.
1791
+ */
1792
+ type ApplicationId = string;
1793
+ /**
1794
+ * Derive the human-friendly application id from a live catalog entry: the
1795
+ * canonical slug with the vendor prefix stripped (`topolo-notify` → `notify`).
1796
+ * Falls back through name and appId (`app_topolo_notify` → `notify`). Never
1797
+ * consults a static map, so newly registered applications get a friendly id
1798
+ * without a client rebuild.
1799
+ */
1800
+ declare function friendlyAppId(entry: {
1801
+ appId: string;
1802
+ slug?: string | null;
1803
+ name?: string | null;
1804
+ }): string;
1805
+ /** Synthesize a catalog entry for an application known only to the live registry. */
1806
+ declare function applicationEntryFromCatalog(live: TopoloServiceCatalogEntry): ApplicationCatalogEntry;
1807
+ type ApplicationDirectorySource = 'live' | 'static_fallback';
1808
+ interface ApplicationDirectoryApplication {
1809
+ id: string;
1810
+ application: ApplicationCatalogEntry;
1811
+ source: 'live' | 'static';
1812
+ live: TopoloServiceCatalogEntry | null;
1813
+ }
1814
+ interface ApplicationDirectory {
1815
+ source: ApplicationDirectorySource;
1816
+ applications: ApplicationDirectoryApplication[];
1817
+ }
1818
+ /** The subset of TopoloClient the directory helpers need (test-injectable). */
1819
+ interface ApplicationDirectoryClient {
1820
+ searchServices(options?: {
1821
+ query?: string;
1822
+ cursor?: string;
1823
+ limit?: number;
1824
+ }): Promise<{
1825
+ services: TopoloServiceCatalogEntry[];
1826
+ page: {
1827
+ nextCursor: string | null;
1828
+ };
1829
+ }>;
1830
+ getService(application: string): Promise<TopoloServiceCatalogEntry>;
1831
+ }
1832
+ /** Static snapshot as a directory — the registry-unreachable fallback. */
1833
+ declare function staticApplicationDirectory(): ApplicationDirectory;
1834
+ /**
1835
+ * Enumerate every application the current credential can see in the live
1836
+ * registry (walking the continuation cursor to exhaustion). Falls back to the
1837
+ * bundled static snapshot only when the registry cannot be reached — pass
1838
+ * `null` as the client to request the fallback explicitly (e.g. no credential
1839
+ * configured).
1840
+ */
1841
+ declare function listApplicationDirectory(client: ApplicationDirectoryClient | null): Promise<ApplicationDirectory>;
1842
+ declare function formatDirectoryApplicationIds(directory: ApplicationDirectory): string;
1843
+ /**
1844
+ * Resolve one application by id, slug, or name against the live registry.
1845
+ * Registry-known apps always resolve — the static snapshot can only enrich
1846
+ * them, never reject them. When the registry is reachable and does not know
1847
+ * the application, the error lists the live ids. When the registry is
1848
+ * unreachable (or `client` is null), the static snapshot answers instead.
1849
+ */
1850
+ declare function resolveApplicationDirectoryEntry(client: ApplicationDirectoryClient | null, application: string): Promise<ApplicationDirectoryApplication>;
1851
+
1852
+ declare const APPLICATION_REQUIREMENTS_VERSION = "2026-08-11.1";
1799
1853
  type ApplicationRequirementScope = 'all' | 'browser' | 'api' | 'tooling' | 'agent_surface';
1800
1854
  interface ApplicationRequirement {
1801
1855
  id: string;
@@ -1848,8 +1902,8 @@ declare const APPLICATION_REQUIREMENTS: readonly [{
1848
1902
  readonly title: "Register the application in platform metadata";
1849
1903
  readonly summary: "Every app must have a stable application ID, CloudControl metadata for deployed surfaces, and package metadata where code is shipped.";
1850
1904
  readonly appliesTo: readonly ["all"];
1851
- readonly evidence: readonly ["topolo.cloudcontrol.json exists for every deployed app surface", "package.json names the package or app when the repo ships code", "The SDK application catalog exposes the app through topolo apps and MCP discovery"];
1852
- readonly implementation: readonly ["Add the app to the SDK application catalog generator before exposing it to agents", "Keep production URLs, Worker names, Pages projects, routes, domains, and bindings current in CloudControl metadata", "Do not leave a new Topolo* app directory without an explicit application ID"];
1905
+ readonly evidence: readonly ["topolo.cloudcontrol.json exists for every deployed app surface", "package.json names the package or app when the repo ships code", "The live platform registry exposes the app through topolo apps and MCP discovery"];
1906
+ readonly implementation: readonly ["Register the app in the live platform registry (Auth service catalog) before exposing it to agents", "Keep production URLs, Worker names, Pages projects, routes, domains, and bindings current in CloudControl metadata", "Do not leave a new Topolo* app directory without an explicit application ID"];
1853
1907
  }, {
1854
1908
  readonly id: "canonical-docs";
1855
1909
  readonly title: "Update canonical docs with the code change";
@@ -1877,7 +1931,7 @@ declare const APPLICATION_REQUIREMENTS: readonly [{
1877
1931
  readonly summary: "Callable app APIs need a stable app ID, app slug, permissions, role bundles, and API-key scopes before agents or users rely on them.";
1878
1932
  readonly appliesTo: readonly ["api"];
1879
1933
  readonly evidence: readonly ["Auth app catalog contains the app ID and slug", "Permissions, role bundles, and API-key scopes exist for the app", "SDK, CLI, and MCP app discovery include the callable production API", "CloudControl production HTTP targets classify agent reachability with sdk_app_id or agent_callable:false"];
1880
- readonly implementation: readonly ["Add production Worker api_url metadata and sdk_app_id for every agent-callable API target", "Mark browser, documentation, and runtime-only Worker targets with agent_callable:false", "Expose stable app IDs through generated DEFAULT_APP_URLS and live catalog discovery", "Keep typed SDK/CLI/MCP surfaces in sync when an API contract stabilizes"];
1934
+ readonly implementation: readonly ["Add production Worker api_url metadata and sdk_app_id for every agent-callable API target", "Mark browser, documentation, and runtime-only Worker targets with agent_callable:false", "Expose stable app IDs through live catalog discovery", "Keep typed SDK/CLI/MCP surfaces in sync when an API contract stabilizes"];
1881
1935
  }, {
1882
1936
  readonly id: "organization-scoped-data";
1883
1937
  readonly title: "Keep application data organization-scoped";
@@ -1924,24 +1978,33 @@ declare const APPLICATION_REQUIREMENTS: readonly [{
1924
1978
  declare function applicationRequirementScopes(application: ApplicationCatalogEntry): ApplicationRequirementScope[];
1925
1979
  declare function requirementsForApplication(applicationOrId: ApplicationCatalogEntry | ApplicationId): ApplicationRequirement[];
1926
1980
  declare function auditApplicationRequirements(applicationOrId: ApplicationCatalogEntry | ApplicationId): ApplicationRequirementAudit;
1981
+ /**
1982
+ * Build the full audit report for a set of already-resolved catalog entries.
1983
+ * Live callers resolve entries through the application directory and pass them
1984
+ * here; the id-based wrapper below serves only the static-fallback path.
1985
+ */
1986
+ declare function auditApplicationEntries(applications: readonly ApplicationCatalogEntry[]): ApplicationRequirementsAuditReport;
1927
1987
  declare function auditAllApplicationRequirements(applicationIds?: readonly ApplicationId[]): ApplicationRequirementsAuditReport;
1928
1988
 
1929
1989
  /**
1930
- * App API registry — base URLs for callable Topolo platform APIs.
1990
+ * Service URL resolution.
1931
1991
  *
1932
- * Source of truth lives in each app's `topolo.cloudcontrol.json`. The
1933
- * `APP_API_URLS` map is regenerated from those files via
1934
- * `scripts/generate-services.mjs`; edit the JSON, not the generated file.
1992
+ * The live credential-scoped registry is the source of truth for every
1993
+ * callable application (see application-directory.ts and
1994
+ * `TopoloClient.searchServices`). The only static URLs the SDK ships are the
1995
+ * bootstrap seeds in `bootstrap-services.ts` (`auth` + `developers`) — the two
1996
+ * endpoints that must be reachable before the registry can be consulted.
1935
1997
  *
1936
- * Any entry can be overridden per-call via `TopoloClient` options, or globally
1937
- * via env vars like `TOPOLO_APP_URL_MAIL` or `TOPOLO_APP_URL_WEB_API`
1938
- * (dots in app API keys become underscores in env vars).
1998
+ * Any URL can be overridden per-call via `TopoloClient` options, or globally
1999
+ * via env vars like `TOPOLO_APP_URL_AUTH` (dots in service keys become
2000
+ * underscores in env vars).
1939
2001
  *
1940
2002
  * IMPORTANT: The SDK NEVER accepts `orgId` as a parameter. Every request is
1941
2003
  * scoped to the organization embedded in the auth credential (JWT claim or
1942
2004
  * API-key binding). This is the load-bearing cross-org isolation guarantee.
1943
2005
  */
1944
2006
 
2007
+ /** Bootstrap seed URLs (auth + developers). Kept under the legacy name. */
1945
2008
  declare const DEFAULT_APP_URLS: Record<AppApiId, string>;
1946
2009
  interface ServiceCatalogUrlEntry {
1947
2010
  appId?: string | null;
@@ -1956,7 +2019,7 @@ declare function resolveCatalogServiceUrl(entry: ServiceCatalogUrlEntry, options
1956
2019
  serviceKey?: string;
1957
2020
  overrides?: Record<string, string> | Partial<Record<AppApiId, string>>;
1958
2021
  }): string | null;
1959
- declare function resolveServiceUrl(service: AppApiId, overrides?: Partial<Record<AppApiId, string>>): string;
2022
+ declare function resolveServiceUrl(service: AppApiId, overrides?: Partial<Record<AppApiId, string>> | Record<string, string>): string;
1960
2023
 
1961
2024
  declare class TopoloSdkError extends Error {
1962
2025
  readonly code: string;
@@ -2546,4 +2609,4 @@ declare function createTopolo(options: TopoloClientOptions): {
2546
2609
  };
2547
2610
  type Topolo = ReturnType<typeof createTopolo>;
2548
2611
 
2549
- 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 TopoloActionUploadOptions, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloInlineBase64UploadContract, 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, type TopoloWorkspace, type TopoloWorkspaceListResult, type TopoloWorkspaceMutationResult, type TopoloWorkspacePolicy, WorkspacesModule, actionContractCompleteness, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, enrichActionContract, parseTopoloActionUploadContract, prepareTopoloActionBase64UploadInput, prepareTopoloActionUploadInput, requirementsForApplication, resolveCatalogServiceUrl, resolveServiceUrl, validateTopoloActionInput, validateTopoloWidgetResponse };
2612
+ export { ACTION_CATALOG_DIGEST_ALGORITHM, APPLICATIONS, APPLICATION_REQUIREMENTS, APPLICATION_REQUIREMENTS_VERSION, type ActionContractManifest, type ActionContractSource, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationDirectory, type ApplicationDirectoryApplication, type ApplicationDirectoryClient, type ApplicationDirectorySource, 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 TopoloActionUploadOptions, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloInlineBase64UploadContract, 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, type TopoloWorkspace, type TopoloWorkspaceListResult, type TopoloWorkspaceMutationResult, type TopoloWorkspacePolicy, WorkspacesModule, actionContractCompleteness, applicationEntryFromCatalog, applicationRequirementScopes, auditAllApplicationRequirements, auditApplicationEntries, auditApplicationRequirements, createTopolo, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloQuickActionsWidget, defineTopoloRecentActivityWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, enrichActionContract, formatDirectoryApplicationIds, friendlyAppId, listApplicationDirectory, parseTopoloActionUploadContract, prepareTopoloActionBase64UploadInput, prepareTopoloActionUploadInput, requirementsForApplication, resolveApplicationDirectoryEntry, resolveCatalogServiceUrl, resolveServiceUrl, staticApplicationDirectory, validateTopoloActionInput, validateTopoloWidgetResponse };