@ikonai/sdk 1.0.80 → 1.1.0

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.
Files changed (55) hide show
  1. package/app-messaging.d.ts +1 -1
  2. package/assets/audio-capture-worker-D-0X2Dy8.js +1 -0
  3. package/assets/audio-playback-worker-DivBZPfS.js +1 -0
  4. package/assets/libopus-CnBCihDi.js +1 -0
  5. package/assets/protocol-worker-BH93CVck.js +1 -0
  6. package/assets/src-BKYD07QQ.js +1 -0
  7. package/assets/src-DOUWsCWT.js +1 -0
  8. package/assets/video-capture-worker-BQGOFbZt.js +1 -0
  9. package/assets/video-playback-worker-tC5nUVnw.js +1 -0
  10. package/assets/viseme-worker-Cd-JqTVM.js +1 -0
  11. package/capabilities-BtJblfdG.js +108 -0
  12. package/channel/channel-manager.d.ts +1 -1
  13. package/channel/channel.d.ts +1 -1
  14. package/client/endpoint-selector.d.ts +1 -1
  15. package/client/ikon-client-config.d.ts +13 -11
  16. package/client/ikon-client.d.ts +86 -4
  17. package/connection/authenticator.d.ts +3 -3
  18. package/connection/urls.d.ts +7 -18
  19. package/errors/index.d.ts +22 -13
  20. package/functions/browser-functions.d.ts +1 -1
  21. package/functions/function-registry.d.ts +1 -1
  22. package/functions/types.d.ts +2 -2
  23. package/ikon-media-zqob_QeE.js +3160 -0
  24. package/index.d.ts +8 -8
  25. package/index.js +8119 -12536
  26. package/media/ikon-audio-capture.d.ts +7 -3
  27. package/media/ikon-audio-playback.d.ts +37 -0
  28. package/media/ikon-video-playback.d.ts +24 -0
  29. package/media/media-session-helper.d.ts +8 -0
  30. package/media/video-constants.d.ts +11 -1
  31. package/media/viseme-tracker.d.ts +10 -1
  32. package/package.json +1 -1
  33. package/storage.d.ts +13 -0
  34. package/transport/transport.d.ts +1 -1
  35. package/transport/web-socket-transport.d.ts +1 -1
  36. package/transport/web-transport-transport.d.ts +1 -1
  37. package/utils/inspect-mode.d.ts +4 -0
  38. package/utils/log-sender.d.ts +1 -1
  39. package/utils/platform.d.ts +4 -0
  40. package/utils/query-params.d.ts +8 -4
  41. package/vite.config.d.ts +2 -0
  42. package/webrtc/webrtc-signaling.d.ts +11 -2
  43. package/worker/audio-playback-worker.d.ts +14 -1
  44. package/worker/video-capture-worker.d.ts +2 -2
  45. package/worker/video-playback-worker.d.ts +14 -2
  46. package/worker/viseme-worker.d.ts +10 -2
  47. package/assets/audio-capture-worker-Brmt2Z7a.js +0 -1279
  48. package/assets/audio-playback-worker-C9XXiFhK.js +0 -1474
  49. package/assets/index-Ca9sTcGt.js +0 -119
  50. package/assets/index-D_vz6N3U.js +0 -267
  51. package/assets/libopus-ChbDZJKA.js +0 -139
  52. package/assets/protocol-worker-1sGaGw11.js +0 -1674
  53. package/assets/video-capture-worker-zOxyU-q3.js +0 -1126
  54. package/assets/video-playback-worker-DfwfIoRw.js +0 -1005
  55. package/assets/viseme-worker-CFJdP6of.js +0 -831
@@ -68,23 +68,17 @@ export declare function deriveAuthUrl(override?: string): Promise<string>;
68
68
  */
69
69
  export declare function parseQueryParams(): Record<string, string>;
70
70
  /**
71
- * Result of parsing URL path and query parameters.
71
+ * Result of parsing URL query parameters.
72
72
  */
73
73
  export interface UrlParams {
74
- sessionId?: string;
75
- channelKey?: string;
74
+ sessionIdentityHash?: string;
76
75
  parameters: Record<string, string>;
77
76
  }
78
77
  /**
79
- * Parse URL path and query parameters for browser authentication.
78
+ * Parse URL query parameters for browser authentication.
80
79
  *
81
- * URL path patterns:
82
- * - /s/[sessionId] → sessionId
83
- * - /c/[channelKey] → channelKey
84
- *
85
- * Query parameters → parameters dict (excluding OAuth-reserved params)
86
- *
87
- * @throws Error if both sessionId and channelKey are in the URL path
80
+ * `ikon-session` names the app session to join; the SDK-reserved params are kept out of the
81
+ * app-facing dict, along with the OAuth-reserved ones.
88
82
  */
89
83
  export declare function parseUrlParams(): UrlParams;
90
84
  /**
@@ -97,12 +91,7 @@ export declare function parseUrlParams(): UrlParams;
97
91
  */
98
92
  export declare function isCloudEnvironment(): boolean;
99
93
  /**
100
- * Get the initial path from the browser URL, stripping /c/[channelKey] or /s/[sessionId] prefix.
101
- * Returns just the app-specific path portion (e.g. "/buttons"), or "/" if no path remains.
94
+ * Get the initial path from the browser URL — the whole path, since the app owns all of it.
95
+ * Returns "/" when there is no path.
102
96
  */
