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.3.tar.gz (5.7 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.3-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for processfork_openinterpreter-1.0.3.tar.gz
Algorithm Hash digest
SHA256 3c3aa92b18fc6533c06bea828cee30f306b788387dcb7bf4e6ec517a5955ff06
MD5 7ab00e64b08eca6ba2feaa54f4c94b48
BLAKE2b-256 47de3db9c89622463e8744c244386e8c71354a3c1fd2472edc48d1692ad79f6b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for processfork_openinterpreter-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 653d444193dda77f50d1bbeacecb1fe3603d13956acbde49df44bcdca3326905
MD5 c2050c8079f24dd59e8bf711c1394158
BLAKE2b-256 ce09ee567465299e3ad5b1d4c29526a96810ea89668c90ae92a124b94140e1e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for processfork_openinterpreter-1.0.3-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