Finish ACP session resume and persistence docs#1493
Closed
NathanFlurry wants to merge 4 commits into
Closed
Conversation
|
🚅 Environment agent-os-pr-1493 in rivet-frontend has no services deployed. |
* feat(agentos): native actor plugin cdylib + @rivet-dev/agentos TS forwarder + tests
Rust plugin (crates/agentos-actor-plugin, cdylib): plugin side of
rivet-actor-plugin-abi; imports the UNMODIFIED agent-os-client, drives the
sidecar on its own tokio runtime, calls back into the host vtable for durable
storage + events. ABI exports + HostCtx bridge (incl. the required startup_ready
handshake), run loop + lazy VM lifecycle, full 24-op fs persistence + session
events, ~40-action dispatch (abi codec + encode_json_compat), config_json
deserializer, HTTP /preview proxy. Built end-to-end as a cdylib against the real
client + secure-exec.
Persistence e2e test (src/persistence_e2e.rs): drives the REAL handle_fs_call
dispatch (the VM's sqlite_vfs storage callback) through a mock HostVtable backed
by an in-memory rusqlite Connection, speaking the exact CBOR db_* wire contract
— migrate + mkdir/writeFile/exists/readFile/stat/readDir/removeFile round-trip.
Proves the durable-storage core against real SQLite, no VM/sidecar needed.
cargo test -p agentos-actor-plugin
TS forwarder (packages/agentos, @rivet-dev/agentos): agentOs(config) ->
ActorDefinition whose nativeFactoryBuilder calls createNativePluginFactory
({pluginPath,configJson,sidecarPath}); buildConfigJson (lock-step with
config.rs), schema, nodeModulesMount, getPluginPath(), types.
Gated on infra (spec phases 2,5-7): publish abi + rivetkit + secure-exec; CI
dylib matrix; npm platform packages; live-VM e2e (needs the built sidecar).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(agentos): default LLM egress allowlist + auto-mount agent node_modules
- session.rs: resolve renamed @rivet-dev/agentos-* agent packages (acpAdapter/agentPackage), fixing createSession("pi") on a verbatim install
- default network egress is now a deny-by-default allowlist of LLM provider hosts (anthropic/openai/gemini/openrouter) instead of allow-all; quickstart needs no permissions block
- forwarder auto-derives the /root/node_modules host_dir mount from agent descriptors' packageDir; quickstart needs no manual nodeModulesMount
- retains rivetkit preview c44621f + rivet-actor-plugin-abi 2.3.2
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* feat(agentos): include common software by default (auto-injected)
@rivet-dev/agentos now depends on @agent-os-pkgs/common and the forwarder
auto-injects it into the software list (deduped against explicit entries) so the
quickstart is just software: [pi]. Opt out with options.defaultSoftware: false.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Member
Author
|
Closing — the session-resume + persistence work in this branch already landed in main through the dylib/rename merges. Verified the contributing files ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
session/load/session/resumeand transcript fallback via a one-shot preamble.Reference > Advanced > Architecture > Sessions & Persistenceand records architecture-doc maintenance guidance inCLAUDE.md.link:/ Cargopathdependency state, returning the workspace tojust secure-exec-statuspinned mode.Why
RivetKit actors can survive sleep/wake, but the live VM and ACP agent process do not. This PR makes persisted Agent OS sessions resumable by rebuilding durable context from actor SQLite and rehydrating a live ACP session on demand.
Validation
git diff --checkpnpm --dir packages/core buildpnpm --dir website buildjust secure-exec-statusreportsmode: pinned@secure-exec/*or@agent-os-pkgs/*link:deps. The remainingpnpm-lock.yamllink:entries are local workspace packages in this repo.Blocked locally:
cargo test -p agent-os-sidecar acp -- --test-threads=1cannot resolvesecure-exec-sidecar-browserfrom crates.io.pnpm --dir packages/core exec vitest run tests/session-resume.test.ts tests/opencode-session.test.ts --reporter=verbosereaches the same Cargo resolver failure while buildingagent-os-sidecar.The unresolved crate is not local-dev state:
secure-exec-sidecar-browseris still listed in the workspace dependency manager and CI, but is not published on crates.io. That needs a secure-exec publish or a deliberate Agent OS browser-wrapper dependency change before Cargo validation can pass in fully pinned mode.