@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/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,19 @@ 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
|
|
84
|
-
callable service. `DEFAULT_SERVICE_URLS`
|
|
85
|
-
|
|
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 packaging metadata, not an authorization
|
|
93
|
+
source. `TopoloClient.listServices()` always calls the live TopoloAuth catalog
|
|
94
|
+
with the current credential and returns only services that credential can use in
|
|
95
|
+
its organization, including the granted permissions. `TopoloClient.request()`
|
|
96
|
+
uses that credential-scoped catalog before routing any non-Auth service, so a
|
|
97
|
+
bundled service ID is only a convenient alias after Auth confirms access.
|
|
98
|
+
|
|
99
|
+
`listBundledServices()` is available for packaging/audit tooling that needs the
|
|
100
|
+
generated snapshot. Do not use it to decide what an end user or agent may call.
|
|
86
101
|
|
|
87
102
|
`APPLICATION_REQUIREMENTS` is the versioned app-build contract agents should
|
|
88
103
|
read before creating or expanding a Topolo app. `requirementsForApplication()`
|
|
@@ -139,7 +154,7 @@ Still routes through auth + audit headers. Mutating methods still require
|
|
|
139
154
|
| `TopoloHttpError` | Other non-2xx responses |
|
|
140
155
|
| `TopoloSdkError` | Base class |
|
|
141
156
|
|
|
142
|
-
## Service URL
|
|
157
|
+
## Service URL Overrides
|
|
143
158
|
|
|
144
159
|
Defaults target production. Override per-service for staging/dev:
|
|
145
160
|
|