qnce-engine 1.3.0 β 1.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.
- package/README.md +43 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**Quantum Narrative Convergence Engine** - A framework-agnostic TypeScript library for creating interactive narrative experiences with quantum-inspired mechanics.
|
|
4
4
|
|
|
5
|
-
> **π Latest v1.
|
|
5
|
+
> **π Latest v1.3.0 (Import & Persistence):** New `qnce-import` CLI (Custom JSON, Twison with tagsβ`meta.tags`, experimental Ink), persistence adapters (Memory, LocalStorage, SessionStorage, File, IndexedDB), and `qnce-play` support for storage backends and non-interactive runs.
|
|
6
6
|
|
|
7
7
|
[](https://badge.fury.io/js/qnce-engine)
|
|
8
8
|
[](https://www.typescriptlang.org/)
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
- **Collapse:** Player choices "collapse" the narrative to a specific path, updating state and flags
|
|
15
15
|
- **Entanglement:** Early decisions affect later outcomes, enabling complex, interconnected stories
|
|
16
16
|
|
|
17
|
-
## β¨ Current Features (v1.
|
|
17
|
+
## β¨ Current Features (v1.3.0)
|
|
18
18
|
|
|
19
19
|
### πΎ State Persistence & Checkpoints
|
|
20
20
|
- **Complete save/load system** with data integrity validation
|
|
@@ -628,15 +628,32 @@ Stories are defined using JSON with the following structure:
|
|
|
628
628
|
```
|
|
629
629
|
|
|
630
630
|
## CLI Tools
|
|
631
|
-
###
|
|
631
|
+
### qnce-import (new in v1.3.0)
|
|
632
632
|
|
|
633
|
-
|
|
633
|
+
Normalize external story formats into QNCE StoryData with schema + semantic validation.
|
|
634
634
|
|
|
635
|
-
|
|
636
|
-
-
|
|
637
|
-
-
|
|
635
|
+
Supported formats:
|
|
636
|
+
- Custom JSON: strict/lenient validation with JSON Schema
|
|
637
|
+
- Twison/Twine JSON: passages, links, robust start detection; tags mapped to `node.meta.tags`
|
|
638
|
+
- Ink JSON: minimal mapping (developer preview). Use `--experimental-ink` for extended best-effort mapping
|
|
638
639
|
|
|
639
|
-
|
|
640
|
+
Usage examples:
|
|
641
|
+
|
|
642
|
+
```bash
|
|
643
|
+
# Autodetect format and write normalized JSON to stdout
|
|
644
|
+
qnce-import path/to/story.json > story.normalized.json
|
|
645
|
+
|
|
646
|
+
# Force a format and fail on schema/semantic issues
|
|
647
|
+
qnce-import --format twison --strict input.json -o normalized.json
|
|
648
|
+
|
|
649
|
+
# Add an ID prefix when merging multiple sources
|
|
650
|
+
qnce-import --id-prefix libA_ a.json > a.norm.json
|
|
651
|
+
|
|
652
|
+
# Read from stdin, write to file
|
|
653
|
+
cat story.json | qnce-import --format custom -o out.json
|
|
654
|
+
```
|
|
655
|
+
|
|
656
|
+
Exit codes: 0 success, 1 validation failure, 2 unexpected error.
|
|
640
657
|
|
|
641
658
|
|
|
642
659
|
### qnce-audit
|
|
@@ -680,6 +697,24 @@ Features:
|
|
|
680
697
|
- State inspection and debugging
|
|
681
698
|
- Performance monitoring
|
|
682
699
|
- Session save/load functionality
|
|
700
|
+
- Persistence backends via `--storage` (memory | local | session | file | indexeddb)
|
|
701
|
+
- Non-interactive runs for scripting/CI with JSON summary output
|
|
702
|
+
|
|
703
|
+
Examples:
|
|
704
|
+
|
|
705
|
+
```bash
|
|
706
|
+
# Basic interactive play
|
|
707
|
+
qnce-play story.json
|
|
708
|
+
|
|
709
|
+
# Use file storage (directory configurable)
|
|
710
|
+
qnce-play story.json --storage file --storage-dir .qnce --save-key session1
|
|
711
|
+
|
|
712
|
+
# Resume a saved session
|
|
713
|
+
qnce-play story.json --storage file --storage-dir .qnce --load-key session1
|
|
714
|
+
|
|
715
|
+
# Scriptable non-interactive run (emits a JSON summary)
|
|
716
|
+
qnce-play story.json --non-interactive --storage memory
|
|
717
|
+
```
|
|
683
718
|
|
|
684
719
|
### qnce-perf
|
|
685
720
|
|
package/package.json
CHANGED