playlist-data-engine 1.7.3 → 1.8.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 (35) hide show
  1. package/README.md +14 -0
  2. package/bin/cli.cjs +85 -0
  3. package/dist/gateway-CDMPqFEH.js +1320 -0
  4. package/dist/gateway-DKa45Uz6.cjs +6 -0
  5. package/dist/gateway.d.ts +1 -0
  6. package/dist/gateway.d.ts.map +1 -1
  7. package/dist/gateway.js +1 -1
  8. package/dist/gateway.mjs +22 -19
  9. package/dist/index.d.ts +1 -0
  10. package/dist/index.d.ts.map +1 -1
  11. package/dist/playlist-data-engine.js +4 -4
  12. package/dist/playlist-data-engine.mjs +30 -27
  13. package/dist/utils/engineDocs.d.ts +33 -0
  14. package/dist/utils/engineDocs.d.ts.map +1 -0
  15. package/docs/DATA_ENGINE_REFERENCE.md +6660 -0
  16. package/docs/USAGE_IN_OTHER_PROJECTS.md +587 -0
  17. package/docs/features/AUDIO_ANALYSIS.md +610 -0
  18. package/docs/features/BEAT_DETECTION.md +5250 -0
  19. package/docs/features/COMBAT_SYSTEM.md +1632 -0
  20. package/docs/features/CONTENT_PACKS.md +464 -0
  21. package/docs/features/CUSTOM_CONTENT.md +603 -0
  22. package/docs/features/ENEMY_GENERATION.md +1711 -0
  23. package/docs/features/EQUIPMENT_SYSTEM.md +2279 -0
  24. package/docs/features/EXTENSIBILITY_GUIDE.md +1106 -0
  25. package/docs/features/GATEWAY_RESOLUTION.md +725 -0
  26. package/docs/features/IRL_SENSORS.md +360 -0
  27. package/docs/features/PLAYLIST_PARSING.md +446 -0
  28. package/docs/features/PREREQUISITES.md +571 -0
  29. package/docs/features/ROLLS_AND_SEEDS.md +687 -0
  30. package/docs/features/XP_AND_STATS.md +1221 -0
  31. package/llms.txt +33 -0
  32. package/package.json +9 -2
  33. package/skills/playlist-data-engine/SKILL.md +69 -0
  34. package/dist/gateway-C_p9Ku3O.js +0 -1211
  35. package/dist/gateway-Ceg-5xug.cjs +0 -1
package/README.md CHANGED
@@ -26,6 +26,20 @@ npm install
26
26
 
27
27
  </details>
28
28
 
29
+ ### Documentation
30
+
31
+ Full docs ship inside the package — no GitHub trip needed:
32
+
33
+ | Where | What |
34
+ |---|---|
35
+ | `node_modules/playlist-data-engine/docs/` | The whole docs folder, version-matched to your install |
36
+ | `npx playlist-data-engine docs` | List every doc — `npx playlist-data-engine docs <topic>` reads one |
37
+ | `engineHelp()` from the package | Same index, returned as markdown — built for AI agents |
38
+
39
+ **Table of contents:** [Data Engine Reference](docs/DATA_ENGINE_REFERENCE.md) (every function, one row each) · [Usage in Other Projects](docs/USAGE_IN_OTHER_PROJECTS.md) · [Playlist Parsing](docs/features/PLAYLIST_PARSING.md) (tracks, mixes, quality) · [Gateway Resolution](docs/features/GATEWAY_RESOLUTION.md) · [Audio Analysis](docs/features/AUDIO_ANALYSIS.md) · [Beat Detection](docs/features/BEAT_DETECTION.md) — plus the game systems (combat, equipment, XP, sensors, seeds) in `docs/features/`.
40
+
41
+ Building with Claude or another coding agent? `npx playlist-data-engine skill` prints the companion Claude Code skill; `engineHelp('skill')` returns it from inside the package.
42
+
29
43
  ### The Vision: An Intelligent Music Player
