@tinycloud/node-sdk 3.3.0-beta.24 → 3.3.0-beta.25
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/{TinyCloudNode-Cm8kblSj.d.cts → TinyCloudNode-DeV-L_14.d.cts} +3 -1
- package/dist/{TinyCloudNode-Cm8kblSj.d.ts → TinyCloudNode-DeV-L_14.d.ts} +3 -1
- package/dist/{authority-S-huUKlr.d.cts → authority-BO2VqGnD.d.cts} +1 -1
- package/dist/{authority-CPSGMw2l.d.ts → authority-CtsxSAoP.d.ts} +1 -1
- package/dist/core.cjs +34 -17
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +34 -17
- package/dist/core.js.map +1 -1
- package/dist/index.cjs +34 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +34 -17
- package/dist/index.js.map +1 -1
- package/dist/replication/authority.d.cts +2 -2
- package/dist/replication/authority.d.ts +2 -2
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tinycloud_sdk_core from '@tinycloud/sdk-core';
|
|
2
|
-
import { AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, CapabilityPresentationEnvelopeV1, IUserAuthorization, ISigner, ISessionStorage, ISpaceCreationHandler, RegistryPolicy, RegistrySequenceStore, OnNodeNotFound, LocalNodeIdentityStore, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ReplicationOptions, TinyCloudSession, PersistedSessionData, ClientSession, PermissionEntry, Extension, SignRequest, SpaceHostResult, SignInOptions, Delegation, DelegatedResource, TelemetryConfig, ServiceContext, IKVService, ISQLService, IDuckDbService, IHooksService, CreateOwnerDelegationParams as CreateOwnerDelegationParams$1, OwnerDelegationReceipt as OwnerDelegationReceipt$1, StorageFullEvent, IStorageService, INotificationHandler, IENSResolver, KVReplicaStorage, AccountService, InvokeAnyFunction as InvokeAnyFunction$1, UnifiedPolicyCapability, RegisterPolicyV3Input, RegisterPolicyV3Receipt, CanonicalJson, ShareDeliveryAuthorizationV3Receipt, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, DelegationResult, DelegationRevocationReceipt, DelegationStatus, ServiceSession, ReplicationControl, ResolvedDelegate } from '@tinycloud/sdk-core';
|
|
2
|
+
import { AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, CapabilityPresentationEnvelopeV1, IUserAuthorization, ISigner, ISessionStorage, ISpaceCreationHandler, RegistryPolicy, RegistrySequenceStore, OnNodeNotFound, LocalNodeIdentityStore, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ReplicationOptions, TinyCloudSession, PersistedSessionData, ClientSession, PermissionEntry, Extension, SignRequest, SpaceHostResult, SignInOptions, Delegation, DelegatedResource, TelemetryConfig, ServiceContext, IKVService, ISQLService, IDuckDbService, IHooksService, CreateOwnerDelegationParams as CreateOwnerDelegationParams$1, OwnerDelegationReceipt as OwnerDelegationReceipt$1, StorageFullEvent, IStorageService, INotificationHandler, IENSResolver, RetryPolicy, KVReplicaStorage, AccountService, InvokeAnyFunction as InvokeAnyFunction$1, UnifiedPolicyCapability, RegisterPolicyV3Input, RegisterPolicyV3Receipt, CanonicalJson, ShareDeliveryAuthorizationV3Receipt, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, DelegationResult, DelegationRevocationReceipt, DelegationStatus, ServiceSession, ReplicationControl, ResolvedDelegate } from '@tinycloud/sdk-core';
|
|
3
3
|
import { ReplicaSessionStamp } from '@tinycloud/sdk-services/kv/replication';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
import { InvokeFunction, InvokeAnyFunction, FetchFunction } from '@tinycloud/sdk-services';
|
|
@@ -1324,6 +1324,8 @@ interface TinyCloudNodeConfig {
|
|
|
1324
1324
|
autoBootstrapAccount?: boolean;
|
|
1325
1325
|
/** Default-off service telemetry. */
|
|
1326
1326
|
telemetry?: TelemetryConfig;
|
|
1327
|
+
/** Retry of node busy/timeout answers; `{ maxAttempts: 1 }` disables it. See {@link RetryPolicy}. */
|
|
1328
|
+
retryPolicy?: Partial<RetryPolicy>;
|
|
1327
1329
|
/**
|
|
1328
1330
|
* Optional read-through replica configuration; disabled unless explicitly enabled.
|
|
1329
1331
|
* Node profile mutations require `profileDir` and a caller-supplied `profileGuard` holding
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _tinycloud_sdk_core from '@tinycloud/sdk-core';
|
|
2
|
-
import { AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, CapabilityPresentationEnvelopeV1, IUserAuthorization, ISigner, ISessionStorage, ISpaceCreationHandler, RegistryPolicy, RegistrySequenceStore, OnNodeNotFound, LocalNodeIdentityStore, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ReplicationOptions, TinyCloudSession, PersistedSessionData, ClientSession, PermissionEntry, Extension, SignRequest, SpaceHostResult, SignInOptions, Delegation, DelegatedResource, TelemetryConfig, ServiceContext, IKVService, ISQLService, IDuckDbService, IHooksService, CreateOwnerDelegationParams as CreateOwnerDelegationParams$1, OwnerDelegationReceipt as OwnerDelegationReceipt$1, StorageFullEvent, IStorageService, INotificationHandler, IENSResolver, KVReplicaStorage, AccountService, InvokeAnyFunction as InvokeAnyFunction$1, UnifiedPolicyCapability, RegisterPolicyV3Input, RegisterPolicyV3Receipt, CanonicalJson, ShareDeliveryAuthorizationV3Receipt, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, DelegationResult, DelegationRevocationReceipt, DelegationStatus, ServiceSession, ReplicationControl, ResolvedDelegate } from '@tinycloud/sdk-core';
|
|
2
|
+
import { AutoSignStrategy, AutoRejectStrategy, CallbackStrategy, CapabilityPresentationEnvelopeV1, IUserAuthorization, ISigner, ISessionStorage, ISpaceCreationHandler, RegistryPolicy, RegistrySequenceStore, OnNodeNotFound, LocalNodeIdentityStore, IWasmBindings, ISessionManager, SiweConfig, Manifest, ComposedManifestRequest, ReplicationOptions, TinyCloudSession, PersistedSessionData, ClientSession, PermissionEntry, Extension, SignRequest, SpaceHostResult, SignInOptions, Delegation, DelegatedResource, TelemetryConfig, ServiceContext, IKVService, ISQLService, IDuckDbService, IHooksService, CreateOwnerDelegationParams as CreateOwnerDelegationParams$1, OwnerDelegationReceipt as OwnerDelegationReceipt$1, StorageFullEvent, IStorageService, INotificationHandler, IENSResolver, RetryPolicy, KVReplicaStorage, AccountService, InvokeAnyFunction as InvokeAnyFunction$1, UnifiedPolicyCapability, RegisterPolicyV3Input, RegisterPolicyV3Receipt, CanonicalJson, ShareDeliveryAuthorizationV3Receipt, IDataVaultService, IEncryptionService, NetworkDescriptor, ISecretsService, ICapabilityKeyRegistry, DelegationManager, ISpaceService, ISpace, ISharingService, DelegationResult, DelegationRevocationReceipt, DelegationStatus, ServiceSession, ReplicationControl, ResolvedDelegate } from '@tinycloud/sdk-core';
|
|
3
3
|
import { ReplicaSessionStamp } from '@tinycloud/sdk-services/kv/replication';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
import { InvokeFunction, InvokeAnyFunction, FetchFunction } from '@tinycloud/sdk-services';
|
|
@@ -1324,6 +1324,8 @@ interface TinyCloudNodeConfig {
|
|
|
1324
1324
|
autoBootstrapAccount?: boolean;
|
|
1325
1325
|
/** Default-off service telemetry. */
|
|
1326
1326
|
telemetry?: TelemetryConfig;
|
|
1327
|
+
/** Retry of node busy/timeout answers; `{ maxAttempts: 1 }` disables it. See {@link RetryPolicy}. */
|
|
1328
|
+
retryPolicy?: Partial<RetryPolicy>;
|
|
1327
1329
|
/**
|
|
1328
1330
|
* Optional read-through replica configuration; disabled unless explicitly enabled.
|
|
1329
1331
|
* Node profile mutations require `profileDir` and a caller-supplied `profileGuard` holding
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReplicationOptions, PermissionEntry, TinyCloudSession, KVReplicaStorage, ServiceContext, IWasmBindings, WasmRecapEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { ReplicaConsentAnchor, AuthorityRefusal, ReplicationAuthority } from '@tinycloud/sdk-services';
|
|
3
3
|
import { ReplicaSessionStamp, ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
4
|
-
import { T as TinyCloudNode } from './TinyCloudNode-
|
|
4
|
+
import { T as TinyCloudNode } from './TinyCloudNode-DeV-L_14.cjs';
|
|
5
5
|
|
|
6
6
|
/** Constructor-time validation; the space-dependent secrets check runs at sign-in and open. */
|
|
7
7
|
declare function assertValidReplicationConfig(replication: (ReplicationOptions & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReplicationOptions, PermissionEntry, TinyCloudSession, KVReplicaStorage, ServiceContext, IWasmBindings, WasmRecapEntry } from '@tinycloud/sdk-core';
|
|
2
2
|
import { ReplicaConsentAnchor, AuthorityRefusal, ReplicationAuthority } from '@tinycloud/sdk-services';
|
|
3
3
|
import { ReplicaSessionStamp, ReplicaDenyInput } from '@tinycloud/sdk-services/kv/replication';
|
|
4
|
-
import { T as TinyCloudNode } from './TinyCloudNode-
|
|
4
|
+
import { T as TinyCloudNode } from './TinyCloudNode-DeV-L_14.js';
|
|
5
5
|
|
|
6
6
|
/** Constructor-time validation; the space-dependent secrets check runs at sign-in and open. */
|
|
7
7
|
declare function assertValidReplicationConfig(replication: (ReplicationOptions & {
|
package/dist/core.cjs
CHANGED
|
@@ -3972,7 +3972,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
3972
3972
|
invoke: config.invoke,
|
|
3973
3973
|
fetch: config.fetch ?? globalThis.fetch.bind(globalThis),
|
|
3974
3974
|
hosts: config.hosts,
|
|
3975
|
-
telemetry: this.config.telemetry
|
|
3975
|
+
telemetry: this.config.telemetry,
|
|
3976
|
+
retryPolicy: this.config.retryPolicy
|
|
3976
3977
|
}));
|
|
3977
3978
|
kvContext.setSession(config.session);
|
|
3978
3979
|
kvService.initialize(kvContext);
|
|
@@ -4023,7 +4024,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
4023
4024
|
});
|
|
4024
4025
|
this.tc = new import_sdk_core10.TinyCloud(this.auth, {
|
|
4025
4026
|
invokeAny: this.invokeAnyWithRuntimePermissions,
|
|
4026
|
-
telemetry: config.telemetry
|
|
4027
|
+
telemetry: config.telemetry,
|
|
4028
|
+
retryPolicy: config.retryPolicy
|
|
4027
4029
|
});
|
|
4028
4030
|
}
|
|
4029
4031
|
shouldUseBootstrapSignInRequest(config) {
|
|
@@ -4385,7 +4387,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
4385
4387
|
this.auth = oldAuth;
|
|
4386
4388
|
this.tc = this.auth ? new import_sdk_core10.TinyCloud(this.auth, {
|
|
4387
4389
|
invokeAny: this.invokeAnyWithRuntimePermissions,
|
|
4388
|
-
telemetry: this.config.telemetry
|
|
4390
|
+
telemetry: this.config.telemetry,
|
|
4391
|
+
retryPolicy: this.config.retryPolicy
|
|
4389
4392
|
}) : null;
|
|
4390
4393
|
this._capabilityRegistry = new import_sdk_core10.CapabilityKeyRegistry();
|
|
4391
4394
|
this._keyProvider = new WasmKeyProvider({ sessionManager: this.sessionManager });
|
|
@@ -5036,7 +5039,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
5036
5039
|
invokeAny: context.invokeAny,
|
|
5037
5040
|
fetch: context.fetch,
|
|
5038
5041
|
hosts: context.hosts,
|
|
5039
|
-
telemetry: this.config.telemetry
|
|
5042
|
+
telemetry: this.config.telemetry,
|
|
5043
|
+
retryPolicy: this.config.retryPolicy
|
|
5040
5044
|
}));
|
|
5041
5045
|
scoped.setOperationAbortSignal(signal);
|
|
5042
5046
|
scoped.setSession({ ...session, spaceId });
|
|
@@ -5102,7 +5106,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
5102
5106
|
invokeAny: sharedContext.invokeAny,
|
|
5103
5107
|
fetch: sharedContext.fetch,
|
|
5104
5108
|
hosts: sharedContext.hosts,
|
|
5105
|
-
telemetry: this.config.telemetry
|
|
5109
|
+
telemetry: this.config.telemetry,
|
|
5110
|
+
retryPolicy: this.config.retryPolicy
|
|
5106
5111
|
}));
|
|
5107
5112
|
context.setOperationAbortSignal(controller.signal);
|
|
5108
5113
|
const current = this.currentTinyCloudSession();
|
|
@@ -5944,7 +5949,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
5944
5949
|
const graph = this.createServiceGraphLifetime();
|
|
5945
5950
|
const core = this.auth ? new import_sdk_core10.TinyCloud(this.auth, {
|
|
5946
5951
|
invokeAny: graph.invokeAny,
|
|
5947
|
-
telemetry: this.config.telemetry
|
|
5952
|
+
telemetry: this.config.telemetry,
|
|
5953
|
+
retryPolicy: this.config.retryPolicy
|
|
5948
5954
|
}) : null;
|
|
5949
5955
|
if (core) {
|
|
5950
5956
|
core.initializeServices(graph.invoke, [input.host], graph.fetch);
|
|
@@ -5956,7 +5962,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
5956
5962
|
invokeAny: graph.invokeAny,
|
|
5957
5963
|
fetch: graph.fetch,
|
|
5958
5964
|
hosts: [input.host],
|
|
5959
|
-
telemetry: this.config.telemetry
|
|
5965
|
+
telemetry: this.config.telemetry,
|
|
5966
|
+
retryPolicy: this.config.retryPolicy
|
|
5960
5967
|
}));
|
|
5961
5968
|
const kv = new import_sdk_core10.KVService({});
|
|
5962
5969
|
kv.initialize(serviceContext);
|
|
@@ -6042,7 +6049,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6042
6049
|
invoke: config.invoke,
|
|
6043
6050
|
fetch: config.fetch ?? globalThis.fetch.bind(globalThis),
|
|
6044
6051
|
hosts: config.hosts,
|
|
6045
|
-
telemetry: this.config.telemetry
|
|
6052
|
+
telemetry: this.config.telemetry,
|
|
6053
|
+
retryPolicy: this.config.retryPolicy
|
|
6046
6054
|
}));
|
|
6047
6055
|
context.setSession(config.session);
|
|
6048
6056
|
service.initialize(context);
|
|
@@ -6082,7 +6090,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6082
6090
|
invokeAny: graph.invokeAny,
|
|
6083
6091
|
fetch: graph.fetch,
|
|
6084
6092
|
hosts: [input.host],
|
|
6085
|
-
telemetry: this.config.telemetry
|
|
6093
|
+
telemetry: this.config.telemetry,
|
|
6094
|
+
retryPolicy: this.config.retryPolicy
|
|
6086
6095
|
}));
|
|
6087
6096
|
context.setSession({ ...input.serviceSession, spaceId });
|
|
6088
6097
|
scopedKv.initialize(context);
|
|
@@ -6097,7 +6106,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6097
6106
|
invokeAny: graph.invokeAny,
|
|
6098
6107
|
fetch: graph.fetch,
|
|
6099
6108
|
hosts: [input.host],
|
|
6100
|
-
telemetry: this.config.telemetry
|
|
6109
|
+
telemetry: this.config.telemetry,
|
|
6110
|
+
retryPolicy: this.config.retryPolicy
|
|
6101
6111
|
}));
|
|
6102
6112
|
context.setSession({ ...input.serviceSession, spaceId });
|
|
6103
6113
|
scopedKv.initialize(context);
|
|
@@ -6409,7 +6419,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6409
6419
|
});
|
|
6410
6420
|
this.tc = new import_sdk_core10.TinyCloud(this.auth, {
|
|
6411
6421
|
invokeAny: this.invokeAnyWithRuntimePermissions,
|
|
6412
|
-
telemetry: this.config.telemetry
|
|
6422
|
+
telemetry: this.config.telemetry,
|
|
6423
|
+
retryPolicy: this.config.retryPolicy
|
|
6413
6424
|
});
|
|
6414
6425
|
this.config.prefix = prefix;
|
|
6415
6426
|
}
|
|
@@ -6469,7 +6480,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6469
6480
|
});
|
|
6470
6481
|
this.tc = new import_sdk_core10.TinyCloud(this.auth, {
|
|
6471
6482
|
invokeAny: this.invokeAnyWithRuntimePermissions,
|
|
6472
|
-
telemetry: this.config.telemetry
|
|
6483
|
+
telemetry: this.config.telemetry,
|
|
6484
|
+
retryPolicy: this.config.retryPolicy
|
|
6473
6485
|
});
|
|
6474
6486
|
this.config.prefix = prefix;
|
|
6475
6487
|
}
|
|
@@ -6493,7 +6505,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6493
6505
|
invokeAny: this._serviceGraph.invokeAny,
|
|
6494
6506
|
fetch: this._serviceGraph.fetch,
|
|
6495
6507
|
hosts: [this.config.host],
|
|
6496
|
-
telemetry: this.config.telemetry
|
|
6508
|
+
telemetry: this.config.telemetry,
|
|
6509
|
+
retryPolicy: this.config.retryPolicy
|
|
6497
6510
|
}));
|
|
6498
6511
|
this._kv = new import_sdk_core10.KVService({});
|
|
6499
6512
|
this._kv.initialize(this._serviceContext);
|
|
@@ -6540,7 +6553,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
6540
6553
|
invokeAny: this._serviceContext.invokeAny,
|
|
6541
6554
|
fetch: this._serviceContext.fetch,
|
|
6542
6555
|
hosts: this._serviceContext.hosts,
|
|
6543
|
-
telemetry: this.config.telemetry
|
|
6556
|
+
telemetry: this.config.telemetry,
|
|
6557
|
+
retryPolicy: this.config.retryPolicy
|
|
6544
6558
|
}));
|
|
6545
6559
|
const session = this._serviceContext.session;
|
|
6546
6560
|
if (session) {
|
|
@@ -7007,7 +7021,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
7007
7021
|
invoke: config.invoke,
|
|
7008
7022
|
fetch: config.fetch ?? graph.fetch,
|
|
7009
7023
|
hosts: config.hosts,
|
|
7010
|
-
telemetry: this.config.telemetry
|
|
7024
|
+
telemetry: this.config.telemetry,
|
|
7025
|
+
retryPolicy: this.config.retryPolicy
|
|
7011
7026
|
}));
|
|
7012
7027
|
context.setSession(config.session);
|
|
7013
7028
|
service.initialize(context);
|
|
@@ -7328,7 +7343,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
7328
7343
|
invokeAny: this._serviceContext.invokeAny,
|
|
7329
7344
|
fetch: this._serviceContext.fetch,
|
|
7330
7345
|
hosts: this._serviceContext.hosts,
|
|
7331
|
-
telemetry: this.config.telemetry
|
|
7346
|
+
telemetry: this.config.telemetry,
|
|
7347
|
+
retryPolicy: this.config.retryPolicy
|
|
7332
7348
|
}));
|
|
7333
7349
|
spaceScopedContext.setSession({ ...this._serviceContext.session, spaceId });
|
|
7334
7350
|
sql.initialize(spaceScopedContext);
|
|
@@ -8146,7 +8162,8 @@ var _TinyCloudNode = class _TinyCloudNode {
|
|
|
8146
8162
|
invoke: this._serviceGraph.invoke,
|
|
8147
8163
|
fetch: this._serviceGraph.fetch,
|
|
8148
8164
|
hosts: this._serviceContext.hosts,
|
|
8149
|
-
telemetry: this.config.telemetry
|
|
8165
|
+
telemetry: this.config.telemetry,
|
|
8166
|
+
retryPolicy: this.config.retryPolicy
|
|
8150
8167
|
}));
|
|
8151
8168
|
publicContext.setSession({
|
|
8152
8169
|
delegationHeader: delegationSession.delegationHeader,
|