103
97
  export declare function getInitialPath(): string;
104
- /**
105
- * Remove sessionId and channelKey path patterns from the URL.
106
- * Replaces /s/[sessionId] or /c/[channelKey] paths with root.
107
- */
108
- export declare function clearSessionParamsFromUrl(): void;
package/errors/index.d.ts CHANGED
@@ -42,29 +42,17 @@ export declare class MaxRetriesExceededError extends ConnectionError {
42
42
  constructor(maxAttempts: number);
43
43
  }
44
44
  /**
45
- * Error thrown when cloud channel provisioning times out.
45
+ * Error thrown when cloud app-session provisioning times out.
46
46
  */
47
47
  export declare class ProvisioningTimeoutError extends AuthenticationError {
48
48
  constructor(timeoutMs: number);
49
49
  }
50
- /**
51
- * Error thrown when a channel with the specified key is not found.
52
- */
53
- export declare class ChannelNotFoundError extends AuthenticationError {
54
- constructor(channelKey: string);
55
- }
56
50
  /**
57
51
  * Error thrown when no space is found for the given domain.
58
52
  */
59
53
  export declare class SpaceNotFoundError extends AuthenticationError {
60
54
  constructor(domain: string);
61
55
  }
62
- /**
63
- * Error thrown when no channels are available in the space.
64
- */
65
- export declare class NoChannelsError extends AuthenticationError {
66
- constructor();
67
- }
68
56
  /**
69
57
  * Error thrown when the server denies access (HTTP 403).
70
58
  * For example, when a domain allowlist blocks the user's email domain.
@@ -73,6 +61,16 @@ export declare class AccessDeniedError extends AuthenticationError {
73
61
  readonly reason: string;
74
62
  constructor(message: string, reason: string);
75
63
  }
64
+ /**
65
+ * Error thrown when `?ikon-session=<hash>` names a session that is not live (HTTP 404).
66
+ * Terminal — the SDK must not retry, and must not fall back to starting a fresh session: a
67
+ * link that silently lands the user somewhere other than the session it names is worse than
68
+ * a visible failure.
69
+ */
70
+ export declare class SessionNotFoundError extends AuthenticationError {
71
+ readonly sessionIdentityHash: string;
72
+ constructor(sessionIdentityHash: string);
73
+ }
76
74
  /**
77
75
  * Error thrown when the server is at capacity and rejects the connection (HTTP 429).
78
76
  * The instance has reached its maximum client limit. This is terminal — the SDK must not
@@ -81,6 +79,17 @@ export declare class AccessDeniedError extends AuthenticationError {
81
79
  export declare class ServerFullError extends AuthenticationError {
82
80
  constructor(message: string);
83
81
  }
82
+ /**
83
+ * Error thrown when a connect-flow request fails with a server-side status (HTTP 5xx).
84
+ * Says the backend is having trouble and nothing about the caller's credentials — which is why
85
+ * it is not merely a nicer message: an AuthenticationError from connect reads as a stale session,
86
+ * and the response to that is to log the user out. A backend hiccup must not end a valid session.
87
+ * Transient, so the SDK retries it like any other connect failure.
88
+ */
89
+ export declare class ServerUnavailableError extends AuthenticationError {
90
+ readonly status: number;
91
+ constructor(message: string, status: number);
92
+ }
84
93
  /**
85
94
  * Error thrown when the browser is missing runtime features the SDK requires (e.g. a smart-TV
86
95
  * browser too old to run the app). Terminal — the SDK must not retry; the user needs a newer
@@ -1,4 +1,4 @@
1
- import { ClientType } from '../../../../shared/protocol/src/index.ts';
1
+ import { ClientType } from '../../shared/protocol/src/index.ts';
2
2
  import { FunctionRegistry } from './function-registry';
3
3
  /**
4
4
  * Get the effective theme (user override > stored > system preference).
@@ -1,4 +1,4 @@
1
- import { ProtocolMessage, ActionFunctionRegister, GlobalState, ClientInitialization } from '../../../../shared/protocol/src/index.ts';
1
+ import { ProtocolMessage, ActionFunctionRegister, GlobalState, ClientInitialization } from '../../shared/protocol/src/index.ts';
2
2
  import { FunctionCallError, FunctionDefinition, FunctionHandler, NormalizedFunction } from './types';
3
3
  export interface RemoteFunction {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { ActionFunctionRegister } from '../../../../shared/protocol/src/index.ts';
1
+ import { ActionFunctionRegister } from '../../shared/protocol/src/index.ts';
2
2
  export type PrimitiveValueKind = 'boolean' | 'number' | 'string';
3
3
  type PrimitiveDescriptor = {
4
4
  kind: PrimitiveValueKind;
@@ -44,7 +44,7 @@ export interface FunctionDefinition {
44
44
  returnType: ValueDescriptor;
45
45
  parameters?: FunctionParameterDefinition[];
46
46
  }
47
- export type FunctionHandler = (...parameters: unknown[]) => unknown | Promise<unknown>;
47
+ export type FunctionHandler = (...parameters: unknown[]) => unknown;
48
48
  export interface FunctionResultWithData<T = unknown> {
49
49
  value: T;
50
50
  data: Uint8Array;