@topolo/sdk 0.3.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -4,6 +4,11 @@ Typed client SDK for the Topolo platform. Consumed by `@topolo/cli` and
4
4
  `@topolo/mcp`, and available to any first- or third-party code that needs to
5
5
  call Topolo APIs on a user's behalf.
6
6
 
7
+ Use `@topolo/login` for Login with Topolo OAuth/OIDC provider integration,
8
+ token exchange, userinfo, ID-token verification, and local account linking.
9
+ Use `@topolo/sdk` after login, when the app already has a Topolo API credential
10
+ and needs to call Topolo APIs.
11
+
7
12
  This package is the single place where cross-org isolation is enforced on the
8
13
  client side.
9
14
 
@@ -80,9 +85,16 @@ Additional modules land per-app as each backend contract stabilizes.
80
85
  ## Application catalog
81
86
 
82
87
  `APPLICATIONS` describes every Topolo platform application discovered from the
83
- PlatformApplications metadata, including pages-only apps that do not expose a
84
- callable service. `DEFAULT_SERVICE_URLS` remains the callable API service map
85
- used by `TopoloClient`.
88
+ PlatformApplications metadata, including Worker apps that do not expose a
89
+ callable service. `DEFAULT_SERVICE_URLS` is the bundled callable API service
90
+ snapshot generated from `topolo.cloudcontrol.json`.
91
+
92
+ For agent-scale fleets, the bundle is a floor, not a cap. `TopoloClient.request`
93
+ accepts bundled service IDs and live Auth-catalog service IDs/slugs. When a
94
+ service is not in the bundled snapshot, the client resolves the selected
95
+ environment's live catalog and only routes entries marked as API/technical
96
+ service surfaces. Browser/runtime surfaces are not treated as generic API
97
+ targets.
86
98
 
87
99
  `APPLICATION_REQUIREMENTS` is the versioned app-build contract agents should
88
100
  read before creating or expanding a Topolo app. `requirementsForApplication()`
@@ -103,7 +115,7 @@ their own `GET /api/widget` endpoint. The SDK owns the shared payload contract:
103
115
  import { createTopoloWidgetResponse } from '@topolo/sdk';
104
116
 
105
117
  return Response.json(createTopoloWidgetResponse({
106
- serviceId: 'srv_topolo_example',
118
+ serviceId: '<runtime-service-id>',
107
119
  serviceName: 'Example',
108
120
  widgets: [
109
121
  {
@@ -139,7 +151,7 @@ Still routes through auth + audit headers. Mutating methods still require
139
151
  | `TopoloHttpError` | Other non-2xx responses |
140
152
  | `TopoloSdkError` | Base class |
141
153
 
142
- ## Service URL overrides
154
+ ## Service URL Overrides
143
155
 
144
156
  Defaults target production. Override per-service for staging/dev:
145
157