skeleton-crew-runtime 0.3.4 → 0.4.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 +25 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
# Skeleton Crew Runtime v0.
|
|
1
|
+
# Skeleton Crew Runtime v0.4.1
|
|
2
2
|
|
|
3
3
|
**A minimal plugin runtime for building modular JavaScript applications.**
|
|
4
4
|
|
|
5
5
|
Stop wiring up infrastructure. Start building features.
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install skeleton-crew-runtime@^0.
|
|
8
|
+
npm install skeleton-crew-runtime@^0.4.1
|
|
9
9
|
```
|
|
10
|
+
## What's New in v0.4.1
|
|
11
|
+
|
|
12
|
+
- **Plugin Hot-Swap (`runtime.swapPlugin()`)**: New method on `Runtime` that replaces a running plugin with a new version without restarting the runtime. Requires the new plugin to have the same name and a strictly higher semver version. Sequence: dispose old plugin → tear down all its registered resources (actions, screens, services) → run config validation → setup new plugin with resource tracking → emit `plugin:swapped` event. Rolls back on setup failure.
|
|
13
|
+
- **`PluginSwapError`**: New error class thrown when a swap is rejected (plugin not initialized, version not an upgrade, or new plugin setup fails).
|
|
14
|
+
- **`isNewerVersion(current, next)`**: Exported semver utility that returns `true` if `next` is strictly greater than `current`.
|
|
15
|
+
|
|
16
|
+
**[→ Complete v0.4.1 Features](CHANGELOG.md#041---2026-03-22)**
|
|
17
|
+
|
|
18
|
+
## What's New in v0.4.0
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- **Action Retry**: New `retry` field on `ActionDefinition`. On failure, the action is retried up to `retry` times with exponential backoff (100ms, 200ms, 400ms…). Timeout and memory errors are never retried.
|
|
22
|
+
- **Action Memory Limit**: New `memoryLimitMb` field on `ActionDefinition`. Measures heap delta before/after execution and throws `ActionMemoryError` if the limit is exceeded. No-op in browser environments where `process.memoryUsage` is unavailable.
|
|
23
|
+
- **Execution Recorder (`ctx.trace`)**: New first-class observability API on `RuntimeContext`. Every action run produces a frozen `TraceEntry` with `runId`, `actionId`, `input`, `output`, `status`, `durationMs`, `startedAt`, `error`, and `attempt`. Accessible via `ctx.trace.getEntries()`, `ctx.trace.getEntriesFor(id)`, and `ctx.trace.clear()`. Capped at 1000 entries by default.
|
|
24
|
+
- **`ActionMemoryError`**: New error class thrown when an action exceeds its `memoryLimitMb`.
|
|
25
|
+
- **`ExecutionRecorderImpl`**: New exported class for the in-memory recorder implementation.
|
|
26
|
+
- **Types**: `TraceEntry`, `TraceStatus`, `ExecutionRecorder`, `PluginSwapError` exported from the core package. `ActionMetadata` now includes `retry` and `memoryLimitMb` fields.
|
|
27
|
+
|
|
28
|
+
### Changed
|
|
29
|
+
- **`ActionEngine` constructor**: Now accepts an optional `onTrace` callback for recording execution entries. Fully backward compatible — existing code passing only a logger is unaffected.
|
|
30
|
+
- **`RuntimeContextImpl` constructor**: Now accepts an optional `ExecutionRecorderImpl` instance. Falls back to a standalone recorder when not provided (e.g. in tests).
|
|
31
|
+
|
|
32
|
+
**[→ Complete v0.4.1 Features](CHANGELOG.md#040---2026-03-22)**
|
|
10
33
|
|
|
11
34
|
## What's New in v0.3.3
|
|
12
35
|
|