Commit Graph

40 Commits

Author SHA1 Message Date
Steve Biedermann 5be7bb6a01 feat: add standalone Rust debug adapter and actor behavior files
Expose behavior.rn for every actor and launch runa-dap from VS Code. Serve framed stdio DAP with actor-local breakpoints, exact loaded sources, bounded stepping, committed snapshot inspection, and guarded lifecycle handling.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-05 09:26:51 +01:00
Steve Biedermann 35902b6b4d feat: add source and actor trees to world side panels
Replace behavior dropdowns with a hierarchical source browser on the left and actor inspection files on the right. Preserve draft guards and cover tree navigation with unit and rendered click tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-05 09:04:53 +01:00
Steve Biedermann e446d43b91 feat: add non-destructive GUI event history
Add a bounded cursor-based event feed with independent client cursors, integrate it into the world client, and test GUI save workflows and event-history gaps.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-04 07:34:23 +01:00
Steve Biedermann c697010765 feat: add actor behavior editor to world
Add actor-local temporary behavior editing, reload-from-source, and confirmed updates to the shared source while guarding unsaved drafts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-04 06:38:47 +01:00
Steve Biedermann 2f9d500ca3 feat: add source history tools to world client
Add committed revision browsing, syntax-highlighted source editing, revision previews, and confirmed rollbacks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-04 05:11:36 +01:00
Steve Biedermann fc33332e7d feat: extend graphical world source tools
Add image source editing with compile diagnostics and explicit source commits, plus manual event collection.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-04 04:56:26 +01:00
Steve Biedermann 97585a6f10 feat: add graphical world client
Add an egui actor browser, inspector, and debugger controls over the shared WebSocket image.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-04 04:49:07 +01:00
Steve Biedermann 99dc794b30 feat: restore saved images at server startup
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-04 02:03:20 +01:00
Steve Biedermann 65c08b04c6 feat: add boundary-safe disk image save and restore
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-04 01:57:37 +01:00
Steve Biedermann 191d0d6939 feat: add failed actor debugger inspection
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 23:40:04 +01:00
Steve Biedermann 4f47a1b3de feat: add read-only actor snapshot watches
Resolve actor JSON Pointer paths in Watch and Debug Console without evaluating Rune. Add watch paths to Variables entries and preserve expandable results, exact integers and snapshot-scoped handles. Validate malformed paths, stale frames and real-image draft isolation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 22:47:18 +01:00
Steve Biedermann e6a8ac84e3 feat: add read-only actor snapshot debug scopes
Expose committed actor state, mailbox, configuration and identity as expandable DAP variables with exact integer values, paging and stop-scoped handles. Verify draft isolation against the real image and document the pinned Rune APIs and missing local lifetime mappings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 21:48:08 +01:00
Steve Biedermann c2781a9bb8 feat: add native VS Code actor debugging
Attach an inline DAP session to one actor with exact loaded sources, gutter breakpoint verification, call stacks and bounded toolbar controls. Preserve explicit scheduler ticks, guard connection and code-version changes, and leave actors unchanged on detach.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 21:36:30 +01:00
Steve Biedermann 68afb435f3 feat: add bounded source step-over and step-out
Extend mode-aware stepping across runtime, image API, protocol and VS Code while retaining default step-into behavior. Test recursive calls, nested breakpoints, async and lifecycle boundaries, and real editor navigation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 21:14:06 +01:00
Steve Biedermann 19eaeb447c feat: add actor source stepping and breakpoints
Add implementation-bound line breakpoints and bounded step-into for paused active actors. Preserve invocation drafts and transactional sends, expose debugger stop reasons, and wire VS Code actor controls with exact loaded-source navigation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 20:53:43 +01:00
Steve Biedermann b8080fe02e feat: add loaded-source execution stack inspection
Expose bounded active Rune frames and exact installed source through read-only image and protocol inspection. Add immutable VS Code source navigation and lifecycle, await, and integration coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 20:37:05 +01:00
Steve Biedermann 7e25cb8ef6 feat: add structured Rune compilation diagnostics
Expose typed compiler errors and warnings with UTF-16 source ranges through read-only source checking and compilation failure details. Preserve terminal diagnostics for ordinary compilation without mutating image state or caching validation artifacts.

Show debounced diagnostics for unsaved image sources and actor-local behaviors in VS Code Problems. Discard obsolete document and connection results, with regression coverage for Unicode ranges, warnings, side-effect isolation and held in-flight response races.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 20:28:56 +01:00
Steve Biedermann 318bb5dbd2 feat: add actor file trees and temporary behavior editing
Expose actor metadata, live configuration, natural state/mailbox edits and retained logs as virtual files. Add guarded image source creation, rename/move and deletion with actor path tracking.

Compile actor-local temporary behavior edits at safe boundaries, preserve them across restart, clear them on reload, and confirm copying them to shared source. Cover protocol, runtime and actual VS Code host workflows.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 20:11:39 +01:00
Steve Biedermann f5decbdea4 feat!: remove actors on stop and kill and default counter state
Remove actors after successful graceful shutdown or immediately on kill, including state, mailbox, logs, and source-path metadata. Keep failed actors available for inspection and repair. Preserve restart as an independent identity-retaining operation and mark removed VS Code snapshots read-only.

Default the self-incrementing counter's missing state to zero on its first message and isolate finite control-test fixtures from the demo.

