@tinycloud/node-sdk 3.6.0 → 3.6.1-beta.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,3 +4,7 @@
4
4
 
5
5
  File-backed pending store for the email-proof flow. It keeps one file per request under `<home>/credentials/`, named by a hash of the request id. The directory is created with mode 0700 and each file with mode 0600. Permissions and ownership are re-checked on every read. Only a `home` that is itself a symlink is refused; ancestors of `home` may be symlinks, but `realpath(home)` must be owned by the current user. Unsafe files are left in place and reported as an error.
6
6
 
7
+ ## Revoking delegations
8
+
9
+ `tinycloud.delegation/revoke` on a space is space-wide: it can revoke any delegation in that space, including other apps' grants and the owner's own sessions. Request it only for the command that needs it, with a short expiry, and don't keep it: the CLI's own fallback asks for 5 minutes and stores nothing. Never put it in a long-lived grant or an app manifest.
10
+
@@ -1031,6 +1031,8 @@ interface TinyCloudNodeConfig {
1031
1031
  prefix?: string;
1032
1032
  /** Domain for SIWE messages (default: derived from host) */
1033
1033
  domain?: string;
1034
+ /** SIWE URI (default: `https://<domain>`). web-sdk defaults it to the page origin when domain is derived from the window. */
1035
+ uri?: string;
1034
1036
  /** Session expiration time in milliseconds (default: 30 days, `EXPIRY.SESSION_MS`) */
1035
1037
  sessionExpirationMs?: number;
1036
1038
  /** Whether to automatically create space if it doesn't exist (default: false) */
@@ -1031,6 +1031,8 @@ interface TinyCloudNodeConfig {
1031
1031
  prefix?: string;
1032
1032
  /** Domain for SIWE messages (default: derived from host) */
1033
1033
  domain?: string;
1034
+ /** SIWE URI (default: `https://<domain>`). web-sdk defaults it to the page origin when domain is derived from the window. */
1035
+ uri?: string;
1034
1036
  /** Session expiration time in milliseconds (default: 30 days, `EXPIRY.SESSION_MS`) */
1035
1037
  sessionExpirationMs?: number;
1036
1038
  /** Whether to automatically create space if it doesn't exist (default: false) */
@@ -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-B5WCe_ps.js';
4
+ import { T as TinyCloudNode } from './TinyCloudNode--OyL6lZh.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 & {
@@ -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-CIGurdHw.cjs';
4
+ import { T as TinyCloudNode } from './TinyCloudNode-BMi72EIk.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 & {
package/dist/core.cjs CHANGED
@@ -4185,6 +4185,7 @@ var _TinyCloudNode = class _TinyCloudNode {
4185
4185
  sessionManager: this.sessionManager,
4186
4186
  sessionStorage: config.sessionStorage ?? new MemorySessionStorage(),
4187
4187
  domain: this.siweDomain,
4188
+ uri: config.uri,
4188
4189
  spacePrefix: config.prefix,
4189
4190
  sessionExpirationMs: config.sessionExpirationMs ?? DEFAULT_SESSION_EXPIRATION_MS,
4190
4191
  tinycloudHosts: this.explicitHost ? [this.explicitHost] : void 0,
@@ -6600,6 +6601,7 @@ var _TinyCloudNode = class _TinyCloudNode {
6600
6601
  sessionManager: this.sessionManager,
6601
6602
  sessionStorage: options?.sessionStorage ?? this.config.sessionStorage ?? new MemorySessionStorage(),
6602
6603
  domain: this.siweDomain,
6604
+ uri: this.config.uri,
6603
6605
  spacePrefix: prefix,
6604
6606
  sessionExpirationMs: this.config.sessionExpirationMs ?? DEFAULT_SESSION_EXPIRATION_MS,
6605
6607
  tinycloudHosts: this.explicitHost ? [this.explicitHost] : void 0,
@@ -6661,6 +6663,7 @@ var _TinyCloudNode = class _TinyCloudNode {
6661
6663
  sessionManager: this.sessionManager,
6662
6664
  sessionStorage: options?.sessionStorage ?? this.config.sessionStorage ?? new MemorySessionStorage(),
6663
6665
  domain: this.siweDomain,
6666
+ uri: this.config.uri,
6664
6667
  spacePrefix: prefix,
6665
6668
  sessionExpirationMs: this.config.sessionExpirationMs ?? DEFAULT_SESSION_EXPIRATION_MS,
6666
6669
  tinycloudHosts: this.explicitHost ? [this.explicitHost] : void 0,