@affectively/dash 5.3.0 → 5.3.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.
Files changed (71) hide show
  1. package/dist/index.d.ts +62 -0
  2. package/dist/index.js +31 -0
  3. package/dist/sync/index.d.ts +6 -0
  4. package/dist/sync/index.js +4 -0
  5. package/package.json +45 -66
  6. package/README.md +0 -193
  7. package/dist/src/api/firebase/auth/index.d.ts +0 -137
  8. package/dist/src/api/firebase/auth/index.js +0 -352
  9. package/dist/src/api/firebase/auth/providers.d.ts +0 -254
  10. package/dist/src/api/firebase/auth/providers.js +0 -518
  11. package/dist/src/api/firebase/database/index.d.ts +0 -108
  12. package/dist/src/api/firebase/database/index.js +0 -368
  13. package/dist/src/api/firebase/errors.d.ts +0 -15
  14. package/dist/src/api/firebase/errors.js +0 -215
  15. package/dist/src/api/firebase/firestore/data-types.d.ts +0 -116
  16. package/dist/src/api/firebase/firestore/data-types.js +0 -280
  17. package/dist/src/api/firebase/firestore/index.d.ts +0 -7
  18. package/dist/src/api/firebase/firestore/index.js +0 -13
  19. package/dist/src/api/firebase/firestore/listeners.d.ts +0 -20
  20. package/dist/src/api/firebase/firestore/listeners.js +0 -50
  21. package/dist/src/api/firebase/firestore/operations.d.ts +0 -123
  22. package/dist/src/api/firebase/firestore/operations.js +0 -490
  23. package/dist/src/api/firebase/firestore/query.d.ts +0 -118
  24. package/dist/src/api/firebase/firestore/query.js +0 -418
  25. package/dist/src/api/firebase/index.d.ts +0 -11
  26. package/dist/src/api/firebase/index.js +0 -17
  27. package/dist/src/api/firebase/storage/index.d.ts +0 -100
  28. package/dist/src/api/firebase/storage/index.js +0 -286
  29. package/dist/src/api/firebase/types.d.ts +0 -341
  30. package/dist/src/api/firebase/types.js +0 -4
  31. package/dist/src/auth/manager.d.ts +0 -182
  32. package/dist/src/auth/manager.js +0 -598
  33. package/dist/src/engine/ai.d.ts +0 -10
  34. package/dist/src/engine/ai.js +0 -76
  35. package/dist/src/engine/sqlite.d.ts +0 -346
  36. package/dist/src/engine/sqlite.js +0 -1325
  37. package/dist/src/engine/vec_extension.d.ts +0 -5
  38. package/dist/src/engine/vec_extension.js +0 -10
  39. package/dist/src/index.d.ts +0 -15
  40. package/dist/src/index.js +0 -24
  41. package/dist/src/mcp/server.d.ts +0 -8
  42. package/dist/src/mcp/server.js +0 -87
  43. package/dist/src/reactivity/signal.d.ts +0 -3
  44. package/dist/src/reactivity/signal.js +0 -31
  45. package/dist/src/schema/lens.d.ts +0 -29
  46. package/dist/src/schema/lens.js +0 -122
  47. package/dist/src/sync/aeon/config.d.ts +0 -21
  48. package/dist/src/sync/aeon/config.js +0 -14
  49. package/dist/src/sync/aeon/delta-adapter.d.ts +0 -62
  50. package/dist/src/sync/aeon/delta-adapter.js +0 -98
  51. package/dist/src/sync/aeon/index.d.ts +0 -18
  52. package/dist/src/sync/aeon/index.js +0 -19
  53. package/dist/src/sync/aeon/offline-adapter.d.ts +0 -110
  54. package/dist/src/sync/aeon/offline-adapter.js +0 -227
  55. package/dist/src/sync/aeon/presence-adapter.d.ts +0 -114
  56. package/dist/src/sync/aeon/presence-adapter.js +0 -157
  57. package/dist/src/sync/aeon/schema-adapter.d.ts +0 -95
  58. package/dist/src/sync/aeon/schema-adapter.js +0 -163
  59. package/dist/src/sync/backup.d.ts +0 -12
  60. package/dist/src/sync/backup.js +0 -44
  61. package/dist/src/sync/connection.d.ts +0 -20
  62. package/dist/src/sync/connection.js +0 -50
  63. package/dist/src/sync/d1-provider.d.ts +0 -97
  64. package/dist/src/sync/d1-provider.js +0 -345
  65. package/dist/src/sync/hybrid-provider.d.ts +0 -172
  66. package/dist/src/sync/hybrid-provider.js +0 -477
  67. package/dist/src/sync/provider.d.ts +0 -11
  68. package/dist/src/sync/provider.js +0 -67
  69. package/dist/src/sync/verify.d.ts +0 -1
  70. package/dist/src/sync/verify.js +0 -23
  71. package/dist/tsconfig.tsbuildinfo +0 -1