BREAKING CHANGE: stop and kill permanently remove actors instead of retaining stopped instances. Removed references cannot be inspected, sent to, or restarted. Use restart directly to retain actor identity and state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 19:23:43 +01:00
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 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 39b7443c79 feat: add VS Code behavior and source browsing
Show published behaviors and revision history, retrieve exact Rune source through the shared protocol, and cache read-only source documents by connection session and revision. Refresh behavior listings on image notifications and cover browsing against the real server and VS Code host.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 15:57:43 +01:00
Steve Biedermann e8c9fcad65 feat: add VS Code actor controls
Add explicit-behavior spawning, structured message input, lifecycle actions, and explicit scheduler ticks. Preserve lossless integers and enforce the complete request size limit. Verify controls and live snapshot updates against the real image and VS Code host.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 15:54:07 +01:00
Steve Biedermann b63666bcc2 feat!: rename server and CLI and adopt Clap arguments
Rename the server crate and executable to runa and the REPL to runa-cli. Parse executable arguments with Clap derive/env, default the server to loopback port 3737, and support RUNA_LISTEN and RUNA_CONNECT with explicit flag precedence.

Remove the stdio transport and child-process client. Make mise start launch the server and mise cli launch the REPL, updating extension integration runners and documentation.

BREAKING CHANGE: runa now starts the WebSocket image server rather than the REPL; use runa-cli for the REPL. The runa-server package, stdio transport, LocalClient, ProtocolClient, and serve/serve-network mise tasks are removed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 15:49:35 +01:00
Steve Biedermann 72a37b178c feat!: use runa-debug WebSockets with live image notifications
Replace plain TCP JSON-lines connections with bounded loopback WebSockets using the required runa-debug subprotocol. Keep single-threaded image dispatch and stdio framing unchanged.

Broadcast coalesced, non-destructive image_changed invalidations after successful mutations. Update the REPL client and automatically refresh VS Code actor trees and open inspectors, preserving request correlation and connection-session isolation.

Validate negotiation, message limits and fragmentation, multi-client notifications, real REPL interoperability, and automatic mailbox/lifecycle/failure inspection in a VS Code extension host.

BREAKING CHANGE: the network endpoint now accepts only runa-debug WebSockets at the root path, not plain TCP JSON Lines. Rust network integrations must use WebSocketClient and serve_websocket. Request/response DTOs remain protocol v3; stdio is unchanged.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 15:36:21 +01:00
Steve Biedermann 8ce6ca9a2a feat: add a localhost VS Code actor inspector
Add explicit connection management, an actor explorer, and session-isolated read-only snapshots over protocol v3. Preserve 64-bit values and validate bounded framing, correlation, and snapshot contracts without draining events or advancing the image.

Wire TypeScript formatting and checks into mise, add real Rust-server interoperability tests, and verify inspection and reconnect behavior in a VS Code extension host.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-03 14:52:28 +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 350ddba0ce feat!: connect the REPL to the localhost image
Add a reusable loopback TCP client, server-owned counter bootstrap, and shared-image reconnect coverage. Preserve actor state and behavior revisions across client disconnects without retrying uncertain requests.

BREAKING CHANGE: the REPL no longer starts an embedded image. Start runa-server with --listen before connecting; use --connect to select a loopback endpoint.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 15:57:26 +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 d96d603286 feat: add localhost TCP protocol listener
Expose the existing versioned JSON-lines dispatcher over TCP, with an enforced IPv4/IPv6 loopback-only bind, bounded nonblocking client handling, request and response size limits, and a shared single-threaded image. Add a serve-network mise task, subprocess coverage, and document the unauthenticated trusted-local-development boundary.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 14:50:30 +01:00
Steve Biedermann e5d839f419 feat: add local protocol client
Add runa-client for launching the JSON-lines server as a child process and exchanging bounded, correlated protocol requests. Validate response versions and request IDs, expose graceful shutdown, and test the client against the real server process. Clarify that VS Code is planned to use an authenticated network connection to the same live image, while stdio serves local child-process integrations and actors remain in the image.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 14:40:56 +01:00
Steve Biedermann ce7bb5602a refactor: route CLI through protocol dispatcher
Replace the CLI's direct ImageApi dependency with protocol commands dispatched through runa-server. Render typed protocol replies for behavior, actor, event, lifecycle, and scheduler operations, preserving the interactive workflow while exercising the same contract used by the local JSON-lines transport.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 14:30:22 +01:00
Steve Biedermann 3146423f78 feat: add local JSON-lines server transport
Expose the runa-server protocol dispatcher over newline-delimited JSON on stdin/stdout for a trusted parent process. Bound request lines to 1 MiB, return one correlated response for each valid request, and fail explicitly on malformed or oversized input. Add the mise serve task and document that this is not a network listener or an authenticated service.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 14:18:45 +01:00
Steve Biedermann adf0eaf4f8 feat: add protocol request dispatcher
Add a transport-neutral runa-server dispatcher that validates protocol requests, routes supported operations through runa-image-api, and converts actor snapshots, behavior revisions, events, and failures into wire DTOs. Document that event retrieval drains the in-memory queue and that network transport and authentication remain future work.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 13:44:33 +01:00
Steve Biedermann a65c66db01 feat: define versioned Runa protocol DTOs
Add the runa-protocol crate with version-1 request, response, and event DTOs, serde serialization, and basic envelope and input validation. Document the wire contract and clarify that transport, dispatch, and authentication remain future work.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 13:36:32 +01:00
Steve Biedermann 515a6439b5 feat: add trusted in-process image API
Introduce the runa-image-api service boundary for behavior source retrieval, publishing, history, rollback, actor lifecycle, messaging, scheduling, snapshots, and events. Route the local CLI through the API and document that it is trusted and process-local, with no network authentication.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-02 13:20:45 +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 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 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 50bc795738 chore: scaffold Phase 0 repository structure
Move the updated architecture specification into docs, add the Rune adapter library scaffold, and reserve the planned repository directories.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-11-01 20:15:00 +01:00