30
44
 
31
45
  The original idea — five years ago — was a music player that goes beyond playing static audio. Think of how the best Nintendo games use dynamic music — different arrangements and mixes depending on what the player does. That's a whole category of experiencing recorded music, but only a handful of games have ever explored it. This engine opens that door for any music. It listens to your tracks and reacts to you — the genre, the mood, the beats, the groove, where you are, what you're doing, the weather outside, the time of day. Every song comes with a character, a combat encounter, a rhythm game chart — all generated from the music itself.
package/bin/cli.cjs ADDED
@@ -0,0 +1,85 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Docs CLI — `npx playlist-data-engine docs [topic]`
4
+ *
5
+ * Plain CommonJS on purpose: it runs straight from the published tarball
6
+ * with zero dependencies and no build step.
7
+ */
8
+ const fs = require('node:fs');
9
+ const path = require('node:path');
10
+
11
+ const DOCS_DIR = path.join(__dirname, '..', 'docs');
12
+ const SKILL_PATH = path.join(__dirname, '..', 'skills', 'playlist-data-engine', 'SKILL.md');
13
+
14
+ function collectDocs(dir, prefix = '') {
15
+ const out = [];
16
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
17
+ const rel = prefix ? `${prefix}/${entry.name}` : entry.name;
18
+ if (entry.isDirectory()) out.push(...collectDocs(path.join(dir, entry.name), rel));
19
+ else if (entry.name.endsWith('.md')) out.push(rel);
20
+ }
21
+ return out.sort();
22
+ }
23
+
24
+ function topics() {
25
+ return collectDocs(DOCS_DIR).map(rel => ({
26
+ rel,
27
+ slug: rel.replace(/\.md$/i, '').replace(/^features\//, '').toLowerCase(),
28
+ }));
29
+ }
30
+
31
+ function usage() {
32
+ const list = topics().map(t => ` ${t.slug.padEnd(24)} docs/${t.rel}`).join('\n');
33
+ return [
34
+ 'playlist-data-engine — docs reader',
35
+ '',
36
+ 'USAGE',
37
+ ' npx playlist-data-engine docs List every doc',
38
+ ' npx playlist-data-engine docs <topic> Print one doc (slug or file path)',
39
+ ' npx playlist-data-engine skill Print the Claude Code skill file',
40
+ '',
41
+ 'TOPICS',
42
+ list,
43
+ '',
44
+ 'Full docs also ship inside the package: node_modules/playlist-data-engine/docs/',
45
+ ].join('\n');
46
+ }
47
+
48
+ const [command, topic] = process.argv.slice(2);
49
+
50
+ if (!command || ['-h', '--help', 'help'].includes(command)) {
51
+ console.log(usage());
52
+ process.exit(0);
53
+ }
54
+
55
+ if (command === 'skill') {
56
+ try {
57
+ console.log(fs.readFileSync(SKILL_PATH, 'utf8'));
58
+ } catch {
59
+ console.error('Skill file not found in this install (expected skills/playlist-data-engine/SKILL.md).');
60
+ process.exit(1);
61
+ }
62
+ process.exit(0);
63
+ }
64
+
65
+ if (command !== 'docs') {
66
+ console.error(`Unknown command "${command}".\n\n${usage()}`);
67
+ process.exit(1);
68
+ }
69
+
70
+ if (!topic) {
71
+ console.log(usage());
72
+ process.exit(0);
73
+ }
74
+
75
+ const all = topics();
76
+ const needle = topic.toLowerCase();
77
+ const hit =
78
+ all.find(t => t.slug === needle) ||
79
+ all.find(t => t.rel.toLowerCase() === needle) ||
80
+ all.find(t => t.slug.startsWith(needle));
81
+ if (!hit) {
82
+ console.error(`No doc matches "${topic}".\n\n${usage()}`);
83
+ process.exit(1);
84
+ }
85
+ console.log(fs.readFileSync(path.join(DOCS_DIR, hit.rel), 'utf8'));