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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for processfork_openinterpreter-1.0.2.tar.gz
Algorithm Hash digest
SHA256 8dd87f9be8cc1a2f3fef76178d1f5d32550ae7c147f1dc3248395bb8e04fcfd5
MD5 9c0a61809a3eb1c3f906a611f2696ba8
BLAKE2b-256 f36025078f2d0330e783636fa2ea83421fff6b31455c1bbce0961e63045d28da

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for processfork_openinterpreter-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8604e9e2f5fb2da5e4d5a9c69a4fd3b35d4481e6b30ed9e6f385a1d4a0069384
MD5 52d3172f971c1ff70a70dfca0ff0a315
BLAKE2b-256 e89a6dd769b344cae403d95dd6db74b7af6f522da769c8469e06216994159723

See more details on using hashes here.

Provenance

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