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.
Files changed (2) hide show
  1. package/README.md +43 -8
  2. 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.2.3:** Documentation consistency update and version alignment; core features unchanged from v1.2.2 (state persistence, advanced branching with AI integration, autosave & undo/redo, conditional choices, React UI components).
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
  [![npm version](https://badge.fury.io/js/qnce-engine.svg)](https://badge.fury.io/js/qnce-engine)
8
8
  [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](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.2.3)
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
- ### Import compatibility (developer preview)
631
+ ### qnce-import (new in v1.3.0)
632
632
 
633
- Support matrix for qnce-import adapters:
633
+ Normalize external story formats into QNCE StoryData with schema + semantic validation.
634
634
 
635
- - Custom JSON: supported (strict mode available)
636
- - Twison/Twine JSON: supported (passages, links, start detection). Tags are mapped to node.meta.tags.
637
- - Ink JSON: minimal support (knots/text/choices). Use `--experimental-ink` for best-effort extras.
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
- Tip: Use `--id-prefix` to namespace node IDs when merging sources.
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qnce-engine",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Core QNCE (Quantum Narrative Convergence Engine) - Framework agnostic narrative engine with performance optimization",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",