- Add getRuntimeVariables, getRuntimeVariablesByEntityType for definition queries
- Add createRuntimeVariable, updateRuntimeVariable, deleteRuntimeVariable for definition CRUD
- Add getStoriesUsingPack to find all stories sharing a pack
- Add countEntitiesWithRuntimeVar for deletion warning counts
- Add clearRuntimeVarFromEntities to strip values on definition delete
- Add renameRuntimeVarInEntities to update variableName copy on rename
- All entity operations accept packId and work across all stories sharing the pack
- Add mapRuntimeVariable private helper for row-to-type conversion
- Delete 3 dead barrel files (prompts/index.ts, packs/index.ts, templates/index.ts)
- Remove all dead individual template exports (only group arrays exported now)
- Gut prompts/templates/index.ts to only export PROMPT_TEMPLATES
- Extract shared hashContent into packs/hash.ts (was duplicated in database.ts and pack-service.ts)
- Rename SUGGESTIONS_TEMPLATES to suggestionsTemplates for consistency
- Strip verbose JSDoc banners and stale phase/migration comments
- Render pack descriptions as markdown/HTML in ImportPreviewDialog
- Add stripToPlainText() for PromptPackCard preview (prevents raw HTML in cards)
- Add migration 030: description/sort_order columns on pack_variables, custom_variable_values on stories
- Add description and sortOrder fields to CustomVariable type
- Add description and sortOrder to validation schema
- Update database: mapPackVariable, getPackVariables (ORDER BY sort_order), createPackVariable, updatePackVariable
- Add getStoryCustomVariables and setStoryCustomVariables database methods
- Update PackService.createPack to copy description and sortOrder
- Fix VariableManager to include sortOrder in create/update calls
* Add phase 0
Feature toggles ("Labs" settings tab) + full backup zip (DB + .avt exports via existing JSZip)
* Add phase 1
Phase 1: State Tracking (Record Deltas)
### 1A. Schema Migration
### 1B. Type Definitions
### 1C. Database Layer
### 1D. Delta Capture in Classification
### 1E. Auto-Snapshot Creation
* Phase 2
Rollback on Delete (Cascade)
### 2A. Rollback Engine
### 2B. Integration into Delete Flow
### 2C. Retry System Integration
* Add phase 3
### 3A. Schema Migration
### 3B. Type Changes
### 3C. Database Layer
### 3D. Branch Creation Rework
### 3E. Copy-on-Write Modification
### 3F. Entity Loading Rework
### 3G. Existing Branch Compatibility
### 3H. Add SQL editor
* Phase 4
Add restore from back up feature.
* Disable delete parent branch if children exists
* Add save and rewind to actions/suggestions
+++ On deleting story entries, rewind to saved actions.
+++ If no actions are saved (Pre feature dev for example) then regenerate options again as fall back
* fix: normalize line endings to LF
* fix: normalize remaining config file line endings to LF
* code conflict
* Fix conflict
* Control debug logs in roll back service with toggle
* chore: bump version to 0.7.0-pre.1
* merge issues
* Fix review comment
---------
Co-authored-by: Failerko <c.dann@seznam.cz>
- Register 96 runtime variables in variableRegistry for autocomplete/validation
- Extend VaultTab type to include 'prompts' for prompt editor tab
- Add getPackUsageCount() to DatabaseService for pack usage badges
- Create templateGroups.ts with 7 groups covering all 41 templates
- Fix VaultPanel.svelte to import VaultTab type instead of local redeclaration
Summary of changes:
- Refactored image embedding to use placeholder system, fixing Markdown rendering conflicts.
- Added 'Orphaned Images' gallery and drag-and-drop linking for unplaced illustrations.
- Optimized drag-and-drop performance with requestAnimationFrame and movement thresholds.
- Improved database branch-awareness in retry and restore operations.
- Added error handling wrapper for world state updates to prevent pipeline crashes.
- Fixed Svelte linting and type errors.
- Add PRAGMA foreign_keys = ON to init() method
- Ensures ON DELETE RESTRICT on stories.pack_id is enforced
- Prevents deletion of packs referenced by stories