@tangle-network/agent-provider-tangle 1.2.2 → 1.2.3
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 +2 -1
- package/dist/tangle-provider.js +7 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,7 +11,8 @@ Disabled attachments and aliases present in the profile are refused, including d
|
|
|
11
11
|
Per-turn backend overrides accept the same canonical attachment contract.
|
|
12
12
|
Remote managers still require an authenticated coordination URL reachable from the Sandbox.
|
|
13
13
|
Catalog support does not establish successful tool execution against a particular deployment.
|
|
14
|
-
The provider
|
|
14
|
+
The provider propagates catalog transport and validation errors unchanged, before provisioning.
|
|
15
|
+
A successfully read catalog without the selected backend reports its capabilities as unsupported.
|
|
15
16
|
Newer SDKs may also provide `getBackend()` as a lookup over the same catalog.
|
|
16
17
|
|
|
17
18
|
```ts
|
package/dist/tangle-provider.js
CHANGED
|
@@ -288,17 +288,14 @@ export function createTangleProvider(options) {
|
|
|
288
288
|
async function resolveBackend(client, backendType) {
|
|
289
289
|
if (backendType === undefined)
|
|
290
290
|
return undefined;
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
const catalog = await client.listBackends();
|
|
297
|
-
return catalog.backends.find((backend) => backend.type === backendType);
|
|
298
|
-
}
|
|
299
|
-
catch {
|
|
291
|
+
// A failed read is not evidence that the selected backend lacks support.
|
|
292
|
+
// Preserve the transport or validation error before any create effect.
|
|
293
|
+
if (client.getBackend)
|
|
294
|
+
return await client.getBackend(backendType);
|
|
295
|
+
if (!client.listBackends)
|
|
300
296
|
return undefined;
|
|
301
|
-
|
|
297
|
+
const catalog = await client.listBackends();
|
|
298
|
+
return catalog.backends.find((backend) => backend.type === backendType);
|
|
302
299
|
}
|
|
303
300
|
function assertProviderOperationOptions(options, label) {
|
|
304
301
|
if (options === undefined)
|