|
| 1 | +## Highlights |
| 2 | + |
| 3 | +Modules live on the stream. Append any Nushell module as a `*.nu` topic and it |
| 4 | +becomes available to actors, services, and actions via standard `use` imports: |
| 5 | + |
| 6 | +```nushell |
| 7 | +# register a module |
| 8 | +http get https://example.com/discord.nu | .append discord.nu |
| 9 | +
|
| 10 | +# use it in an actor |
| 11 | +r#'{ |
| 12 | + run: {|frame, state| |
| 13 | + use discord |
| 14 | + discord channel message create $frame.meta.channel_id {content: "hi"} |
| 15 | + {next: $state} |
| 16 | + } |
| 17 | +}'# | .append bot.register |
| 18 | +``` |
| 19 | + |
| 20 | +Each processor snapshots the modules that existed at registration time, so |
| 21 | +updating a module doesn't affect already-running processors until they are |
| 22 | +re-registered. |
| 23 | + |
| 24 | +Actors now thread state explicitly, matching Nushell's `generate` command: |
| 25 | + |
| 26 | +```nushell |
| 27 | +{ |
| 28 | + initial: 0 |
| 29 | + run: {|frame, state| |
| 30 | + let next = $state + 1 |
| 31 | + {out: {count: $next}, next: $next} |
| 32 | + } |
| 33 | +} |
| 34 | +``` |
| 35 | + |
| 36 | +Return `{out: ..., next: ...}` to emit and continue, `{next: ...}` to skip |
| 37 | +output, or `{out: ...}` / `null` to stop. The old single-parameter closure |
| 38 | +shape is no longer supported. |
| 39 | + |
| 40 | +Record output from all three processor types now goes to frame metadata by |
| 41 | +default -- no CAS round-trip needed to read structured data. Non-record output |
| 42 | +(strings, binary) requires `return_options: { target: "cas" }`. |
| 43 | + |
| 44 | +The processor codebase has been reorganized: handlers, generators, and commands |
| 45 | +are now **actors**, **services**, and **actions**, each running as independent |
| 46 | +tasks under `src/processor/`. |
| 47 | + |
| 48 | +Graceful shutdown: when xs receives a signal it emits `xs.stopping`, giving |
| 49 | +services time to clean up before exit. |
| 50 | + |
| 51 | +## Breaking changes |
| 52 | + |
| 53 | +- feat!: actor closure shape matches nushell generate (#137) |
| 54 | +- feat!: actor, service, and action record output goes to frame metadata by default |
| 55 | +- refactor!: unified dispatcher with VFS module system (#136) |
| 56 | +- refactor!: remove dispatcher, each processor owns its lifecycle |
| 57 | +- refactor!: rename handlers -> actor, generators -> service, commands -> action |
| 58 | +- refactor!: move processor modules under src/processor/ umbrella |
| 59 | +- feat!: remove xs/ prefix from VFS module paths |
| 60 | +- refactor!: replace .last -n flag with positional count |
| 61 | +- refactor!: disallow numeric prefix in topic names |
| 62 | + |
| 63 | +## Changelog |
| 64 | + |
| 65 | +- feat: graceful shutdown via xs.stopping frame |
| 66 | +- feat: add --with-timestamp flag to frame-returning endpoints |
| 67 | +- fix: compact error messages for eval and connection failures |
| 68 | +- fix: show helpful message when store is locked |
| 69 | +- fix: include docs build in check.sh to catch MDX errors |
| 70 | +- docs: align doc structure with Diataxis framework |
| 71 | +- docs: add service lifecycle tutorial |
| 72 | +- docs: add guidance on meta vs CAS for structured data |
0 commit comments