Skip to main content

runopsy-adapter

What a runtime adapter is built from: a recorder that owns trace identity, a secret scanner that runs at capture time, a contract any adapter must satisfy, and a working shell adapter that records real command runs.

Why the recorder owns identity

An adapter's job is to know its runtime, not the trace format. Left to hand-roll ids and sequence numbers, every adapter reinvents the same three bugs — duplicate ids, gaps, events attributed to the wrong run — and the integrity checker then reports them as corruption in the user's trace rather than as a defect in the adapter. RunRecorder allocates sequence numbers and ids so a trace is contiguous by construction.

Why scanning happens at capture

contains_secret originates here and nowhere else. A credential that reaches the journal is already on disk, and every later control is then trying to unring a bell. Arguments and output are scanned and hashed at the moment they are recorded; the text itself never enters the trace.

Detection is best effort by construction. It is one layer among several, never the reason it is safe to write something down.

The contract

assert_adapter_contract is shipped rather than kept in this repository's tests, because the adapters that matter will live elsewhere and track their own runtime versions. Each rule exists because breaking it yields a confident wrong answer instead of an obvious error:

  • exactly one run_start, and it comes first
  • at most one run_end, and nothing recorded after it
  • unique event ids — ingest deduplicates on them, so a collision silently drops a step
  • contiguous ascending sequence numbers — a diagnosis over a gap misplaces the onset
  • every event belongs to the run being recorded
  • every timestamp timezone-aware — otherwise traces from two machines interleave wrongly

The shell adapter

record_steps runs real commands and records them. It is not an agent runtime, but it emits the same events one would, so the engine gets data nobody staged. Execution continues past a failure on purpose: an agent carries on after a step goes wrong, and the distance between the step that broke and the step where it became visible is precisely what Runopsy exists to close. Stopping at the first error would only ever produce traces whose onset is also the symptom.

Metadata

Release files for runopsy-adapter 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for runopsy-adapter 0.1.9
File Size Uploaded
runopsy_adapter-0.1.9.tar.gz 27.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for runopsy-adapter 0.1.9
File Interpreter ABI Platform
runopsy_adapter-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 60.8 kB

Release files / runopsy_adapter-0.1.9.tar.gz

Download URL runopsy_adapter-0.1.9.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4b9039666d6390797083045801d6b3c4ddb953cdff771f05fd39e5036d216636
BLAKE2b-256 checksum
How to use checksums
b621aabd08417baa681a998258ffa22c12ddfaf4687d12df486170fee08a531a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / runopsy_adapter-0.1.9-py3-none-any.whl

Download URL runopsy_adapter-0.1.9-py3-none-any.whl
Size 33.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2eb7069ab14340346fa83265f1bf2175ce8d136bd5a5fcfd8d0ff20919d2b60e
BLAKE2b-256 checksum
How to use checksums
db2d9469f78063e186b829d50b194b015ff01ad6c2b641b1bef0c09883d40aa4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page