Transpect keeps OpenClaw runtime evidence, viewer tooling, diagnosis export, and optional capture integrations in one repository. The repository is organized around a runs-based storage model: one task maps to one frozen evidence directory under monitor/live/runs/<runId>/.
The canonical storage model is:
monitor/live/runs/<runId>/for canonical per-run evidencemonitor/live/runs/<runId>/diagnosis/codetracer/bundle/for derived CodeTracer inputmonitor/live/runs/<runId>/diagnosis/codetracer/analysis/for derived diagnosis outputmonitor/live/runs/<runId>/security-reasoning/for online contextual defense state and decisionsmonitor/live/runs/<runId>/security-context/for legacy-compatible Layer-4 context reportsmonitor/live/runs/index.jsonfor viewer discovery and run listing
The repository does not use a separate harvest/ layer in the current architecture, and it does not treat a single global monitor/live/behavior-events.jsonl file as canonical storage.
docs/architecture/canonical-layout.md is the authoritative layout contract. The other architecture docs summarize specific slices of that same model and should not redefine it.
Transpect/
├── docs/
│ └── architecture/
│ ├── canonical-layout.md
│ └── overview.md
├── config/
├── dashboard/
│ ├── console/ dashboard app
│ └── viewer/ static debug viewer
├── monitor/
│ ├── instrumentation/frida/
│ ├── live/
│ │ ├── runs/
│ │ ├── logs/ runtime-support only
│ │ ├── otel/ optional
│ │ ├── frida/ optional
│ │ ├── openclaw/ runtime-support only
│ │ ├── ports/ runtime-support only
│ │ └── archive/ legacy/optional
│ ├── runtime/
│ ├── task_repos/
│ ├── tests/
│ ├── trace_model/
│ └── vendor/
│ ├── runtime-hooks/
│ └── external/
├── guardrail/
│ ├── agent_defense/
│ └── security/
├── tools/
│ ├── common/
│ ├── runtime/
│ ├── export/
│ ├── diagnosis/
│ ├── security_reasoning/
│ ├── security_context/
│ ├── validate/
│ ├── capture/
│ └── compat/
├── pyproject.toml
├── uv.lock
└── CLAUDE.md
Grouped tooling paths are the primary interface. Use tools/runtime/, tools/validate/, tools/export/, and tools/diagnosis/; flat tools/*.py files are compatibility wrappers only.
The lowest supported deployment path is frozen showcase replay. It does not require OpenClaw, Frida, CodeTracer, or R-Judge; those components are higher-level capture and diagnosis capabilities.
git clone https://github.com/Vehicle-Security/Transpect.git Transpect
cd Transpect
uv sync
source .venv/bin/activate
cd dashboard/console
npm ci
cd ../..
python tools/validate/deployment_doctor.py --mode replay
python tools/demo/validate_showcase.py --require-report-model
python tools/demo/start_console.py --port 5000Open:
http://127.0.0.1:5000
The Console reads committed frozen data under dashboard/state/showcase/ and each run's report_model.json, then presents Overview, Showcase Gallery, Agent Security Report, and Artifact Viewer pages.
Frozen showcase replay does not need an LLM or a .env file. Create one only when you want to run live Agent tasks, enable the Agent Defense LLM gray-zone judge, or run CodeTracer diagnosis:
cp .env.example .envThen fill in the OpenAI-compatible model settings:
BASE_URL=https://api.openai.com/v1
API_KEY=...
MODEL_ID=gpt-4o-miniThese values are consumed by:
guardrail/security/model_judge.pyfor Agent Defense gray-zone decisions.tools/common/task_repo_common.py, which mapsBASE_URL/API_KEY/MODEL_IDtoMODEL_BASE_URL/MODEL_API_KEY/MODEL_NAMEfor task repos.tools/diagnosis/run_codetracer_diagnosis.py, which maps them toCODETRACER_API_BASE/CODETRACER_API_KEY/CODETRACER_MODELunless explicitCODETRACER_*overrides are set.
.env is ignored by git. Commit only .env.example.
Use this for GitHub clone demos, product review, and offline report browsing.
Required:
- Python 3.11+ and Node.js 20+
uv synccd dashboard/console && npm ci- committed
dashboard/state/showcase/index.jsonandreport_model.jsonfiles
Checks:
python tools/validate/deployment_doctor.py --mode replay
python tools/validate/check_portability.py
python tools/demo/validate_showcase.py --require-report-modelStart:
python tools/demo/start_console.py --host 127.0.0.1 --port 5000Use this when you also want the static debug viewer or staged attack website. It still does not require rerunning an Agent.
python tools/runtime/serve_viewer.py --host 127.0.0.1 --port 8711
python tools/demo/run_staged_attack_site.py --host 127.0.0.1 --port 8765Static fallback/debug viewer:
http://127.0.0.1:8711/viewer/index.html?view=showcase
Use this to generate new real Agent traces. This level requires OpenClaw gateway access, behavior mediator hooks, and model/provider configuration.
cp .env.example .env # fill BASE_URL/API_KEY/MODEL_ID before LLM-backed runs
python tools/runtime/setup_runtime.py --mode core
python tools/validate/discover_openclaw_native_sources.py
python tools/validate/doctor.py
python tools/demo/run_showcase.py --verboseIf doctor.py reports scope upgrade pending approval or pairing required, approve the requested OpenClaw scopes first, then rerun doctor.py.
Use this for OS-level Frida evidence and CodeTracer diagnosis. Frida and CodeTracer are important for full evidence, but missing components are reported as degraded or unavailable rather than breaking Level 0 replay.
Optional environment variables:
uv sync --extra frida
export CODETRACER_ROOT="$HOME/path/to/CodeTracer"
export CODETRACER_SRC="$CODETRACER_ROOT/src"Build derived trace artifacts for a run:
python tools/validate/discover_openclaw_native_sources.py --run-dir monitor/live/runs/<runId>
python monitor/trace_model/build_canonical_trace.py --run-dir monitor/live/runs/<runId>
python tools/validate/evaluate_trace_quality.py --run-dir monitor/live/runs/<runId> --write
python tools/export/export_openinference_trace.py --run-dir monitor/live/runs/<runId>
python tools/validate/validate_openinference_export.py --path monitor/live/runs/<runId>/exports/openinference_spans.jsonIf CodeTracer is not installed, tools/diagnosis/run_codetracer_diagnosis.py writes a structured diagnosis_report.json with status: "unavailable" and a setup suggestion. The run can still produce final judgment, canonical trace, and replayable report data.
R-Judge is optional and only needed when you explicitly run --repo rjudge.
export R_JUDGE_ROOT="$HOME/path/to/R-Judge"
python tools/runtime/run_task_repo.py --repo rjudge --mode list-tasks
python tools/runtime/run_rjudge_batch.py --source-path data/Program --count 5 --concurrency 2Missing R-Judge does not affect staged_attack, Console replay, static viewer replay, or frozen showcase validation.
For product demos, generate the real run once, freeze it, build report models, and replay it without rerunning the Agent:
python monitor/trace_model/build_canonical_trace.py --run-dir monitor/live/runs/<runId>
python tools/validate/evaluate_trace_quality.py --run-dir monitor/live/runs/<runId> --write
python tools/export/export_openinference_trace.py --run-dir monitor/live/runs/<runId>
python tools/demo/freeze_showcase_run.py \
--run-dir monitor/live/runs/<runId> \
--id staged_attack_confirm_frida \
--title "Suspicious External Navigation" \
--description "系统发现外部跳转和低层运行时证据,并将 native OpenClaw trace、Frida、CodeTracer 与最终判断统一为 deep trace。"
python tools/demo/build_showcase_reports.py
python tools/demo/validate_showcase.py --require-report-modeltools/demo/freeze_showcase_run.py sanitizes machine-local paths in frozen artifacts. To check portability before publishing:
python tools/demo/sanitize_showcase_paths.py --check
python tools/validate/check_portability.pyCurrent frozen showcase data includes replayable reports with real Frida evidence, CodeTracer diagnosis bundles, canonical trace summaries, and OpenInference-style exports. Reference screenshots:
See docs/product-showcase-guide.md for the full workflow.
canonical_trace.json is a derived standard trace view. It does not replace raw behavior-events.jsonl, native OpenClaw source files, Frida events, CodeTracer output, or final_judgment.json.
Each canonical run directory may contain:
behavior-events.jsonlopenclaw-lifecycle.jsonlopenclaw-assistant.jsonlopenclaw-tools.jsonlopenclaw-plugin-hooks.jsonlsession_transcript.jsonfrida-events.jsonltrace_index.jsonmerged-trace.jsonlcanonical_trace.jsontrace_quality.jsonexports/openinference_spans.jsonmanifest.jsontask_input.jsonruntime_status.jsonartifacts/<toolCallId>/input.jsonartifacts/<toolCallId>/output.jsondiagnosis/codetracer/bundle/...diagnosis/codetracer/analysis/...security-reasoning/security_state.jsonsecurity-reasoning/defense_decision.jsonsecurity-reasoning/evidence_summary.jsonsecurity-reasoning/final_judgment.jsonsecurity-context/security_context_timeline.jsonsecurity-context/context_report.json
monitor/live/behavior-events.jsonl is retained only as a migration source for older environments. If you still have historical global logs, use:
python tools/diagnosis/segment_behavior_events.py --dry-run
python tools/diagnosis/segment_behavior_events.py --archive-sourceThe canonical viewer and diagnosis flow reads runs from monitor/live/runs/index.json and run-local files.
External benchmark repositories can also be onboarded through manifest-driven task repo adapters under monitor/task_repos/, with structured reports written back into monitor/live/runs/<runId>/.
node --check dashboard/viewer/app.js
node --check dashboard/viewer/shared.js
node --check monitor/vendor/runtime-hooks/openclaw-behavior-mediator/index.js
python -m unittest discover -s monitor/tests -p 'test_*.py' -v
python tools/validate/check_portability.py
python tools/validate/deployment_doctor.py --mode replay
python tools/validate/check_repo.py --skip-start
python tools/validate/doctor.py
python tools/validate/run_acceptance.pyDiagnosis execution can use the codetracer Python module plus a resolvable source tree via CODETRACER_ROOT, CODETRACER_SRC, or a sibling ../CodeTracer/src. If it is missing, tools/diagnosis/run_codetracer_diagnosis.py writes a structured unavailable report and the replay path continues.
tools/runtime/setup_runtime.pyupdates~/.openclaw/openclaw.jsonand writes timestamped backups underconfig/applied/.monitor/vendor/runtime-hooks/openclaw-behavior-mediator/is repository-owned runtime integration code.monitor/vendor/external/openclaw-observability-plugin/is a vendored external dependency.- Optional Frida support lives under
monitor/instrumentation/frida/; agent-trace runs write run-localfrida-events.jsonlwhen Frida can attach, or record an unavailable/attach-failed status intrace_index.json.