@@ -1,182 +0,0 @@
1
- export type OAuthProvider = 'google' | 'apple' | 'github' | 'discord' | 'twitter';
2
- export interface OAuthIdentity {
3
- provider: OAuthProvider;
4
- providerId: string;
5
- email?: string;
6
- displayName?: string;
7
- photoURL?: string;
8
- linkedAt: string;
9
- }
10
- export interface StoredIdentity {
11
- did: string;
12
- publicKey: string;
13
- encryptedPrivateKey: string;
14
- salt: string;
15
- oauthIdentities: OAuthIdentity[];
16
- createdAt: string;
17
- updatedAt: string;
18
- }
19
- export declare class AuthManager {
20
- private keypair;
21
- private did;
22
- private oauthIdentities;
23
- private relayUrl;
24
- private initialized;
25
- constructor(relayUrl?: string);
26
- /**
27
- * Initialize the auth manager, loading existing keypair or creating new one
28
- */
29
- init(): Promise<string>;
30
- /**
31
- * Get the DID (Decentralized Identifier)
32
- */
33
- getDID(): string;
34
- /**
35
- * Get linked OAuth identities
36
- */
37
- getLinkedIdentities(): OAuthIdentity[];
38
- /**
39
- * Check if initialized
40
- */
41
- isInitialized(): boolean;
42
- /**
43
- * Save the keypair to IndexedDB (encrypted with password)
44
- * This enables persistent identity across sessions
45
- */
46
- saveKeypair(password: string): Promise<void>;
47
- /**
48
- * Load keypair from IndexedDB (requires password to decrypt)
49
- * Returns true if successfully loaded, false if no stored identity
50
- */
51
- loadKeypair(password?: string): Promise<boolean>;
52
- /**
53
- * Bind an OAuth identity to this UCAN identity
54
- * Verifies the OAuth token with the Relay and stores the binding
55
- */
56
- bindOAuthIdentity(provider: OAuthProvider, oauthToken: string, password: string): Promise<OAuthIdentity>;
57
- /**
58
- * Recover keypair from cloud escrow using password
59
- * Fetches encrypted escrow from Relay and decrypts locally
60
- */
61
- recoverFromEscrow(provider: OAuthProvider, oauthToken: string, password: string): Promise<boolean>;
62
- /**
63
- * Upload keypair escrow to cloud for recovery
64
- * The escrow is encrypted with the user's password
65
- */
66
- createEscrow(password: string): Promise<void>;
67
- /**
68
- * Issue a UCAN token for room access
69
- */
70
- issueRoomToken(roomAudience: string, roomName: string): Promise<string>;
71
- /**
72
- * Issue a UCAN token with custom capabilities
73
- */
74
- issueToken(audience: string, capabilities: Array<{
75
- with: {
76
- scheme: string;
77
- hierPart: string;
78
- };
79
- can: {
80
- namespace: string;
81
- segments: string[];
82
- };
83
- }>, lifetimeInSeconds?: number): Promise<string>;
84
- /**
85
- * Clear local identity (logout)
86
- */
87
- /**
88
- * Clear local identity (logout)
89
- * @param injectedDb (for testing only) - pass a mock IndexedDB instance
90
- */
91
- clearIdentity(injectedDb?: any): Promise<void>;
92
- /**
93
- * Parse a UCAN token and extract its structure without verification
94
- * This is for inspection/debugging purposes
95
- */
96
- parseUCAN(token: string): ParsedUCAN | null;
97
- /**
98
- * Check if keypair is loaded and ready for signing
99
- */
100
- isKeypairLoaded(): boolean;
101
- /**
102
- * Get current DID or null if not initialized
103
- */
104
- getCurrentDID(): string | null;
105
- /**
106
- * Get full auth status for introspection
107
- */
108
- getAuthStatus(): AuthStatus;
109
- /**
110
- * Get linked devices (from OAuth identities)
111
- */
112
- getLinkedDevices(): LinkedDevice[];
113
- /**
114
- * Generate a device linking token for QR code display
115
- * This token allows another device to link to this identity
116
- */
117
- generateLinkToken(expirationMinutes?: number): Promise<LinkToken | null>;
118
- /**
119
- * Revoke a linked device (by provider and providerId)
120
- */
121
- revokeDevice(provider: OAuthProvider, providerId: string, password: string): Promise<boolean>;
122
- }
123
- export interface UCANHeader {
124
- alg: string;
125
- typ: string;
126
- ucv?: string;
127
- }
128
- export interface UCANCapability {
129
- can: string;
130
- with: string;
131
- delegationDepth?: number;
132
- constraints?: Record<string, unknown>;
133
- }
134
- export interface UCANPayload {
135
- iss: string;
136
- aud: string;
137
- exp?: number;
138
- nbf?: number;
139
- nnc?: string;
140
- att: UCANCapability[];
141
- prf: string[];
142
- fct: Record<string, unknown>;
143
- }
144
- export interface ParsedUCAN {
145
- valid: boolean;
146
- error?: string;
147
- header?: UCANHeader;
148
- payload?: UCANPayload;
149
- signature?: string;
150
- meta?: {
151
- isExpired: boolean;
152
- isNotYetValid: boolean;
153
- expiresIn: number | null;
154
- proofCount: number;
155
- capabilityCount: number;
156
- hasKarma: boolean;
157
- karma?: number;
158
- };
159
- }
160
- export interface AuthStatus {
161
- initialized: boolean;
162
- keypairLoaded: boolean;
163
- did: string | null;
164
- linkedIdentityCount: number;
165
- linkedProviders: OAuthProvider[];
166
- relayUrl: string;
167
- }
168
- export interface LinkedDevice {
169
- provider: OAuthProvider;
170
- providerId: string;
171
- email?: string;
172
- displayName?: string;
173
- photoURL?: string;
174
- linkedAt: string;
175
- }
176
- export interface LinkToken {
177
- token: string;
178
- did: string;
179
- expiresAt: string;
180
- qrData: string;
181
- }
182
- export declare const auth: AuthManager;