@mnemosyne_os/sdk 1.0.0 → 1.2.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.
package/dist/index.d.cts CHANGED
@@ -1,27 +1,73 @@
1
1
  import { z } from 'zod';
2
2
 
3
3
  /**
4
- * @mnemosyne/sdk — Public Types
4
+ * @mnemosyne_os/sdk — Public Types
5
5
  *
6
- * Ce fichier est la surface publique du SDK.
7
- * Toute modification ici constitue un changement de contrat API.
6
+ * This file is the public API contract surface of the SDK.
7
+ * Any modification here constitutes a breaking or additive API change.
8
+ *
9
+ * Version history:
10
+ * v1.1.0 — initial types (ingest, query, git, agents, NFT, NeuralGraph)
11
+ * v1.2.0 — custom vault support, Resonance types, Correlate/Forget/DynamicSpine API
8
12
  *
9
13
  * [SDK][ZERO-TRUST][AUDIT-TRAIL]
10
14
  */
11
- /** Scopes disponibles pour une app tierce */
12
- type MnemoScope = 'vault:read:DEV' | 'vault:write:DEV' | 'vault:read:SOCIAL' | 'vault:write:SOCIAL' | 'vault:read:PERSONAL' | 'vault:write:PERSONAL' | 'vault:read:FINANCE' | 'vault:write:FINANCE' | 'vault:read:COOK' | 'vault:write:COOK' | 'share:request' | 'share:grant'
13
- /** Validation de licence NFT on-chain pour MnemoStore */
15
+ /**
16
+ * All available permission scopes for a Layer 2 application.
17
+ *
18
+ * Scopes follow the pattern `resource:action:target`.
19
+ * Any scope not listed here is silently refused by the Zero-Trust gate.
20
+ *
21
+ * **Custom vault scopes:**
22
+ * Use `vault:read:CUSTOM` / `vault:write:CUSTOM` to request read/write access
23
+ * to any custom vault created by the user. The actual vault ID is resolved at
24
+ * runtime from the `vaults` field of the manifest.
25
+ */
26
+ type MnemoScope = 'vault:read:DEV' | 'vault:write:DEV' | 'vault:read:SOCIAL' | 'vault:write:SOCIAL' | 'vault:read:PERSONAL' | 'vault:write:PERSONAL' | 'vault:read:FINANCE' | 'vault:write:FINANCE' | 'vault:read:RESEARCH' | 'vault:write:RESEARCH'
27
+ /** Wildcard scope — grants read access to any user-created custom vault. */
28
+ | 'vault:read:CUSTOM'
29
+ /** Wildcard scope — grants write access to any user-created custom vault. */
30
+ | 'vault:write:CUSTOM' | 'share:request' | 'share:grant'
31
+ /** Read access to the Mnemosyne OS monorepo git log. */
32
+ | 'monorepo:read'
33
+ /** List active connected SDK agents. */
34
+ | 'agents:read'
35
+ /** On-chain NFT licence validation for MnemoStore. Premium scope. */
14
36
  | 'nft:validate'
15
- /** Accès en lecture au NeuralGraph (nœuds, arêtes, clusters) */
37
+ /** Read access to the NeuralGraph (nodes, edges, clusters). */
16
38
  | 'neural:graph:read'
17
- /** Requêtes LLM directes via le runtime Mnemosyne scope premium */
18
- | 'llm:query';
19
- /** Intents IPC autorisés */
20
- type MnemoIntent = 'INGEST' | 'QUERY' | 'CORRELATE' | 'FORGET';
21
- /** Vault cible */
22
- type MnemoVault = 'DEV' | 'SOCIAL' | 'PERSONAL' | 'FINANCE' | 'COOK';
23
- /** Types de spine */
24
- type SpineType = 'GIT' | 'ARCHITECTURE' | 'DECISION' | 'DEBUG' | 'FEATURE' | 'REDDIT_POST' | 'LINKEDIN_POST' | 'SOCIAL_NODE' | 'DOCUMENT' | 'NOTE' | 'CUSTOM';
39
+ /** Direct LLM queries via the Mnemosyne runtime. Premium scope. */
40
+ | 'llm:query'
41
+ /**
42
+ * [PHASE-58] Read access to the Perpetual Memory Bridges.
43
+ * Allows a Layer 2 app to call getBridgeHistory() and computeResonance().
44
+ * Write access (saveBridges) is CORE-ONLY and not exposed to Layer 2.
45
+ */
46
+ | 'bridge:read';
47
+ /**
48
+ * Allowed IPC intents for a Layer 2 application.
49
+ * An intent is the high-level operation the app is permitted to perform.
50
+ * Each intent maps to one or more WS server routes.
51
+ */
52
+ type MnemoIntent = 'INGEST' /** Write content to a vault (triggers vectorization). */ | 'QUERY' /** Semantic search against a vault. */ | 'CORRELATE' /** Find causal/temporal/semantic links between chronicles. */ | 'FORGET' /** Delete a chronicle by ID (GDPR). */ | 'GIT_LOG' /** Read the monorepo git commit log. */ | 'LIST_AGENTS' /** List active SDK agents connected to the WS server. */ | 'LIST_VAULTS' /** Discover available vaults (core + custom). */ | 'BRIDGE_READ'; /** [PHASE-58] Read bridge history and compute resonance scores. */
53
+ /**
54
+ * Target vault identifier.
55
+ *
56
+ * Core vaults are fixed string literals.
57
+ * Custom vaults created via Phase 41 are identified by an opaque uppercase string ID
58
+ * (e.g. `'MY_NOTES'`). Discover available custom vault IDs via `sdk.vaults.list`.
59
+ */
60
+ type MnemoVault = 'DEV' | 'SOCIAL' | 'PERSONAL' | 'FINANCE' | 'RESEARCH' | (string & {});
61
+ /** Types de spine sémantiques */
62
+ type SpineType = 'GIT' | 'ARCHITECTURE' | 'DECISION' | 'DEBUG' | 'FEATURE' | 'REDDIT_POST' | 'LINKEDIN_POST' | 'SOCIAL_NODE' | 'DOCUMENT' | 'NOTE' | 'CUSTOM'
63
+ /** Créé par le Cockpit ou via sdk.resonances.list */
64
+ | 'RESONANCE'
65
+ /** Persistance de session / contexte de reprise */
66
+ | 'SESSION'
67
+ /** Mise à jour de position (phase, état courant) */
68
+ | 'POSITION_UPDATE' | 'API' | 'DOC' | 'ERROR'
69
+ /** [PHASE-64] Affective & Ideational Spines */
70
+ | 'EPIPHANY' | 'EMOTIONAL' | 'TENSION' | 'FLOW' | 'IDEATIONAL' | 'HYPOTHESIS' | 'CONCERN' | 'VISION' | 'CONTEXTUAL' | 'DISCOVERY' | (string & {});
25
71
  /** Manifest de l'application — fichier `app.manifest.json` */
