Commit Graph

15 Commits

Author SHA1 Message Date
Steve Biedermann 867eabb957 feat!: retain actor state when handlers return unit
Allow omitted state returns in handlers and shutdown hooks. Preserve committed state rather than invocation-local mutations, while acknowledging successful messages and committing valid sends.

BREAKING CHANGE: unit returns no longer replace actor state with null. Use host state editing to explicitly set null state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 19:00:18 +01:00
Steve Biedermann c851fefa98 feat: add editable actor inspection and context self references
Add scheduler toolbar and copy-reference actions, guarded inspection JSON saves with protected-field warnings, and read-only ctx.this for self-messaging. Preserve exact actor values and unsaved edits across refreshes, and test the save lifecycle in the VS Code host.

Isolate the CLI forwarding test from the editable counter example.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 18:52:10 +01:00
Steve Biedermann de69059fa3 feat!: add actor repair and filtered log subscriptions
Add guarded state and mailbox editing, immediate severity-filtered actor logs, and per-client history/follow subscriptions. Expose repair and log-level controls in the CLI, REPL, and VS Code.

BREAKING CHANGE: protocol v5 requires actor log thresholds in snapshots and introduces editing and log subscription operations. Rebuild the server, CLI, and extension together.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 18:26:21 +01:00
Steve Biedermann efef8a93b9 feat!: add image source files and system messages
Separate editable image sources from generated commit revisions and loaded actor implementations. Add the source filesystem and context actions in VS Code, path-based REPL commands, sender-aware actor contexts, and privileged lifecycle controls.

BREAKING CHANGE: protocol v4 replaces published behavior commands with image source paths and commit operations. Actor handlers now use handle(ctx, state, sender, message) and return only state; outgoing messages use ctx.send or ctx.send_from.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 17:01:24 +01:00
Steve Biedermann ad63e286d9 feat!: add structured actor state and messages
Introduce owned portable values with distinct actor references, bounded Rune conversion, JSON REPL literals, and nested reference completion. Preserve isolation and atomic transitions across state, messages, effects, migration, inspection, and TCP clients.

BREAKING CHANGE: protocol v3 replaces integer state and kind/value/target_ref messages with tagged values. Rune handlers now take (state, message) and return (new_state, [(actor_reference, message)]). The REPL send command accepts one JSON message.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 16:56:03 +01:00
Steve Biedermann 4f6e7ccfa2 feat: add NanoID actor refs and REPL bindings
Require explicit behavior selection on spawn, expose randomized actor references, and add named REPL bindings, completion, history navigation, and protocol v2 routing.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 15:19:25 +01:00
Steve Biedermann 8d3496c621 feat: expose active execution telemetry
Expose the latest completed Rune step count, instruction pointer, and call-frame depth on active actor snapshots. Preserve telemetry while paused and clear it when execution ends or is cancelled. Document that this is not source-level debugging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 13:11:11 +01:00
Steve Biedermann 1916814c2e feat: add explicit handler cancellation
Expose cancellation for active and paused handler invocations. Cancellation drops the invocation, preserves committed state, moves reserved input to the mailbox front for retry, and emits an event. Document that native side effects are not rolled back; test cancelling pending async work and retrying an input under a newly installed behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 13:04:47 +01:00
Steve Biedermann bdc34d037c feat: support atomic state migration on upgrade
Add a safe-point runtime API for explicit state migration during implementation installation. Migration failures preserve both committed actor state and the current implementation; successful changes emit a migration event. Document the current i64-only contract and leave schema-aware or Rune-authored migrations as future work.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 12:45:02 +01:00
Steve Biedermann 42a5884f45 feat: add cooperative actor pause and resume
Add pause/resume lifecycle operations that retain active Rune invocations and restore their prior runnable or awaiting state. Expose both operations in the CLI and document the between-tick, non-preemptive guarantee.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 12:35:29 +01:00
Steve Biedermann 3be18f2f53 feat: add versioned behavior registry
Add optimistic behavior publishing, immutable revision history and rollback, plus runtime implementation installation at idle handler boundaries.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 10:18:07 +01:00
Steve Biedermann c04a7ed12f feat: add content-addressed Rune code store
Add stable versioned source and implementation IDs, exact original-source retention, compiler fingerprints, and an in-memory compiled artifact cache. Use implementation content IDs in runtime actor references.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 10:08:49 +01:00
Steve Biedermann 2230b666ab feat: add interactive local runtime CLI
Add a REPL for spawning actors, sending messages, ticking, inspection, events, stop, and restart. Expose ordered actor snapshots and document the local control surface.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 09:31:25 +01:00
Steve Biedermann e27a40cbf5 test: define actor retry and transition guarantees
Cover failed-message retries from committed state and stop/restart FIFO preservation. Document in-memory all-or-nothing transitions and their process-local limits.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 09:27:29 +01:00
Steve Biedermann d766a1b055 feat: add minimal single-worker actor runtime
Implement typed, budgeted Rune invocation slices and a minimal in-memory actor runtime with bounded mailboxes, state transitions, effects, and lifecycle operations. Add feasibility and runtime documentation with tests for async resumption, cancellation, and scheduler fairness.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 09:19:04 +01:00