@tinycloud/web-sdk 3.8.0-beta.20 → 3.8.0-beta.21

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.
@@ -36,10 +36,10 @@ export declare const SessionConfigSchema: z.ZodObject<{
36
36
  domain?: string;
37
37
  actions?: Record<string, Record<string, string[]>>;
38
38
  spaceId?: string;
39
+ jwk?: Record<string, unknown>;
39
40
  address?: string;
40
41
  chainId?: number;
41
42
  issuedAt?: string;
42
- jwk?: Record<string, unknown>;
43
43
  notBefore?: string;
44
44
  expirationTime?: string;
45
45
  parents?: string[];
@@ -47,10 +47,10 @@ export declare const SessionConfigSchema: z.ZodObject<{
47
47
  domain?: string;
48
48
  actions?: Record<string, Record<string, string[]>>;
49
49
  spaceId?: string;
50
+ jwk?: Record<string, unknown>;
50
51
  address?: string;
51
52
  chainId?: number;
52
53
  issuedAt?: string;
53
- jwk?: Record<string, unknown>;
54
54
  notBefore?: string;
55
55
  expirationTime?: string;
56
56
  parents?: string[];
@@ -78,18 +78,18 @@ export declare const SessionSchema: z.ZodObject<{
78
78
  verificationMethod: z.ZodString;
79
79
  }, "strip", z.ZodTypeAny, {
80
80
  spaceId?: string;
81
+ jwk?: Record<string, unknown>;
81
82
  delegationHeader?: {
82
83
  Authorization?: string;
83
84
  };
84
- jwk?: Record<string, unknown>;
85
85
  delegationCid?: string;
86
86
  verificationMethod?: string;
87
87
  }, {
88
88
  spaceId?: string;
89
+ jwk?: Record<string, unknown>;
89
90
  delegationHeader?: {
90
91
  Authorization?: string;
91
92
  };
92
- jwk?: Record<string, unknown>;
93
93
  delegationCid?: string;
94
94
  verificationMethod?: string;
95
95
  }>;
@@ -10,11 +10,13 @@
10
10
  *
11
11
  * @packageDocumentation
12
12
  */
13
- import type { Manifest, PermissionEntry } from "@tinycloud/sdk-core";
13
+ import { type Manifest, type PermissionEntry } from "@tinycloud/sdk-core";
14
14
  import type { PortableDelegation } from "@tinycloud/node-sdk/core";
15
15
  export interface RequestPermissionsCoreDeps {
16
16
  /** Current stored manifest. Must be defined — caller validates first. */
17
17
  manifest: Manifest;
18
+ /** Authenticated owner from the current node, never from a requested resource. */
19
+ ownerDid?: string;
18
20
  /**
19
21
  * Show the permission request modal. Resolves with `{ approved }`
20
22
  * once the user interacts. In tests this is a stub; in production it
@@ -49,6 +51,11 @@ export interface RequestPermissionsOptions {
49
51
  * the same error text.
50
52
  */
51
53
  export declare function validateAdditionalPermissions(additional: PermissionEntry[]): void;
54
+ /**
55
+ * Normalize only encryption key creation here. Other runtime entries retain
56
+ * their existing Web consent representation; the node validates them.
57
+ */
58
+ export declare function normalizeRuntimeKeyCreatePermissions(additional: PermissionEntry[], ownerDid?: string): PermissionEntry[];
52
59
  /**
53
60
  * Core escalation flow. See the TinyCloudWeb.requestPermissions JSDoc
54
61
  * for the full spec-level description — this function is the plumbing.
@@ -463,6 +463,8 @@ export declare class TinyCloudWeb {
463
463
  * On approve, this does not mutate the manifest or force a new sign-in.
464
464
  * The underlying node creates a secondary delegation to the current
465
465
  * session key and records it in the invocation permission map.
466
+ * Exact current-owner `default/share/<id>` key creation is bound to this
467
+ * live signed session across consent. Native shells cannot request it.
466
468
  *
467
469
  * `options.expiryMs` sets the requested lifetime of the issued step-up
468
470
  * delegation, in milliseconds. Omitted, the node's default applies. The
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tinycloud/web-sdk",
3
- "version": "3.8.0-beta.20",
3
+ "version": "3.8.0-beta.21",
4
4
  "description": "A set of tools and utilities to help you build your app with TinyCloud.",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -66,9 +66,9 @@
66
66
  "@multiformats/multiaddr": "^13.0.1",
67
67
  "@multiformats/multiaddr-to-uri": "^12.0.0",
68
68
  "@noble/curves": "^1.9.7",
69
- "@tinycloud/node-sdk": "3.8.0-beta.20",
69
+ "@tinycloud/node-sdk": "3.8.0-beta.21",
70
70
  "@tinycloud/replica": "0.4.0-beta.5",
71
- "@tinycloud/sdk-core": "3.8.0-beta.20",
71
+ "@tinycloud/sdk-core": "3.8.0-beta.21",
72
72
  "@tinycloud/share-envelope": "1.4.0-beta.2",
73
73
  "@tinycloud/share-sdk": "1.4.1-beta.3",
74
74
  "@tinycloud/web-sdk-wasm": "1.7.7",