26
72
  interface AppManifest {
27
73
  /** Identifiant unique stable de l'app (snake_case recommandé) */
@@ -95,19 +141,71 @@ interface QueryOptions {
95
141
  vault?: MnemoVault;
96
142
  /** Seuil de similarité minimum 0-1 (défaut: 0.0) */
97
143
  threshold?: number;
144
+ /**
145
+ * [SDK 1.2 — Semantic Bridge] Opt-in true semantic ranking.
146
+ *
147
+ * When `false` / omitted, the server returns the N most recent chronicles
148
+ * (the Cockpit fast-path, ~5ms, query text ignored).
149
+ *
150
+ * When `true`, the server embeds the query via the host's active model
151
+ * (Vertex 768D / e5-base / Hybrid) and ranks via `querySemanticContext`
152
+ * with cosine similarity × spineType weight under the cognitive `scope`.
153
+ *
154
+ * Use `true` for agent-style queries where relevance matters more than
155
+ * recency. Default behaviour stays "recent" to preserve historical
156
+ * contracts (notably Cockpit's live feed).
157
+ */
158
+ semantic?: boolean;
159
+ /**
160
+ * [SDK 1.2] Cognitive ranking scope for type-weighting. Only meaningful
161
+ * when `semantic: true`. Defaults to `'SOURCE_CODE'` server-side, which
162
+ * boosts ARCHITECTURE / GIT / API spines and dampens DOCUMENT / VISION.
163
+ * Other valid scopes depend on the host's `type-weights.ts` table.
164
+ */
165
+ scope?: string;
166
+ /**
167
+ * [SDK 1.2] Optional whitelist of spineTypes to restrict results to.
168
+ * Server-side SQL `IN` clause. Example: `['ARCHITECTURE', 'GIT']` to
169
+ * surface design docs + commit history only.
170
+ */
171
+ spineTypeFilter?: string[];
98
172
  }
99
173
  interface Chronicle {
100
174
  id: string;
101
- content: string;
175
+ /** Contenu textuel du chronicle. Peut être absent si seul le vecteur est stocké. */
176
+ content?: string;
102
177
  spineType: SpineType;
103
178
  score: number;
104
179
  timestamp: string;
105
180
  source_app_id: string;
106
181
  }
182
+ /**
183
+ * [SDK 1.2 — Semantic Bridge] Debug breadcrumb returned by the server when
184
+ * the client opted into `semantic: true`. Lets agents distinguish "I asked
185
+ * for semantic and got it" from "I asked for semantic and it silently fell
186
+ * back to recent" (and why). Only populated on opt-in.
187
+ */
188
+ interface QuerySemanticDebug {
189
+ /** Did the client request semantic ranking? Always true when this field is present. */
190
+ wanted: boolean;
191
+ /** Did the semantic branch actually execute? (false ⇒ fell back to recent, see `error`) */
192
+ used: boolean;
193
+ /** Dimension of the embedding vector used (768 for Vertex/e5-base, 512 for nomic local). */
194
+ vectorDim?: number;
195
+ /** Total chronicle count in the target vault at query time. */
196
+ vaultSize?: number;
197
+ /** Error message if `used` is false. Examples: provider not registered, vector dim mismatch. */
198
+ error?: string;
199
+ }
107
200
  interface QueryResult {
108
201
  success: boolean;
109
202
  chronicles: Chronicle[];
110
203
  error?: string;
204
+ /**
205
+ * [SDK 1.2] Present only when the client sent `semantic: true`. See
206
+ * {@link QuerySemanticDebug}. Absent on fast-path / non-opt-in queries.
207
+ */
208
+ _semantic?: QuerySemanticDebug;
111
209
  }
112
210
  interface ShareRequest {
113
211
  /** App source dont on veut lire les vecteurs */
@@ -127,6 +225,175 @@ interface RegisterResult {
127
225
  expiresAt: number;
128
226
  appId: string;
129
227
  }
228
+ /**
229
+ * Describes a vault (core or custom) returned by `sdk.vaults.list`.
230
+ * Use `id` as the `vault` parameter in `ingest()` and `query()` calls.
231
+ */
232
+ interface VaultInfo {
233
+ /** Unique vault identifier (uppercase, e.g. `'DEV'`, `'MY_NOTES'`). */
234
+ id: string;
235
+ /** Human-readable display name. */
236
+ displayName: string;
237
+ /** Whether this is a built-in core vault (`true`) or user-created (`false`). */
238
+ fixed: boolean;
239
+ /** Accent color (hex) for UI rendering. */
240
+ color: string;
241
+ /** Chronicle count at query time. */
242
+ chronicleCount: number;
243
+ /** SQLite file size in KB. */
244
+ sizeKb: number;
245
+ }
246
+ interface VaultListResult {
247
+ success: boolean;
248
+ /** Core vaults (DEV, SOCIAL, PERSONAL, FINANCE, RESEARCH). */
249
+ coreVaults: VaultInfo[];
250
+ /** User-created custom vaults. */
251
+ customVaults: VaultInfo[];
252
+ error?: string;
253
+ }
254
+ /**
255
+ * Options for a causal/semantic correlation query.
256
+ * Finds chronicles that are causally or semantically linked to a source chronicle.
257
+ */
258
+ interface CorrelateOptions {
259
+ /** ID of the source chronicle to find correlations for. */
260
+ sourceId: string;
261
+ /** Maximum number of correlations to return (default: 10). */
262
+ limit?: number;
263
+ /** Vault to search in (defaults to the app's primary vault). */
264
+ vault?: MnemoVault;
265
+ /** Minimum correlation strength 0-1 (default: 0.5). */
266
+ threshold?: number;
267
+ }
268
+ interface CorrelationEntry {
269
+ chronicle: Chronicle;
270
+ /** Correlation strength between 0 and 1. */
271
+ strength: number;
272
+ /** Nature of the link between the two chronicles. */
273
+ type: 'causal' | 'temporal' | 'semantic';
274
+ }
275
+ interface CorrelateResult {
276
+ success: boolean;
277
+ correlations: CorrelationEntry[];
278
+ error?: string;
279
+ }
280
+ /**
281
+ * Result of a `sdk.forget` call.
282
+ * Deletes a chronicle by ID from the vault. Requires `vault:write:*` scope.
283
+ */
284
+ interface ForgetResult {
285
+ success: boolean;
286
+ /** ID of the deleted chronicle. */
287
+ deletedId: string;
288
+ error?: string;
289
+ }
290
+ /**
291
+ * Request to allocate a new dynamic spine in the OS registry.
292
+ * Dynamic spines allow Layer 2 apps to define their own semantic categories
293
+ * that appear in the Mnemosyne OS neural graph alongside core spine types.
294
+ *
295
+ * Requires scope `vault:write:CUSTOM` and the Protocole du Guichet to be active.
296
+ */
297
+ interface DynamicSpineRequest {
298
+ /** Unique ID for this spine (snake_case, e.g. `'my_app_events'`). */
299
+ id: string;
300
+ /** Display name shown in the OS neural graph. */
301
+ name: string;
302
+ /** Base spine type to inherit semantic weight from. */
303
+ type: SpineType | string;
304
+ /** Emoji or icon key for UI rendering. */
305
+ icon: string;
306
+ /** Short description of what this spine captures. */
307
+ description?: string;
308
+ }
309
+ interface DynamicSpineResult {
310
+ success: boolean;
311
+ /** Full spine ID as registered (may be namespaced, e.g. `'my-app/my_events'`). */
312
+ spineId?: string;
313
+ error?: string;
314
+ }
315
+ interface DynamicSpineInfo {
316
+ id: string;
317
+ name: string;
318
+ type: string;
319
+ icon: string;
320
+ /** App ID that owns this spine. */
321
+ ownerAppId: string;
322
+ /** ISO timestamp of allocation. */
323
+ allocatedAt: string;
324
+ }
325
+ /**
326
+ * A Resonance record returned by `sdk.resonances.list`.
327
+ * Resonances are cognitive projects tracked in the DEV vault.
328
+ */
329
+ interface ResonanceRecord {
330
+ /** Unique resonance identifier (e.g. `'agent-cockpit'`). */
331
+ id: string;
332
+ /** Display name of the resonance. */
333
+ name: string;
334
+ /** Current lifecycle status. */
335
+ status: 'active' | 'paused' | 'done';
336
+ spineType: 'RESONANCE';
337
+ /** Number of chronicles tagged with this resonance. */
338
+ spineCount: number;
339
+ /** Number of agents currently working on this resonance. */
340
+ agentCount: number;
341
+ /** Milliseconds since last activity. */
342
+ lastActivity: number;
343
+ /** Last known position string (set via `updatePosition`). */
344
+ lastPosition?: string;
345
+ }
346
+ /**
347
+ * Result of `sdk.resonance.updatePosition`.
348
+ */
349
+ interface PositionUpdateResult {
350
+ /** Whether the position was persisted. */
351
+ ok: boolean;
352
+ resonanceId: string;
353
+ phase: string;
354
+ /** Unix timestamp (ms) of the update. */
355
+ ts: number;
356
+ }
357
+ /**
358
+ * Un commit git retourné par MNEMOSYNE_METHODS.GIT_LOG.
359
+ * Le path du repo est hardcodé côté serveur (Zero-Trust).
360
+ */
361
+ interface GitCommit {
362
+ hash: string;
363
+ fullHash?: string;
364
+ author: string;
365
+ message: string;
366
+ /** Type conventional commit (feat/fix/chore/…) */
367
+ type: string;
368
+ ts: number;
369
+ repo: string;
370
+ }
371
+ /** Options for MnemoClient.gitLog(). */
372
+ interface GitLogOptions {
373
+ /** Number of commits to return (default: 20, server cap: 50). */
374
+ limit?: number;
375
+ /** Time range filter (e.g. "7 days ago", "2024-01-01"). */
376
+ since?: string;
377
+ /** Filter commits by message pattern (e.g. "[RESONANCE:agent-cockpit]"). */
378
+ filter?: string;
379
+ }
380
+ /** Result of MnemoClient.gitLog(). */
381
+ interface GitLogResult {
382
+ success: boolean;
383
+ commits: GitCommit[];
384
+ error?: string;
385
+ }
386
+ /**
387
+ * Un agent SDK retourné par MNEMOSYNE_METHODS.LIST_AGENTS.
388
+ */
389
+ interface AgentInfo {
390
+ id: string;
391
+ name: string;
392
+ provider: string;
393
+ status: 'active' | 'idle' | 'offline';
394
+ resonanceId?: string;
395
+ sessionMs?: number;
396
+ }
130
397
  /**
131
398
  * Paramètres pour valider une licence NFT.
132
399
  * La validation se fait on-chain via le runtime Mnemosyne OS (pas directement dans le SDK).
@@ -171,7 +438,94 @@ interface GraphQueryResult {
171
438
  centerNodeId?: string;
172
439
  error?: string;
173
440
  }
174
- type MnemoEventType = 'connected' | 'disconnected' | 'error' | 'tamper-alert' | 'share-request' | 'nft-revoked';
441
+ type MnemoEventType = 'connected' | 'disconnected' | 'error' | 'tamper-alert' | 'share-request'
442
+ /** Fired when a connected NFT licence is transferred mid-session. */
443
+ | 'nft-revoked'
444
+ /** Fired by the OS when another app ingests a new chronicle. */
445
+ | 'chronicle:new'
446
+ /** Fired when a Layer 2 dynamic spine is allocated or released. */
447
+ | 'spine:change'
448
+ /**
449
+ * [PHASE-58] Fired after each Semantic Reflect scan persists new bridges.
450
+ * payload: { sessionId, newCount, knownCount, totalFound }
451
+ */
452
+ | 'bridge:new';
453
+ /**
454
+ * A semantic bridge between two chronicles in different vaults.
455
+ * Returned by getBridgeHistory().
456
+ * [PHASE-58][PLATFORM][READ-ONLY]
457
+ */
458
+ interface BridgeRecord {
459
+ id: number;
460
+ scanned_at: string;
461
+ from_id: number;
462
+ from_vault: string;
463
+ from_spine: string;
464
+ from_label: string;
465
+ to_id: number;
466
+ to_vault: string;
467
+ to_spine: string;
468
+ to_label: string;
469
+ /** Cosine similarity score (0-1). High values = strong cognitive link. */
470
+ cosine: number;
471
+ /** UUID of the scan session that discovered this bridge. */
472
+ session_id: string | null;
473
+ /** 1 if this bridge was never seen before this scan, 0 if already known. */
474
+ is_new: 0 | 1;
475
+ /** JSON array of tags (reserved for future use). */
476
+ tags: string;
477
+ }
478
+ /**
479
+ * A bridge scan session — groups all bridges found in one Semantic Reflect run.
480
+ */
481
+ interface BridgeScanSession {
482
+ /** UUID — unique session identifier. */
483
+ id: string;
484
+ scanned_at: string;
485
+ threshold: number;
486
+ total_found: number;
487
+ new_count: number;
488
+ llm_synthesis: string | null;
489
+ duration_ms: number | null;
490
+ }
491
+ /** Options for getBridgeHistory(). */
492
+ interface BridgeHistoryOptions {
493
+ /** Maximum bridges to return (default: 500). */
494
+ limit?: number;
495
+ /** ISO timestamp — only return bridges after this date. */
496
+ since?: string;
497
+ /** Minimum cosine similarity (0-1, default: 0.0). */
498
+ minCosine?: number;
499
+ /** Filter by source vault (default: 'ALL'). */
500
+ vaultFilter?: 'DEV' | 'SOCIAL' | 'PERSONAL' | 'ALL';
501
+ /** Only return bridges that were new when first discovered. */
502
+ onlyNew?: boolean;
503
+ }
504
+ /** Result of getBridgeHistory(). */
505
+ interface BridgeHistoryResult {
506
+ success: boolean;
507
+ bridges: BridgeRecord[];
508
+ error?: string;
509
+ }
510
+ /**
511
+ * Result of computeResonance() — resonance score for a text before publication.
512
+ * [PLATFORM] Use this to gate social posts on cognitive relevance.
513
+ */
514
+ interface ResonanceScore {
515
+ success: boolean;
516
+ /** Aggregated cosine score (0-1). */
517
+ score: number;
518
+ /** Qualitative band: LOW (<0.60), MEDIUM (0.60-0.80), HIGH_RESONANCE (>0.80). */
519
+ level: 'LOW' | 'MEDIUM' | 'HIGH_RESONANCE';
520
+ /** Top K matching bridges. */
521
+ topMatches: Array<{
522
+ bridgeId: number;
523
+ fromLabel: string;
524
+ toLabel: string;
525
+ cosine: number;
526
+ vault: string;
527
+ }>;
528
+ }
175
529
  interface MnemoEvent<T = unknown> {
176
530
  type: MnemoEventType;
177
531
  data: T;
@@ -187,7 +541,14 @@ interface MnemoEvent<T = unknown> {
187
541
  * Format : base64url(header).base64url(payload).base64url(signature)
188
542
  * Algorithme : HMAC-SHA256 (symétrique, secret partagé OS ↔ app)
189
543
  *
190
- * [SDK][SECURITY][AUTH]
544
+ * ## Compat Browser (MN-005)
545
+ * `Buffer.toString('base64url')` n'est pas supporté par le polyfill npm `buffer`.
546
+ * Les helpers b64url() / parseB64url() utilisent une impl universelle :
547
+ * - Node.js : Buffer natif (supporte base64url)
548
+ * - Browser : btoa/atob + remplacement des caractères non-URL
549
+ * Cela permet d'importer les CONSTANTES du SDK dans un renderer Electron sans crash.
550
+ *
551
+ * [SDK][SECURITY][AUTH][MN-005]
191
552
  */
192
553
  interface JwtPayload {
193
554
  sub: string;
@@ -293,12 +654,256 @@ declare class MnemoClient {
293
654
  get isConnected(): boolean;
294
655
  get appId(): string;
295
656
  get appManifest(): AppManifest;
296
- /** Inspecte le token actuel (décodé, sans vérification) */
657
+ /**
658
+ * Inspecte le token actuel (décodé, sans vérification cryptographique).
659
+ * Utilise un décodeur base64url universel (Node + Browser) — MN-005.
660
+ */
297
661
  get tokenInfo(): {
298
662
  sub: string;
299
663
  exp: number;
300
664
  scopes: string[];
301
665
  } | null;
666
+ /**
667
+ * [PHASE-50] Lit un fichier .md depuis le repo OS (docs/, packages/).
668
+ */
669
+ readFile(path: string): Promise<string>;
670
+ /**
671
+ * Returns the most recent git commits from the OS monorepo.
672
+ * Calls the server-side `sdk.git.log` RPC (repo path is hardcoded server-side
673
+ * for Zero-Trust — the client cannot choose it).
674
+ * Requires scope `monorepo:read` and intent `GIT_LOG` in the manifest.
675
+ */
676
+ gitLog(options?: GitLogOptions): Promise<GitLogResult>;
677
+ }
678
+
679
+ /**
680
+ * @mnemosyne_os/sdk — MnemoClientBrowser
681
+ *
682
+ * Client WebSocket 100% browser-native pour les apps Layer 2 qui tournent
683
+ * dans un renderer Electron ou un navigateur web.
684
+ * N'utilise PAS le package `ws` (Node-only) — uniquement l'API WebSocket native.
685
+ *
686
+ * Usage dans une app React/Vite :
687
+ * ```typescript
688
+ * import { MnemoClientBrowser } from '@mnemosyne_os/sdk';
689
+ *
690
+ * const client = await MnemoClientBrowser.connect();
691
+ * await client.register({ id: 'my-app', name: 'My App', version: '1.0.0',
692
+ * mnemosyne_sdk: '^1.1.0', scopes: ['vault:read:DEV'], vaults: ['DEV'], intents: ['QUERY'] });
693
+ *
694
+ * const chronicles = await client.query('my search', 'DEV', 10);
695
+ * ```
696
+ *
697
+ * [SDK][LAYER-2][BROWSER][ZERO-TRUST]
698
+ */
699
+
700
+ /**
701
+ * Client SDK browser-native. Communique avec le SDK WebSocket Server de
702
+ * Mnemosyne OS sur ws://127.0.0.1:7799 via l'API WebSocket standard.
703
+ *
704
+ * Compatible : Chrome, Firefox, Electron renderer, Safari, Vite, Next.js.
705
+ * Non compatible : Node.js (utiliser MnemoClient à la place).
706
+ */
707
+ declare class MnemoClientBrowser {
708
+ private readonly ws;
709
+ private token;
710
+ private readonly pending;
711
+ private _onPush?;
712
+ private _onDisconnect?;
713
+ private readonly timeoutMs;
714
+ private constructor();
715
+ /**
716
+ * Crée une connexion WebSocket native vers le SDK server de Mnemosyne OS.
717
+ *
718
+ * @param host - Hostname du SDK server (défaut: '127.0.0.1')
719
+ * @param port - Port du SDK server (défaut: 7799)
720
+ * @param timeoutMs - Timeout de chaque RPC en ms (défaut: 15000)
721
+ */
722
+ static connect(host?: string, port?: number, timeoutMs?: number): Promise<MnemoClientBrowser>;
723
+ private _handleMsg;
724
+ private call;
725
+ /**
726
+ * Enregistre l'app auprès de Mnemosyne OS et obtient un JWT 24h.
727
+ * Doit être appelé avant toute autre méthode.
728
+ *
729
+ * @throws si le manifest est invalide ou si l'OS refuse l'enregistrement
730
+ */
731
+ register(manifest: AppManifest): Promise<RegisterResult>;
732
+ /**
733
+ * Ingère du contenu dans le vault Mnemosyne.
734
+ * Le contenu est vectorisé par le runtime OS (pas dans le SDK).
735
+ * Requiert le scope `vault:write:<vault>` et l'intent `INGEST`.
736
+ */
737
+ ingest(content: string, spineType: string, vault?: string, metadata?: Record<string, unknown>): Promise<IngestResult>;
738
+ /**
739
+ * Requête sémantique sur le vault — retourne les chronicles les plus proches.
740
+ * Requiert le scope `vault:read:<vault>` et l'intent `QUERY`.
741
+ *
742
+ * @param text - Texte de recherche
743
+ * @param vault - Vault cible (défaut: 'DEV')
744
+ * @param limit - Nombre max de résultats (défaut: 10)
745
+ * @param options - [SDK 1.2] Options sémantiques additionnelles (semantic,
746
+ * scope, spineTypeFilter). Voir {@link QueryOptions}.
747
+ */
748
+ query(text: string, vault?: string, limit?: number, options?: Pick<QueryOptions, 'semantic' | 'scope' | 'spineTypeFilter'>): Promise<Chronicle[]>;
749
+ /**
750
+ * Returns the active Resonances (cognitive projects) from the DEV vault.
751
+ * Requires scope `vault:read:DEV`.
752
+ */
753
+ resonancesList(): Promise<ResonanceRecord[]>;
754
+ /**
755
+ * Persists the current position of a Resonance in the DEV vault.
756
+ * Requires scope `vault:write:DEV`.
757
+ *
758
+ * @param resonanceId - Resonance identifier
759
+ * @param position - Current position description (e.g. 'Phase 51.2 — auto-poll')
760
+ * @param phase - Current phase (e.g. 'Phase 51')
761
+ */
762
+ updatePosition(resonanceId: string, position: string, phase: string): Promise<PositionUpdateResult>;
763
+ /**
764
+ * Retourne les commits récents du monorepo Mnemosyne OS.
765
+ * Requiert le scope `monorepo:read` et l'intent `GIT_LOG`.
766
+ * [SECURITY] Le chemin du repo est hardcodé côté serveur.
767
+ *
768
+ * @param limit - Nombre de commits max (défaut: 20)
769
+ * @param since - Date relative Git (ex: '30 days ago', '2024-01-01')
770
+ */
771
+ gitLog(limit?: number, since?: string): Promise<GitCommit[]>;
772
+ /**
773
+ * Lit un fichier `.md` depuis le repo Mnemosyne OS.
774
+ * Requiert le scope `monorepo:read`.
775
+ * [SECURITY] Seuls les fichiers `.md` sont accessibles, path sanitizé côté serveur.
776
+ *
777
+ * @param path - Chemin relatif au repo (ex: 'docs/ARCHITECTURE.md')
778
+ */
779
+ readFile(path: string): Promise<string>;
780
+ /**
781
+ * Lists Layer 2 apps currently connected to the SDK WebSocket Server.
782
+ * Requires scope `agents:read` and intent `LIST_AGENTS`.
783
+ */
784
+ agentsList(): Promise<AgentInfo[]>;
785
+ /**
786
+ * Returns all available vaults (core built-ins + user-created custom vaults).
787
+ * Use the `id` field of each entry as the `vault` param in `ingest()` and `query()`.
788
+ * Requires intent `LIST_VAULTS`.
789
+ */
790
+ vaultsList(): Promise<VaultListResult>;
791
+ /**
792
+ * Finds chronicles causally or semantically linked to a source chronicle.
793
+ * Requires intent `CORRELATE` and the appropriate vault read scope.
794
+ *
795
+ * @param options - `{ sourceId, vault?, limit?, threshold? }`
796
+ */
797
+ correlate(options: CorrelateOptions): Promise<CorrelateResult>;
798
+ /**
799
+ * Permanently deletes a chronicle by ID. Requires intent `FORGET`
800
+ * and the appropriate vault write scope.
801
+ *
802
+ * @param chronicleId - ID of the chronicle to delete.
803
+ * @param vault - Vault to delete from (default: 'DEV').
804
+ */
805
+ forget(chronicleId: string, vault?: string): Promise<ForgetResult>;
806
+ /**
807
+ * Queries the NeuralGraph — returns nodes and edges near the given text.
808
+ * Requires scope `neural:graph:read`.
809
+ *
810
+ * @param text - Search text to embed and match against the graph.
811
+ * @param threshold - Minimum edge strength 0-1 (default: 0.5).
812
+ */
813
+ graphQuery(text: string, threshold?: number): Promise<GraphQueryResult>;
814
+ /**
815
+ * Allocates a new dynamic spine in the OS Protocole du Guichet registry.
816
+ * Requires scope `vault:write:CUSTOM`.
817
+ *
818
+ * @example
819
+ * ```ts
820
+ * await client.spineRegister({
821
+ * id: 'my_events', name: 'App Events', type: 'SESSION', icon: '📊'
822
+ * });
823
+ * ```
824
+ */
825
+ spineRegister(spine: DynamicSpineRequest): Promise<DynamicSpineResult>;
826
+ /**
827
+ * Releases a dynamic spine previously allocated by this app.
828
+ * Requires scope `vault:write:CUSTOM`.
829
+ */
830
+ spineRelease(spineId: string): Promise<{
831
+ success: boolean;
832
+ error?: string;
833
+ }>;
834
+ /**
835
+ * Lists all currently allocated dynamic spines across all apps.
836
+ */
837
+ spineList(): Promise<DynamicSpineInfo[]>;
838
+ /**
839
+ * Returns the persistent semantic bridges stored in the user's vault.
840
+ * Bridges are cognitive links discovered by Semantic Reflect scans between
841
+ * cross-vault chronicles (e.g. SOCIAL ⇔ DEV, PERSONAL ⇔ DEV).
842
+ *
843
+ * [PHASE-58][PLATFORM][READ-ONLY]
844
+ *
845
+ * Required manifest: `scopes: ['bridge:read']`, `intents: ['BRIDGE_READ']`
846
+ *
847
+ * @param options - Optional filters: `{ limit, since, minCosine, vaultFilter, onlyNew }`
848
+ *
849
+ * @example
850
+ * ```typescript
851
+ * const result = await client.getBridgeHistory({ minCosine: 0.80, limit: 50 });
852
+ * console.log(`${result.bridges.length} high-confidence bridges`);
853
+ * ```
854
+ */
855
+ getBridgeHistory(options?: BridgeHistoryOptions): Promise<BridgeHistoryResult>;
856
+ /**
857
+ * Computes a resonance score for a text against the user's bridge history.
858
+ * Use this to measure cognitive relevance before publishing a social post.
859
+ *
860
+ * [PHASE-58][PLATFORM][READ-ONLY]
861
+ *
862
+ * Required manifest: `scopes: ['bridge:read']`, `intents: ['BRIDGE_READ']`
863
+ *
864
+ * @param text - Text to score (e.g. LinkedIn/Reddit post draft).
865
+ * @param topK - Number of top matches to return (default: 5).
866
+ *
867
+ * @returns { score: 0-1, level: 'LOW'|'MEDIUM'|'HIGH_RESONANCE', topMatches }
868
+ *
869
+ * @example
870
+ * ```typescript
871
+ * const score = await client.computeResonance(postDraft, 5);
872
+ * if (score.level === 'HIGH_RESONANCE') {
873
+ * console.log('✨ This post aligns with your cognitive graph!');
874
+ * }
875
+ * ```
876
+ */
877
+ computeResonance(text: string, topK?: number): Promise<ResonanceScore>;
878
+ /**
879
+ * Enregistre un handler pour les push events envoyés par l'OS.
880
+ * Déclenché par exemple quand un autre client ingère un chronicle (`chronicle:new`).
881
+ *
882
+ * @example
883
+ * ```typescript
884
+ * client.onPush((event) => {
885
+ * if (event.type === 'chronicle:new') {
886
+ * console.log('New chronicle from:', event.sourceApp);
887
+ * }
888
+ * });
889
+ * ```
890
+ */
891
+ onPush(fn: (event: Record<string, unknown>) => void): void;
892
+ /**
893
+ * Enregistre un callback appelé quand la connexion WS est fermée par l'OS.
894
+ */
895
+ onDisconnect(fn: () => void): void;
896
+ /**
897
+ * Ferme la connexion WebSocket proprement.
898
+ */
899
+ close(): void;
900
+ get isConnected(): boolean;
901
+ /** Token JWT actuel (null avant register()) */
902
+ get currentToken(): string | null;
903
+ /**
904
+ * AppId extrait du JWT actuel, ou null si non enregistré.
905
+ */
906
+ get appId(): string | null;
302
907
  }
303
908
 
304
909
  /**
@@ -307,30 +912,52 @@ declare class MnemoClient {
307
912
  * Valide le fichier app.manifest.json avant toute connexion.
308
913
  * Utilise Zod pour un parsing strict — aucun champ inconnu passé au serveur.
309
914
  *
310
- * [SDK][ZERO-TRUST][AUDIT-TRAIL]
915
+ * ## Règle Zero-Trust (MN-004)
916
+ * Le GRANT utilisateur est TOUJOURS requis si l'app déclare un scope vault:*.
917
+ * Ce n'est PAS un flag que l'app contrôle — c'est l'OS qui décide en lisant les scopes.
918
+ * Un manifest avec `requires_grant: false` mais `scopes: ['vault:read:DEV']` DOIT
919
+ * quand même passer par le popup de consentement. L'OS appelle `requiresOsGrant(manifest)`.
920
+ *
921
+ * [SDK][ZERO-TRUST][AUDIT-TRAIL][MN-004]
311
922
  */
312
923
 
313
- declare const VALID_SCOPES: readonly ["vault:read:DEV", "vault:write:DEV", "vault:read:SOCIAL", "vault:write:SOCIAL", "vault:read:PERSONAL", "vault:write:PERSONAL", "vault:read:FINANCE", "vault:write:FINANCE", "vault:read:COOK", "vault:write:COOK", "share:request", "share:grant"];
924
+ declare const VALID_SCOPES: readonly ["vault:read:DEV", "vault:write:DEV", "vault:read:SOCIAL", "vault:write:SOCIAL", "vault:read:PERSONAL", "vault:write:PERSONAL", "vault:read:FINANCE", "vault:write:FINANCE", "vault:read:RESEARCH", "vault:write:RESEARCH", "vault:read:CUSTOM", "vault:write:CUSTOM", "share:request", "share:grant", "monorepo:read", "agents:read", "nft:validate", "neural:graph:read", "llm:query", "bridge:read"];
925
+ /**
926
+ * Scopes qui requièrent TOUJOURS un GRANT utilisateur côté OS.
927
+ * Indépendant de tout flag déclaré par l'app.
928
+ * [MN-004]
929
+ */
930
+ declare const GRANT_REQUIRED_SCOPE_PREFIXES: readonly ["vault:read:", "vault:write:", "share:request", "share:grant", "llm:query"];
314
931
  declare const AppManifestSchema: z.ZodObject<{
315
932
  id: z.ZodString;
316
933
  name: z.ZodString;
317
934
  version: z.ZodString;
318
935
  author: z.ZodOptional<z.ZodString>;
319
936
  mnemosyne_sdk: z.ZodString;
320
- scopes: z.ZodArray<z.ZodEnum<["vault:read:DEV", "vault:write:DEV", "vault:read:SOCIAL", "vault:write:SOCIAL", "vault:read:PERSONAL", "vault:write:PERSONAL", "vault:read:FINANCE", "vault:write:FINANCE", "vault:read:COOK", "vault:write:COOK", "share:request", "share:grant"]>, "many">;
321
- vaults: z.ZodArray<z.ZodEnum<["DEV", "SOCIAL", "PERSONAL", "FINANCE", "COOK"]>, "many">;
322
- intents: z.ZodArray<z.ZodEnum<["INGEST", "QUERY", "CORRELATE", "FORGET"]>, "many">;
937
+ scopes: z.ZodArray<z.ZodEnum<["vault:read:DEV", "vault:write:DEV", "vault:read:SOCIAL", "vault:write:SOCIAL", "vault:read:PERSONAL", "vault:write:PERSONAL", "vault:read:FINANCE", "vault:write:FINANCE", "vault:read:RESEARCH", "vault:write:RESEARCH", "vault:read:CUSTOM", "vault:write:CUSTOM", "share:request", "share:grant", "monorepo:read", "agents:read", "nft:validate", "neural:graph:read", "llm:query", "bridge:read"]>, "many">;
938
+ /**
939
+ * Vaults the app can access.
940
+ * Core vaults must use the built-in identifiers (DEV, SOCIAL, etc.).
941
+ * Custom vault IDs are opaque uppercase strings — the manifest may list them
942
+ * here to pre-declare intent, and the OS validates them at runtime.
943
+ */
944
+ vaults: z.ZodArray<z.ZodUnion<[z.ZodEnum<["DEV", "SOCIAL", "PERSONAL", "FINANCE", "RESEARCH"]>, z.ZodString]>, "many">;
945
+ intents: z.ZodArray<z.ZodEnum<["INGEST", "QUERY", "CORRELATE", "FORGET", "GIT_LOG", "LIST_AGENTS", "LIST_VAULTS", "BRIDGE_READ"]>, "many">;
323
946
  max_chronicle_size_kb: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
947
+ /**
948
+ * @deprecated Remplacé par requiresOsGrant() — ce flag n'a aucun effet sur la sécurité.
949
+ * L'OS décide toujours en fonction des scopes déclarés (MN-004).
950
+ */
324
951
  requires_consent: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
325
952
  description: z.ZodOptional<z.ZodString>;
326
- }, "strict", z.ZodTypeAny, {
953
+ }, "strip", z.ZodTypeAny, {
327
954
  id: string;
328
955
  name: string;
329
956
  version: string;
330
957
  mnemosyne_sdk: string;
331
- scopes: ("vault:read:DEV" | "vault:write:DEV" | "vault:read:SOCIAL" | "vault:write:SOCIAL" | "vault:read:PERSONAL" | "vault:write:PERSONAL" | "vault:read:FINANCE" | "vault:write:FINANCE" | "vault:read:COOK" | "vault:write:COOK" | "share:request" | "share:grant")[];
332
- vaults: ("DEV" | "SOCIAL" | "PERSONAL" | "FINANCE" | "COOK")[];
333
- intents: ("INGEST" | "QUERY" | "CORRELATE" | "FORGET")[];
958
+ scopes: ("vault:read:DEV" | "vault:write:DEV" | "vault:read:SOCIAL" | "vault:write:SOCIAL" | "vault:read:PERSONAL" | "vault:write:PERSONAL" | "vault:read:FINANCE" | "vault:write:FINANCE" | "vault:read:RESEARCH" | "vault:write:RESEARCH" | "vault:read:CUSTOM" | "vault:write:CUSTOM" | "share:request" | "share:grant" | "monorepo:read" | "agents:read" | "nft:validate" | "neural:graph:read" | "llm:query" | "bridge:read")[];
959
+ vaults: string[];
960
+ intents: ("INGEST" | "QUERY" | "CORRELATE" | "FORGET" | "GIT_LOG" | "LIST_AGENTS" | "LIST_VAULTS" | "BRIDGE_READ")[];
334
961
  max_chronicle_size_kb: number;
335
962
  requires_consent: boolean;
336
963
  author?: string | undefined;
@@ -340,9 +967,9 @@ declare const AppManifestSchema: z.ZodObject<{
340
967
  name: string;
341
968
  version: string;
342
969
  mnemosyne_sdk: string;
343
- scopes: ("vault:read:DEV" | "vault:write:DEV" | "vault:read:SOCIAL" | "vault:write:SOCIAL" | "vault:read:PERSONAL" | "vault:write:PERSONAL" | "vault:read:FINANCE" | "vault:write:FINANCE" | "vault:read:COOK" | "vault:write:COOK" | "share:request" | "share:grant")[];
344
- vaults: ("DEV" | "SOCIAL" | "PERSONAL" | "FINANCE" | "COOK")[];
345
- intents: ("INGEST" | "QUERY" | "CORRELATE" | "FORGET")[];
970
+ scopes: ("vault:read:DEV" | "vault:write:DEV" | "vault:read:SOCIAL" | "vault:write:SOCIAL" | "vault:read:PERSONAL" | "vault:write:PERSONAL" | "vault:read:FINANCE" | "vault:write:FINANCE" | "vault:read:RESEARCH" | "vault:write:RESEARCH" | "vault:read:CUSTOM" | "vault:write:CUSTOM" | "share:request" | "share:grant" | "monorepo:read" | "agents:read" | "nft:validate" | "neural:graph:read" | "llm:query" | "bridge:read")[];
971
+ vaults: string[];
972
+ intents: ("INGEST" | "QUERY" | "CORRELATE" | "FORGET" | "GIT_LOG" | "LIST_AGENTS" | "LIST_VAULTS" | "BRIDGE_READ")[];
346
973
  author?: string | undefined;
347
974
  max_chronicle_size_kb?: number | undefined;
348
975
  requires_consent?: boolean | undefined;
@@ -359,14 +986,39 @@ declare function loadManifest(pathOrManifest: string | AppManifest): AppManifest
359
986
  */
360
987
  declare function parseManifest(raw: unknown): AppManifest;
361
988
  /**
362
- * Vérifie qu'un scope est déclaré dans le manifest.
363
- * Utilisé par MnemoClient avant chaque opération.
989
+ * Validates that a scope is declared in the manifest.
990
+ * Used by MnemoClient before each vault operation.
991
+ *
992
+ * For custom vault operations, the scope `vault:read:CUSTOM` or
993
+ * `vault:write:CUSTOM` is accepted as a wildcard that grants access
994
+ * to any custom vault listed in `manifest.vaults`.
364
995
  */
365
996
  declare function assertScope(manifest: AppManifest, scope: (typeof VALID_SCOPES)[number]): void;
366
997
  /**
367
998
  * Vérifie qu'un vault est accessible selon le manifest.
368
999
  */
369
1000
  declare function assertVault(manifest: AppManifest, vault: string): void;
1001
+ /**
1002
+ * [MN-004] Détermine si l'OS DOIT afficher un popup de consentement utilisateur
1003
+ * AVANT d'autoriser cette app à s'exécuter.
1004
+ *
1005
+ * La décision est basée UNIQUEMENT sur les scopes déclarés dans le manifest.
1006
+ * Elle est imperméable à tout flag (`requires_grant`, `requires_consent`) que
1007
+ * l'app pourrait contrôler elle-même.
1008
+ *
1009
+ * Règle : tout scope avec préfixe `vault:*`, `share:*` ou `llm:query` → GRANT requis.
1010
+ *
1011
+ * @example
1012
+ * ```typescript
1013
+ * import { requiresOsGrant } from '@mnemosyne_os/sdk';
1014
+ * // Dans LAUNCH_LAYER2_APP (main process) :
1015
+ * if (requiresOsGrant(appManifest)) {
1016
+ * const granted = await showPermissionPrompt(appManifest);
1017
+ * if (!granted) return { success: false, error: 'GRANT_DENIED' };
1018
+ * }
1019
+ * ```
1020
+ */
1021
+ declare function requiresOsGrant(manifest: Pick<AppManifest, 'scopes'>): boolean;
370
1022
 
371
1023
  /**
372
1024
  * @mnemosyne_os/sdk — Public Constants
@@ -398,6 +1050,35 @@ declare const MNEMOSYNE_METHODS: {
398
1050
  readonly CORRELATE: "sdk.correlate";
399
1051
  /** Supprime un chronicle par ID (scope vault:write requis) */
400
1052
  readonly FORGET: "sdk.forget";
1053
+ /**
1054
+ * Liste les Resonances actives (projets cognitifs) depuis le vault DEV.
1055
+ * Requiert le scope `vault:read:DEV`.
1056
+ */
1057
+ readonly RESONANCES_LIST: "sdk.resonances.list";
1058
+ /**
1059
+ * Met à jour la position courante d'une Resonance (phase, description).
1060
+ * Persisté comme chronicle DECISION dans le vault DEV.
1061
+ * Requiert le scope `vault:write:DEV`.
1062
+ */
1063
+ readonly UPDATE_POSITION: "sdk.resonance.updatePosition";
1064
+ /**
1065
+ * Lit le git log du monorepo Mnemosyne OS.
1066
+ * Requiert le scope `monorepo:read` dans le manifest.
1067
+ * Retourne les commits filtrés (hash, message, author, date).
1068
+ * [SECURITY] Path hardcodé côté serveur — le client ne contrôle pas le repo.
1069
+ */
1070
+ readonly GIT_LOG: "sdk.git.log";
1071
+ /**
1072
+ * Lit un fichier .md depuis le repo Mnemosyne OS (docs/, packages/).
1073
+ * Requiert le scope `monorepo:read`.
1074
+ * [SECURITY] Seuls les .md sont lisibles, path sanitizé côté serveur.
1075
+ */
1076
+ readonly READ_FILE: "sdk.readFile";
1077
+ /**
1078
+ * Liste les agents actifs connectés au SDK WebSocket Server.
1079
+ * Requiert le scope `agents:read` dans le manifest.
1080
+ */
1081
+ readonly LIST_AGENTS: "sdk.agents.list";
401
1082
  /** Demande d'accès aux chronicles d'une autre app (popup consentement) */
402
1083
  readonly SHARE: "sdk.share";
403
1084
  /**
@@ -407,10 +1088,34 @@ declare const MNEMOSYNE_METHODS: {
407
1088
  */
408
1089
  readonly NFT_VALIDATE: "sdk.nft.validate";
409
1090
  /**
410
- * Requête le NeuralGraph — retourne les nœuds et arêtes proches du texte.
411
- * Requiert le scope `neural:graph:read` dans le manifest.
1091
+ * Queries the NeuralGraph — returns nodes and edges near the given text.
1092
+ * Requires scope `neural:graph:read`.
412
1093
  */
413
1094
  readonly GRAPH_QUERY: "sdk.graph.query";
1095
+ /**
1096
+ * Lists all available vaults (core built-ins + user-created custom vaults).
1097
+ * Requires intent `LIST_VAULTS`.
1098
+ * Returns `VaultListResult` with `coreVaults` and `customVaults` arrays.
1099
+ * Use the `id` field of each vault as the `vault` param in ingest/query.
1100
+ */
1101
+ readonly LIST_VAULTS: "sdk.vaults.list";
1102
+ /**
1103
+ * Allocates a new dynamic spine in the OS neural registry (Protocole du Guichet).
1104
+ * Requires scope `vault:write:CUSTOM`.
1105
+ * The allocated spine appears in the Mnemosyne OS neural graph.
1106
+ */
1107
+ readonly REGISTER_SPINE: "sdk.spine.register";
1108
+ /**
1109
+ * Releases a previously allocated dynamic spine.
1110
+ * Only the owning app can release its own spines.
1111
+ * Requires scope `vault:write:CUSTOM`.
1112
+ */
1113
+ readonly RELEASE_SPINE: "sdk.spine.release";
1114
+ /**
1115
+ * Lists all currently allocated dynamic spines across all registered apps.
1116
+ * Returns an array of `DynamicSpineInfo` objects.
1117
+ */
1118
+ readonly LIST_SPINES: "sdk.spine.list";
414
1119
  };
415
1120
  type MnemoMethod = typeof MNEMOSYNE_METHODS[keyof typeof MNEMOSYNE_METHODS];
416
1121
  /** Port par défaut du SDK WebSocket Server */
@@ -440,4 +1145,4 @@ declare const MNEMOSYNE_CHAINS: {
440
1145
  };
441
1146
  type MnemoChain = keyof typeof MNEMOSYNE_CHAINS;
442
1147
 
443
- export { type AppManifest, AppManifestSchema, type Chronicle, type GraphEdge, type GraphNode, type GraphQueryResult, type IngestPayload, type IngestResult, type JwtPayload, type JwtVerifyResult, MNEMOSYNE_CHAINS, MNEMOSYNE_METHODS, MNEMOSYNE_NFT_CACHE_TTL_MS, MNEMOSYNE_TOKEN_TTL_S, MNEMOSYNE_WS_HOST, MNEMOSYNE_WS_PORT, type MnemoChain, MnemoClient, type MnemoClientOptions, type MnemoEvent, type MnemoEventType, type MnemoIntent, type MnemoMethod, type MnemoScope, type MnemoVault, type NFTLicenseParams, type NFTValidation, type QueryOptions, type QueryResult, type RegisterResult, type ShareRequest, type ShareResult, type SpineType, assertScope, assertVault, generateAppToken, generateSecret, loadManifest, parseManifest, verifyToken };
1148
+ export { type AgentInfo, type AppManifest, AppManifestSchema, type BridgeHistoryOptions, type BridgeHistoryResult, type BridgeRecord, type BridgeScanSession, type Chronicle, type CorrelateOptions, type CorrelateResult, type CorrelationEntry, type DynamicSpineInfo, type DynamicSpineRequest, type DynamicSpineResult, type ForgetResult, GRANT_REQUIRED_SCOPE_PREFIXES, type GitCommit, type GitLogOptions, type GitLogResult, type GraphEdge, type GraphNode, type GraphQueryResult, type IngestPayload, type IngestResult, type JwtPayload, type JwtVerifyResult, MNEMOSYNE_CHAINS, MNEMOSYNE_METHODS, MNEMOSYNE_NFT_CACHE_TTL_MS, MNEMOSYNE_TOKEN_TTL_S, MNEMOSYNE_WS_HOST, MNEMOSYNE_WS_PORT, type MnemoChain, MnemoClient, MnemoClientBrowser, type MnemoClientOptions, type MnemoEvent, type MnemoEventType, type MnemoIntent, type MnemoMethod, type MnemoScope, type MnemoVault, type NFTLicenseParams, type NFTValidation, type PositionUpdateResult, type QueryOptions, type QueryResult, type QuerySemanticDebug, type RegisterResult, type ResonanceRecord, type ResonanceScore, type ShareRequest, type ShareResult, type SpineType, type VaultInfo, type VaultListResult, assertScope, assertVault, generateAppToken, generateSecret, loadManifest, parseManifest, requiresOsGrant, verifyToken };