Skip to content

feat(sensor): capture Pi conversations and branch-aware tool activity - #122

Draft
barisozbas wants to merge 1 commit into
mainfrom
bozbas/sensor-pi
Draft

barisozbas wants to merge 1 commit into
mainfrom
bozbas/sensor-pi

Conversation

@barisozbas

@barisozbas barisozbas commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Summary

Intent:

  • Add local-file observability for Pi sessions without hooks, credentials, or agent configuration changes.

Changes:

  • Read v1-v3 JSONL sessions and preserve all recorded branches, full tool arguments/results, failures, provider/model metadata, typed content, and recorded usage.
  • Correlate results along their branch ancestry, preserve extra/orphan results, and distinguish user shell commands from assistant actions.
  • Register the pi source, refresh resumed session exports, and document native macOS/Linux/Windows storage paths, overrides, and capture limits.
  • Add contract fixtures and a native three-OS parser CI matrix without new runtime dependencies.

Test Plan

Authenticated Pi model sessions have not been run. Before production rollout, run a Pi conversation with read/write/shell tools, resume and branch it, then compare adr-sensor --source pi --save-sessions output with the persisted JSONL. In-memory sessions and content Pi never persisted are outside capture scope. Automated CI replays contract fixtures rather than launching the agent.

Revert Plan

Revert this change to remove the pi source; existing exported JSON remains readable.

Issue Links

None - user-requested source onboarding without a tracking issue.

Summary:
Intent:
- Add local-file observability for Pi sessions without hooks, credentials, or agent configuration changes.

Changes:
- Read v1-v3 JSONL sessions and preserve all recorded branches, full tool arguments/results, failures, provider/model metadata, typed content, and recorded usage.
- Correlate results along their branch ancestry, preserve extra/orphan results, and distinguish user shell commands from assistant actions.
- Register the pi source, refresh resumed session exports, and document native macOS/Linux/Windows storage paths, overrides, and capture limits.
- Add contract fixtures and a native three-OS parser CI matrix without new runtime dependencies.

Test Plan:
Authenticated Pi model sessions have not been run. Before production rollout, run a Pi conversation with read/write/shell tools, resume and branch it, then compare adr-sensor --source pi --save-sessions output with the persisted JSONL. In-memory sessions and content Pi never persisted are outside capture scope. Automated CI replays contract fixtures rather than launching the agent.

Revert Plan:
Revert this change to remove the pi source; existing exported JSON remains readable.

Issue Links:
None - user-requested source onboarding without a tracking issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant