jw-automator 2.0.0 → 3.1.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/CHANGELOG.md +76 -0
- package/README.md +375 -192
- package/docs/ARCHITECTURE.md +342 -0
- package/docs/MIGRATION.md +411 -0
- package/docs/QUICKSTART.md +356 -0
- package/examples/basic-example.js +135 -0
- package/examples/hello-world.js +40 -0
- package/examples/iot-sensor-example.js +149 -0
- package/index.js +7 -0
- package/package.json +53 -19
- package/src/Automator.js +476 -0
- package/src/core/CoreEngine.js +210 -0
- package/src/core/RecurrenceEngine.js +237 -0
- package/src/host/SchedulerHost.js +174 -0
- package/src/storage/FileStorage.js +59 -0
- package/src/storage/MemoryStorage.js +27 -0
- package/.actions.json +0 -1
- package/.jshintrc +0 -16
- package/.vscode/settings.json +0 -6
- package/LICENSE +0 -674
- package/automator.js +0 -696
- package/demo.js +0 -76
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to jw-automator will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [3.0.0] - 2025-11-17
|
|
9
|
+
|
|
10
|
+
### Added (v3 Complete Rewrite)
|
|
11
|
+
|
|
12
|
+
- **Core Engine**: Pure deterministic `step()` function for scheduling
|
|
13
|
+
- **1-Second Precision**: Fixed 1-second tick interval with zero drift
|
|
14
|
+
- **Local-Time Semantics**: All recurrence rules operate in local wall-clock time
|
|
15
|
+
- **DST Handling**: Configurable DST policies (`once`/`twice`) for fall-back scenarios
|
|
16
|
+
- **Offline Catch-Up**: Buffered/unBuffered execution semantics for resilience
|
|
17
|
+
- **Recurrence Types**:
|
|
18
|
+
- `second`, `minute`, `hour`
|
|
19
|
+
- `day`, `weekday`, `weekend`, `week`
|
|
20
|
+
- `month`, `year`
|
|
21
|
+
- **Simulation API**: `getActionsInRange()` for future schedule preview
|
|
22
|
+
- **Pluggable Storage**: File-based and memory-based storage adapters
|
|
23
|
+
- **Custom Storage Interface**: Support for custom persistence backends
|
|
24
|
+
- **Event System**:
|
|
25
|
+
- `ready` - Scheduler started
|
|
26
|
+
- `action` - Action executed
|
|
27
|
+
- `update` - Actions added/updated/removed
|
|
28
|
+
- `error` - Error events
|
|
29
|
+
- `debug` - Debug information
|
|
30
|
+
- **Action Management**:
|
|
31
|
+
- `addAction()` - Add new scheduled actions
|
|
32
|
+
- `updateActionByID()` - Update existing actions
|
|
33
|
+
- `removeActionByID()` - Remove by ID
|
|
34
|
+
- `removeActionByName()` - Remove by name
|
|
35
|
+
- `getActions()` - Get all actions
|
|
36
|
+
- `getActionsByName()` - Query by name
|
|
37
|
+
- `describeAction()` - Human-readable description
|
|
38
|
+
- **Meta-Actions**: Actions can create/modify other actions
|
|
39
|
+
- **Auto-Save**: Configurable auto-save with custom intervals
|
|
40
|
+
- **Safety Guards**:
|
|
41
|
+
- Maximum iteration limits to prevent infinite loops
|
|
42
|
+
- Monotonic time progression guarantees
|
|
43
|
+
- Bounded per-tick execution
|
|
44
|
+
- **Comprehensive Tests**: Full test suite with Jest
|
|
45
|
+
- **Examples**: Basic and IoT sensor examples included
|
|
46
|
+
|
|
47
|
+
### Changed from v2
|
|
48
|
+
|
|
49
|
+
- Complete clean-room rewrite
|
|
50
|
+
- Improved DST handling with explicit policies
|
|
51
|
+
- Better separation of action spec vs. state
|
|
52
|
+
- Deterministic core suitable for testing and simulation
|
|
53
|
+
- More predictable catch-up behavior
|
|
54
|
+
- Enhanced error handling and reporting
|
|
55
|
+
- Improved API ergonomics
|
|
56
|
+
|
|
57
|
+
### Technical Improvements
|
|
58
|
+
|
|
59
|
+
- Pure functional core engine
|
|
60
|
+
- Environment-agnostic architecture
|
|
61
|
+
- Reduced edge-case bugs
|
|
62
|
+
- Better maintainability
|
|
63
|
+
- Comprehensive documentation
|
|
64
|
+
- Type-safe action specifications
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## [2.x] - Legacy
|
|
69
|
+
|
|
70
|
+
**Production version - widely deployed**
|
|
71
|
+
|
|
72
|
+
Version 2.x was the stable, production release of jw-automator that was actively used in home automation, IoT projects, and personal servers. Available in git history.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
For upgrade guidance from v2 to v3, see the migration guide in the documentation.
|