Skip to main content

ProcessFork wrapper for OpenInterpreter — undo destructive shell commands via pf checkout.

Project description

processfork-openinterpreter

ProcessFork wrapper for OpenInterpreter. Lets you snapshot before a dangerous shell op and pf checkout if it goes wrong.

Install

pip install "processfork-openinterpreter[oi]"

Use

import interpreter
from processfork_openinterpreter import wrap_interpreter

interpreter = wrap_interpreter(interpreter, store="~/.processfork", fs_root=".")

interpreter.snapshot("pre-rm-rf")
interpreter.chat("rm -rf /tmp/foo")
# … if it goes wrong:
interpreter.checkout("pre-rm-rf")

The wrapper:

  • Hooks interpreter.computer.run to tap the effect ledger.
  • Snapshots include the interpreter.messages chat history (trace), the working directory (world.fs), and the env (world.env).
  • The Python kernel's globals are preserved across snapshots via dill; install with [oi] extras to enable.

OpenInterpreter doesn't expose a paged KV cache, so the cache layer in the snapshot is empty — interpreter sessions are cheap to re-prefill.

See agent_docs/integration-openinterpreter.md for the full spec.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

processfork_openinterpreter-1.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

processfork_openinterpreter-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file processfork_openinterpreter-1.0.1.tar.gz.

File metadata

File hashes

Hashes for processfork_openinterpreter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 a7f07a36dedfb09aa42f18823c52fc159949145d7b317a4d4b5e7c71885c2bbb
MD5 fabd4d50ba6f654fbfe3e5dae429a903
BLAKE2b-256 34ab9450a6ae8802e16d0cb81b7a05355cb700b870d567dd52983df4ebbc30bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for processfork_openinterpreter-1.0.1.tar.gz:

Publisher: release.yml on manav8498/processfork

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file processfork_openinterpreter-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for processfork_openinterpreter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 88f0ed15c22bacc66b1f0bc4e5e8fe8ab169680201443710f0a5a2b5591153ed
MD5 ca6dbd673174ff9d2a17c9019b278431
BLAKE2b-256 f881eb21c512a8a78dbdf2ee4a022c2fbe39e7b48af7e5f8f33dcd2386195733

See more details on using hashes here.

Provenance

The following attestation bundles were made for processfork_openinterpreter-1.0.1-py3-none-any.whl:

Publisher: release.yml on manav8498/processfork

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page