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.0.tar.gz (4.1 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.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for processfork_openinterpreter-1.0.0.tar.gz
Algorithm Hash digest
SHA256 27302e825c9a9c0bcc5e9cd52e21f95e135a12751cb11f0ec79b26918132038d
MD5 c882caa82f67efc649aa1fe8107824b2
BLAKE2b-256 faadfb3e4382a6a857d5ba9dd95773a333e84bf476d8bba8cac9051f78676294

See more details on using hashes here.

Provenance

The following attestation bundles were made for processfork_openinterpreter-1.0.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for processfork_openinterpreter-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bdf6990ad7133a5ebeb042f88c994df9964f4ce5d0a09650e34f528d2552304
MD5 7dd09f0022d0f9298cf8bb1d61e8dffa
BLAKE2b-256 95e02a6428d45a46cf56d8ad26bebe7f25c0604cd2978e45a94035666134133a

See more details on using hashes here.

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