playlist-data-engine 1.1.1 → 1.3.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/README.md +38 -11
- package/dist/core/analysis/EssentiaPitchDetector.d.ts +7 -0
- package/dist/core/analysis/EssentiaPitchDetector.d.ts.map +1 -1
- package/dist/core/analysis/MusicClassifier.d.ts +31 -0
- package/dist/core/analysis/MusicClassifier.d.ts.map +1 -1
- package/dist/core/parser/MetadataExtractor.d.ts +22 -5
- package/dist/core/parser/MetadataExtractor.d.ts.map +1 -1
- package/dist/core/parser/PlaylistParser.d.ts.map +1 -1
- package/dist/core/parser/TrackExtras.d.ts +177 -0
- package/dist/core/parser/TrackExtras.d.ts.map +1 -0
- package/dist/core/types/Playlist.d.ts +3 -1
- package/dist/core/types/Playlist.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/playlist-data-engine.js +71 -71
- package/dist/playlist-data-engine.mjs +11526 -9315
- package/dist/utils/arweaveGatewayManager.d.ts +82 -13
- package/dist/utils/arweaveGatewayManager.d.ts.map +1 -1
- package/dist/utils/arweaveUtils.d.ts +1 -1
- package/dist/utils/arweaveUtils.d.ts.map +1 -1
- package/dist/utils/ipfsUtils.d.ts +76 -0
- package/dist/utils/ipfsUtils.d.ts.map +1 -0
- package/dist/utils/modelCache.d.ts +87 -0
- package/dist/utils/modelCache.d.ts.map +1 -0
- package/package.json +23 -18
|
@@ -15,6 +15,15 @@
|
|
|
15
15
|
* @module utils/arweaveGatewayManager
|
|
16
16
|
*/
|
|
17
17
|
import type { GatewayConfig } from './arweaveUtils.js';
|
|
18
|
+
/**
|
|
19
|
+
* Options for resolveUrl()
|
|
20
|
+
*/
|
|
21
|
+
export interface ResolveUrlOptions {
|
|
22
|
+
/** Optional AbortSignal to cancel in-flight gateway checks */
|
|
23
|
+
signal?: AbortSignal;
|
|
24
|
+
/** Skip arweave.net in the resolution chain — go persisted → fallbacks → Wayfinder */
|
|
25
|
+
bypassArweaveNet?: boolean;
|
|
26
|
+
}
|
|
18
27
|
/**
|
|
19
28
|
* Configuration for the gateway cache entry
|
|
20
29
|
*/
|
|
@@ -167,6 +176,28 @@ export interface HealthCheckOptions {
|
|
|
167
176
|
/** Maximum response time to consider a gateway "fast" in ms (default: 2000) */
|
|
168
177
|
fastThreshold?: number;
|
|
169
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Diagnostic snapshot of the gateway manager's current state
|
|
181
|
+
*/
|
|
182
|
+
export interface GatewayDiagnostics {
|
|
183
|
+
/** Currently active gateway host, or null */
|
|
184
|
+
activeGateway: string | null;
|
|
185
|
+
/** Milliseconds since the active gateway was set, or null */
|
|
186
|
+
activeGatewayAge: number | null;
|
|
187
|
+
/** Available gateway hosts in priority order */
|
|
188
|
+
availableGateways: string[];
|
|
189
|
+
/** Timing of the most recent real fetch (ms) */
|
|
190
|
+
lastFetchTiming: number;
|
|
191
|
+
/** Number of consecutive slow responses from the active gateway */
|
|
192
|
+
consecutiveSlowResponses: number;
|
|
193
|
+
/** Per-gateway health summary */
|
|
194
|
+
healthSummary: {
|
|
195
|
+
host: string;
|
|
196
|
+
avgMs: number;
|
|
197
|
+
successRate: number;
|
|
198
|
+
checks: number;
|
|
199
|
+
}[];
|
|
200
|
+
}
|
|
170
201
|
/**
|
|
171
202
|
* ArweaveGatewayManager class
|
|
172
203
|
*
|
|
@@ -197,6 +228,8 @@ export declare class ArweaveGatewayManager {
|
|
|
197
228
|
private originalPriorities;
|
|
198
229
|
/** Maximum number of response time records to keep per gateway */
|
|
199
230
|
private readonly MAX_HEALTH_RECORDS;
|
|
231
|
+
/** In-flight resolveUrl requests keyed by txId, for request deduplication */
|
|
232
|
+
private inflightResolves;
|
|
200
233
|
/** AR.IO Wayfinder client for dynamic routing */
|
|
201
234
|
private wayfinder;
|
|
202
235
|
/** The currently active dynamic gateway. Used globally to prevent constant switching. */
|
|
@@ -211,22 +244,46 @@ export declare class ArweaveGatewayManager {
|
|
|
211
244
|
private readonly maxSlowResponses;
|
|
212
245
|
constructor(config?: ArweaveGatewayManagerConfig);
|
|
213
246
|
/**
|
|
214
|
-
*
|
|
247
|
+
* Wrap a promise with a timeout to prevent hanging indefinitely.
|
|
248
|
+
* Useful for third-party calls (e.g., Wayfinder) that have no built-in timeout.
|
|
249
|
+
*/
|
|
250
|
+
private withTimeout;
|
|
251
|
+
/**
|
|
252
|
+
* Resolve an Arweave URL to a gateway URL using the active gateway, with no network checks.
|
|
215
253
|
*
|
|
216
|
-
*
|
|
217
|
-
*
|
|
218
|
-
*
|
|
219
|
-
* If all gateways fail, returns the original URL.
|
|
254
|
+
* This is the fast path — it returns instantly by reusing the current active gateway
|
|
255
|
+
* (or arweave.net if none is set). Use this for the hot path where latency matters.
|
|
256
|
+
* When real fetches fail, call {@link reportGatewayFailure} to trigger gateway rotation.
|
|
220
257
|
*
|
|
221
258
|
* @param url - The URL to resolve
|
|
222
|
-
* @returns A
|
|
259
|
+
* @returns A gateway URL constructed from the active gateway, or the original URL if not Arweave
|
|
223
260
|
*/
|
|
224
|
-
|
|
261
|
+
resolveUrlSimple(url: string): string;
|
|
225
262
|
/**
|
|
226
|
-
*
|
|
227
|
-
*
|
|
263
|
+
* Set a preferred gateway by host name.
|
|
264
|
+
*
|
|
265
|
+
* If the host is in the known gateways list, it becomes the active gateway
|
|
266
|
+
* and is persisted to localStorage. Returns true on success.
|
|
267
|
+
*
|
|
268
|
+
* @param host - Gateway hostname (e.g. 'ardrive.net')
|
|
269
|
+
* @returns True if the gateway was found and set, false otherwise
|
|
228
270
|
*/
|
|
229
|
-
|
|
271
|
+
setPreferredGateway(host: string): boolean;
|
|
272
|
+
/**
|
|
273
|
+
* Clear the preferred/active gateway.
|
|
274
|
+
*
|
|
275
|
+
* Removes the active gateway, clears the persisted gateway from localStorage,
|
|
276
|
+
* and clears the cache. The next resolveUrl() call will re-discover the best gateway.
|
|
277
|
+
*/
|
|
278
|
+
clearPreferredGateway(): void;
|
|
279
|
+
/**
|
|
280
|
+
* Get a diagnostic snapshot of the gateway manager's current state.
|
|
281
|
+
*
|
|
282
|
+
* Useful for debugging and console inspection.
|
|
283
|
+
*
|
|
284
|
+
* @returns Current gateway manager diagnostics
|
|
285
|
+
*/
|
|
286
|
+
getDiagnostics(): GatewayDiagnostics;
|
|
230
287
|
/**
|
|
231
288
|
* Resolve an Arweave URL to a working gateway URL.
|
|
232
289
|
*
|
|
@@ -234,10 +291,16 @@ export declare class ArweaveGatewayManager {
|
|
|
234
291
|
* fall back to Wayfinder only if all static gateways fail.
|
|
235
292
|
*
|
|
236
293
|
* @param url - The URL to resolve
|
|
237
|
-
* @param
|
|
294
|
+
* @param options - Optional resolve options (signal, bypassArweaveNet, monitorArweaveNet)
|
|
238
295
|
* @returns A working URL (or original URL if all gateways fail or signal is aborted)
|
|
239
296
|
*/
|
|
240
|
-
resolveUrl(url: string,
|
|
297
|
+
resolveUrl(url: string, options?: ResolveUrlOptions): Promise<string>;
|
|
298
|
+
/**
|
|
299
|
+
* The actual gateway fallback chain. Extracted from resolveUrl() for
|
|
300
|
+
* request deduplication — concurrent callers for the same txId share
|
|
301
|
+
* one instance of this chain.
|
|
302
|
+
*/
|
|
303
|
+
private resolveGatewayChain;
|
|
241
304
|
/**
|
|
242
305
|
* Report that the active gateway failed a real fetch.
|
|
243
306
|
*
|
|
@@ -273,7 +336,7 @@ export declare class ArweaveGatewayManager {
|
|
|
273
336
|
*/
|
|
274
337
|
private checkAndSetGateway;
|
|
275
338
|
/**
|
|
276
|
-
* Try remaining fallback gateways (everything except arweave.net).
|
|
339
|
+
* Try remaining fallback gateways (everything except arweave.net) in parallel.
|
|
277
340
|
* Returns the URL of the first gateway that responds, or null if all fail.
|
|
278
341
|
*/
|
|
279
342
|
private tryFallbackGateways;
|
|
@@ -329,6 +392,12 @@ export declare class ArweaveGatewayManager {
|
|
|
329
392
|
* Clear all cached gateway entries
|
|
330
393
|
*/
|
|
331
394
|
clearCache(): void;
|
|
395
|
+
/**
|
|
396
|
+
* Invalidate the cached gateway for a specific URL's transaction ID.
|
|
397
|
+
* Also clears the active gateway and persisted gateway so that resolveUrl()
|
|
398
|
+
* runs the full fallback chain instead of short-circuiting.
|
|
399
|
+
*/
|
|
400
|
+
invalidateCacheForUrl(url: string): void;
|
|
332
401
|
/**
|
|
333
402
|
* Prefetch and cache gateways for multiple URLs in parallel
|
|
334
403
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arweaveGatewayManager.d.ts","sourceRoot":"","sources":["../../src/utils/arweaveGatewayManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AA+BvD;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,cAAc,EAAE,aAAa,CAAC;IAC9B,mEAAmE;IACnE,SAAS,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,GAAG,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,OAAO,EAAE,aAAa,CAAC;IACvB,0CAA0C;IAC1C,MAAM,EAAE,OAAO,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IACxC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,aAAa,EAAE,CAAC;IAC3B,qEAAqE;IACrE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,0FAA0F;IAC1F,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,+DAA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;;;;;;;;;;;;OAiBG;IACG,cAAc,CAAC,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IA0G9E;;OAEG;IACH,sBAAsB,IAAI,IAAI;IAqB9B;;OAEG;IACH,eAAe,IAAI,IAAI;CAI1B;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,qBAAqB,uBAA8B,CAAC"}
|
|
@@ -35,7 +35,7 @@ export declare const DEFAULT_GATEWAYS: GatewayConfig[];
|
|
|
35
35
|
/**
|
|
36
36
|
* Known Arweave gateway hosts for URL detection
|
|
37
37
|
*/
|
|
38
|
-
export declare const KNOWN_GATEWAY_HOSTS: readonly ["arweave.net", "
|
|
38
|
+
export declare const KNOWN_GATEWAY_HOSTS: readonly ["arweave.net", "arweave.dev", "www.arweave.net", "ardrive.net", "turbo-gateway.com", "irys.xyz", "ar-io.dev", "ar-io.net", "arweave.rocks", "g8way.io"];
|
|
39
39
|
/**
|
|
40
40
|
* Check if a URL is an Arweave URL
|
|
41
41
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arweaveUtils.d.ts","sourceRoot":"","sources":["../../src/utils/arweaveUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,
|
|
1
|
+
{"version":3,"file":"arweaveUtils.d.ts","sourceRoot":"","sources":["../../src/utils/arweaveUtils.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AACH,MAAM,WAAW,aAAa;IAC1B,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,yCAAyC;IACzC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B,qEAAqE;IACrE,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,yEAAyE;IACzE,UAAU,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,aAAa,EAI3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,mKAWtB,CAAC;AAQX;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAsBjD;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAuElE;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,UAAU,GAAE,MAAW,GAAG,MAAM,CAGzG;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,iBAAiB,CAC7B,IAAI,EAAE,MAAM,EACZ,QAAQ,GAAE,aAAa,EAAqB,EAC5C,UAAU,GAAE,MAAW,GACxB,MAAM,EAAE,CAIV"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IPFS URL utility functions for detecting, extracting, and resolving IPFS links.
|
|
3
|
+
*
|
|
4
|
+
* @module utils/ipfsUtils
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Known IPFS HTTP gateway host prefixes.
|
|
8
|
+
* Each entry is checked with hostname matching (exact or subdomain).
|
|
9
|
+
* All known gateway hosts — extend this array to add new gateways.
|
|
10
|
+
*/
|
|
11
|
+
export declare const KNOWN_IPFS_GATEWAY_HOSTS: readonly ["ipfs.io", "cloudflare-ipfs.com", "dweb.link", "gateway.pinata.cloud", "ipfs.infura.io", "nftstorage.link", "web3-music-pipeline.mypinata.cloud", "soundxyz.mypinata.cloud", "gold-broad-gibbon-29.mypinata.cloud", "bonfire.mypinata.cloud", "spinamp.mypinata.cloud", "catalogworks.b-cdn.net"];
|
|
12
|
+
/** Default gateway used by resolveIPFSLink */
|
|
13
|
+
export declare const DEFAULT_IPFS_GATEWAY = "ipfs.io";
|
|
14
|
+
/**
|
|
15
|
+
* Extract the IPFS CID and optional path from any IPFS URL.
|
|
16
|
+
* Returns null if the URL isn't a recognized IPFS URL.
|
|
17
|
+
*
|
|
18
|
+
* Handles:
|
|
19
|
+
* - `ipfs://ipfs/{cid}/path` — native scheme (double ipfs)
|
|
20
|
+
* - `ipfs://{cid}/path` — native scheme
|
|
21
|
+
* - `https://gateway/ipfs/{cid}/path` — standard gateway format
|
|
22
|
+
* - `https://{cid}.ipfs.dweb.link` — subdomain format
|
|
23
|
+
*
|
|
24
|
+
* @param url - The URL to extract from
|
|
25
|
+
* @returns The CID + path (e.g. "QmXxx/file.jpg"), or null
|
|
26
|
+
*/
|
|
27
|
+
export declare function extractIPFSPath(url: string): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Check if a URL is an IPFS URL.
|
|
30
|
+
*
|
|
31
|
+
* Detects:
|
|
32
|
+
* - `ipfs://` protocol URLs (native scheme)
|
|
33
|
+
* - URLs on known IPFS gateway hosts with `/ipfs/` path segment
|
|
34
|
+
* - Subdomain format: `{cid}.ipfs.dweb.link`
|
|
35
|
+
*
|
|
36
|
+
* @param url - The URL to check
|
|
37
|
+
* @returns True if the URL is an IPFS URL
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```ts
|
|
41
|
+
* isIPFS('ipfs://ipfs/QmXxx'); // true
|
|
42
|
+
* isIPFS('ipfs://QmXxx'); // true
|
|
43
|
+
* isIPFS('https://ipfs.io/ipfs/QmXxx'); // true
|
|
44
|
+
* isIPFS('https://cloudflare-ipfs.com/ipfs/QmXxx'); // true
|
|
45
|
+
* isIPFS('https://dweb.link/ipfs/QmXxx'); // true
|
|
46
|
+
* isIPFS('https://gateway.pinata.cloud/ipfs/QmXxx'); // true
|
|
47
|
+
* isIPFS('https://soundxyz.mypinata.cloud/ipfs/QmXxx'); // true
|
|
48
|
+
* isIPFS('https://nftstorage.link/ipfs/QmXxx'); // true
|
|
49
|
+
* isIPFS('https://QmXxx.ipfs.dweb.link'); // true
|
|
50
|
+
* isIPFS('https://example.com/image.png'); // false
|
|
51
|
+
* isIPFS(undefined); // false
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export declare function isIPFS(url: string | undefined): boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Resolve an IPFS URL to a specific gateway.
|
|
57
|
+
*
|
|
58
|
+
* Extracts the IPFS CID/path from any recognized IPFS URL format and
|
|
59
|
+
* reconstructs it with the specified gateway host.
|
|
60
|
+
*
|
|
61
|
+
* @param url - The IPFS URL to resolve
|
|
62
|
+
* @param gatewayHost - Gateway host to resolve to (default: ipfs.io)
|
|
63
|
+
* @returns The resolved URL, or the original URL if not IPFS
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* ```ts
|
|
67
|
+
* resolveIPFSLink('ipfs://QmXxx'); // 'https://ipfs.io/ipfs/QmXxx'
|
|
68
|
+
* resolveIPFSLink('ipfs://QmXxx', 'cloudflare-ipfs.com'); // 'https://cloudflare-ipfs.com/ipfs/QmXxx'
|
|
69
|
+
* resolveIPFSLink('https://soundxyz.mypinata.cloud/ipfs/QmXxx'); // 'https://ipfs.io/ipfs/QmXxx'
|
|
70
|
+
* resolveIPFSLink('https://QmXxx.ipfs.dweb.link'); // 'https://ipfs.io/ipfs/QmXxx'
|
|
71
|
+
* resolveIPFSLink('https://example.com/file.png'); // 'https://example.com/file.png'
|
|
72
|
+
* resolveIPFSLink(undefined); // undefined
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
export declare function resolveIPFSLink(url: string | undefined, gatewayHost?: string): string | undefined;
|
|
76
|
+
//# sourceMappingURL=ipfsUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ipfsUtils.d.ts","sourceRoot":"","sources":["../../src/utils/ipfsUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,6SAa3B,CAAC;AAEX,8CAA8C;AAC9C,eAAO,MAAM,oBAAoB,YAAY,CAAC;AAI9C;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAkC1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAwBvD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,eAAe,CAC3B,GAAG,EAAE,MAAM,GAAG,SAAS,EACvB,WAAW,GAAE,MAA6B,GAC3C,MAAM,GAAG,SAAS,CASpB"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ModelCache — Persistent localForage cache for TensorFlow.js model artifacts.
|
|
3
|
+
*
|
|
4
|
+
* After the first successful download, model artifacts (model.json manifest +
|
|
5
|
+
* weight shard ArrayBuffers) are stored in IndexedDB via localForage. Subsequent
|
|
6
|
+
* loads read from cache without any network requests or gateway resolution.
|
|
7
|
+
*
|
|
8
|
+
* Supports two loading strategies:
|
|
9
|
+
* - `getOrFetchGraphModel()` — loads via custom TF.js IOHandler (for tf.loadGraphModel)
|
|
10
|
+
* - `getOrFetchBlobUrl()` — returns a blob URL (for Essentia TensorflowMusiCNN/VGGish)
|
|
11
|
+
*/
|
|
12
|
+
import type * as tf from '@tensorflow/tfjs';
|
|
13
|
+
export interface ModelCacheEntry {
|
|
14
|
+
manifest: string;
|
|
15
|
+
weights: Record<string, ArrayBuffer>;
|
|
16
|
+
savedAt: number;
|
|
17
|
+
originalUrl: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ModelCacheOptions {
|
|
20
|
+
/** Optional custom localForage instance name. @default 'playlist-data-engine-models' */
|
|
21
|
+
storeName?: string;
|
|
22
|
+
/** Optional description for the IndexedDB database. */
|
|
23
|
+
description?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface ModelCacheFetchOptions {
|
|
26
|
+
/** Optional callback to resolve URLs (e.g., arweaveGatewayManager). */
|
|
27
|
+
resolveUrl?: (url: string) => Promise<string>;
|
|
28
|
+
/** Optional callback to invalidate cached gateway for a URL after a fetch failure. */
|
|
29
|
+
invalidateUrlCache?: (url: string) => void;
|
|
30
|
+
/** Maximum download retries. @default 3 */
|
|
31
|
+
maxRetries?: number;
|
|
32
|
+
/** Base delay for exponential backoff in ms. @default 1000 */
|
|
33
|
+
baseDelayMs?: number;
|
|
34
|
+
}
|
|
35
|
+
export declare class ModelCache {
|
|
36
|
+
private store;
|
|
37
|
+
constructor(options?: ModelCacheOptions);
|
|
38
|
+
/**
|
|
39
|
+
* Check if a model is cached.
|
|
40
|
+
*/
|
|
41
|
+
has(modelUrl: string): Promise<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* Get cache metadata for a model (without loading it).
|
|
44
|
+
*/
|
|
45
|
+
getCacheInfo(modelUrl: string): Promise<{
|
|
46
|
+
cached: boolean;
|
|
47
|
+
savedAt?: number;
|
|
48
|
+
size?: number;
|
|
49
|
+
} | null>;
|
|
50
|
+
/**
|
|
51
|
+
* Load a GraphModel from cache (no network). Throws if not cached.
|
|
52
|
+
*/
|
|
53
|
+
loadFromCache(tfModule: typeof tf, modelUrl: string): Promise<tf.GraphModel>;
|
|
54
|
+
/**
|
|
55
|
+
* Get or fetch a GraphModel with caching.
|
|
56
|
+
*
|
|
57
|
+
* - Cache hit: loads directly from IndexedDB (no network)
|
|
58
|
+
* - Cache miss: resolves URL, fetches with retry, caches artifacts, then loads
|
|
59
|
+
*/
|
|
60
|
+
getOrFetchGraphModel(tfModule: typeof tf, modelUrl: string, options?: ModelCacheFetchOptions): Promise<tf.GraphModel>;
|
|
61
|
+
/**
|
|
62
|
+
* Get or fetch a model for use with Essentia constructors (TensorflowMusiCNN/VGGish).
|
|
63
|
+
*
|
|
64
|
+
* Uses tf.io.registerLoadRouter to register a custom IOHandler for `cached://`
|
|
65
|
+
* URLs. When Essentia internally calls tf.loadGraphModel(cachedUrl), TF.js routes
|
|
66
|
+
* to our handler which serves artifacts from localForage — zero network calls.
|
|
67
|
+
*
|
|
68
|
+
* On cache hit: returns `cached://` URL, zero network during Essentia init.
|
|
69
|
+
* On cache miss: fetches with gateway fallback, caches, returns `cached://` URL.
|
|
70
|
+
*/
|
|
71
|
+
getOrFetchEssentiaUrl(modelUrl: string, options?: ModelCacheFetchOptions): Promise<string>;
|
|
72
|
+
/**
|
|
73
|
+
* Clear the cache for a specific model or all models.
|
|
74
|
+
*/
|
|
75
|
+
clear(modelUrl?: string): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* List all cached model URLs.
|
|
78
|
+
*/
|
|
79
|
+
listCachedModels(): Promise<string[]>;
|
|
80
|
+
/**
|
|
81
|
+
* Get total cache size in bytes.
|
|
82
|
+
*/
|
|
83
|
+
totalCacheSize(): Promise<number>;
|
|
84
|
+
}
|
|
85
|
+
/** Singleton model cache instance used by default across the engine. */
|
|
86
|
+
export declare const modelCache: ModelCache;
|
|
87
|
+
//# sourceMappingURL=modelCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelCache.d.ts","sourceRoot":"","sources":["../../src/utils/modelCache.ts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oB,CACtB,QAAQ,EAAE,OAAO,EAAE,EACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,sBAA2B,GACrC,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC;IAiCzB;;;;;;;;;OASG;IACG,qBAAqB,CACvB,QAAQ,EAAE,MAAM,EAChB,OAAO,GAAE,sBAA2B,GACrC,OAAO,CAAC,MAAM,CAAC;IA2BlB;;OAEG;IACG,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7C;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAO3C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC;CAY1C;AAED,wEAAwE;AACxE,eAAO,MAAM,UAAU,YAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/jasondesante/playlist-data-engine.git"
|
|
8
8
|
},
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.3.0",
|
|
10
10
|
"type": "module",
|
|
11
11
|
"main": "./dist/playlist-data-engine.js",
|
|
12
12
|
"module": "./dist/playlist-data-engine.mjs",
|
|
@@ -22,24 +22,28 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"keywords": [
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
25
|
+
"arweave",
|
|
26
|
+
"ethereum",
|
|
27
|
+
"music-nfts",
|
|
28
|
+
"web3-music",
|
|
29
|
+
"decentralized-music",
|
|
30
|
+
"serverless-playlists",
|
|
31
|
+
"permaweb",
|
|
32
|
+
"ario-wayfinder",
|
|
33
|
+
"decentralized-playlists",
|
|
34
|
+
"gamified-music",
|
|
35
|
+
"music-gamification",
|
|
36
|
+
"rhythm-game-engine",
|
|
37
|
+
"rpg-character-generator",
|
|
38
|
+
"dnd-5e",
|
|
39
|
+
"xp-system",
|
|
30
40
|
"beat-detection",
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
41
|
+
"audio-analysis",
|
|
42
|
+
"music-classification",
|
|
43
|
+
"pitch-detection",
|
|
34
44
|
"combat-simulator",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"game-engine",
|
|
38
|
-
"music-analysis",
|
|
39
|
-
"ethereum",
|
|
40
|
-
"arweave",
|
|
41
|
-
"nfts",
|
|
42
|
-
"decentralized-music-infrastructure"
|
|
45
|
+
"sensor-integration",
|
|
46
|
+
"rhythm-game"
|
|
43
47
|
],
|
|
44
48
|
"scripts": {
|
|
45
49
|
"dev": "vite",
|
|
@@ -58,6 +62,7 @@
|
|
|
58
62
|
"@ar.io/wayfinder-core": "^1.9.1",
|
|
59
63
|
"@tensorflow/tfjs": "^4.22.0",
|
|
60
64
|
"essentia.js": "^0.1.3",
|
|
65
|
+
"localforage": "^1.10.0",
|
|
61
66
|
"murmurhash-v3": "^1.0.2",
|
|
62
67
|
"uuid": "^13.0.0",
|
|
63
68
|
"zod": "^4.1.13"
|
|
@@ -72,9 +77,9 @@
|
|
|
72
77
|
"devDependencies": {
|
|
73
78
|
"@eslint/js": "^9.39.1",
|
|
74
79
|
"@types/node": "^24.10.1",
|
|
75
|
-
"@types/uuid": "^10.0.0",
|
|
76
80
|
"@types/react": "^19.2.5",
|
|
77
81
|
"@types/react-dom": "^19.2.3",
|
|
82
|
+
"@types/uuid": "^10.0.0",
|
|
78
83
|
"@vitejs/plugin-react": "^5.1.1",
|
|
79
84
|
"@vitest/coverage-v8": "^4.0.14",
|
|
80
85
|
"@vitest/ui": "^4.0.14",
|