@raquezha/notrace 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +59 -6
- package/dist/notrace.js +466 -337
- package/extensions/notrace.ts +500 -337
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @raquezha/notrace
|
|
2
2
|
|
|
3
|
+
## 0.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6eac69d: Relocate core configuration files (`mindsets.json`, `settings.json`, `AGENTS.md`) to a dedicated `config/` directory for better maintainability and a cleaner repository root. Updated `bootstrap.sh` and shell integration to support the new layout.
|
|
8
|
+
- c19a93a: Add a machine-readable `notrace.json` run record alongside the existing HTML report to normalize captured session/task metadata, activity metrics, and evidence for future retrospective and comparison workflows.
|
|
9
|
+
|
|
3
10
|
## 0.0.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,23 +1,36 @@
|
|
|
1
1
|
# notrace
|
|
2
2
|
|
|
3
|
-
Phase 0 / POC local-first
|
|
3
|
+
Phase 0 / POC local-first trace capture for the Pi Coding Agent. It captures execution traces for workflow debugging — LLM calls, tool executions, token usage, costs — and writes both an interactive HTML report and a machine-readable `notrace.json` run record to your active task workspace at session end.
|
|
4
4
|
|
|
5
5
|
> **Security warning:** notrace is local-first and now redacts common secrets by default, escapes report rendering, blocks network access in generated reports, and writes private report files. Reports can still contain sensitive prompts, tool payloads, outputs, and local paths. Do not publish generated reports.
|
|
6
6
|
|
|
7
|
+
## Boundary with RPIV
|
|
8
|
+
|
|
9
|
+
The relationship is intentionally optional both ways:
|
|
10
|
+
|
|
11
|
+
- **notrace without RPIV**: should work; notrace-owned artifacts belong under `.notrace/`
|
|
12
|
+
- **RPIV without notrace**: should work; `WORK.md` remains the source of truth without any notrace dependency
|
|
13
|
+
- **together**: RPIV `WORK.md [LOG]` may reference notrace artifacts, but `.workflow/` should not own them
|
|
14
|
+
|
|
15
|
+
Neither package should require the other to function.
|
|
16
|
+
|
|
7
17
|
## Features
|
|
8
18
|
|
|
9
19
|
- **Session timeline**: Every turn, tool call, and LLM completion rendered as an expandable card
|
|
10
20
|
- **Metrics dashboard**: Total tokens, input/output split, cache reads, cost (USD), duration
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
21
|
+
- **Machine-readable run record**: Normalized `notrace.json` sidecar for future retrospective/compare flows
|
|
22
|
+
- **Clickable `file://` links**: Artifact paths printed to console at session end for instant browser access
|
|
23
|
+
- **Workdir aware**: notrace-owned artifacts are planned to live under `.notrace/` for the root execution directory
|
|
24
|
+
- **RPIV attachment**: When a task has a `WORK.md`, notrace appends artifact/review references into `[LOG]`
|
|
13
25
|
- **HTML report**: Self-contained/offline report with a restrictive CSP and no remote font/network loads
|
|
14
|
-
- **Safer defaults**: Secret-key/value redaction, bounded payload sizes, metadata-only mode, private file permissions, and `.workflow`-confined
|
|
26
|
+
- **Safer defaults**: Secret-key/value redaction, bounded payload sizes, metadata-only mode, private file permissions, and `.workflow`-confined artifact writes
|
|
15
27
|
|
|
16
28
|
## Output
|
|
17
29
|
|
|
18
30
|
```
|
|
19
|
-
🔍 [notrace] Observability
|
|
20
|
-
📂 file:///path/to/.
|
|
31
|
+
🔍 [notrace] Observability artifacts generated:
|
|
32
|
+
📂 file:///path/to/.notrace/sessions/<session-id>/notrace.html
|
|
33
|
+
📂 file:///path/to/.notrace/sessions/<session-id>/notrace.json
|
|
21
34
|
```
|
|
22
35
|
|
|
23
36
|
## Usage
|
|
@@ -36,6 +49,46 @@ pi --dev
|
|
|
36
49
|
npm install -g @raquezha/notrace
|
|
37
50
|
```
|
|
38
51
|
|
|
52
|
+
## Add a human review
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
npm run review:notrace -- path/to/notrace.json \
|
|
56
|
+
--outcome partial \
|
|
57
|
+
--friction high \
|
|
58
|
+
--lesson "Headroom reduced tokens but needed manual steering." \
|
|
59
|
+
--next-change "Try same task with RepoScry enabled."
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
This writes an adjacent review sidecar. For normal runs that means `notrace.review.json` next to `notrace.json`.
|
|
63
|
+
|
|
64
|
+
If the run is attached to an RPIV task folder with `WORK.md`, the review is also logged into that task's `[LOG]` section as a reference to the notrace artifact.
|
|
65
|
+
|
|
66
|
+
Review fields:
|
|
67
|
+
|
|
68
|
+
- `outcome`: `success`, `partial`, `failed`, `abandoned`, `inconclusive`
|
|
69
|
+
- `friction`: `low`, `medium`, `high`
|
|
70
|
+
- `lesson`: short human conclusion
|
|
71
|
+
- `nextChange`: what to try next run
|
|
72
|
+
|
|
73
|
+
## Compare two runs
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
npm run compare:notrace -- \
|
|
77
|
+
path/to/baseline/notrace.json \
|
|
78
|
+
path/to/candidate/notrace.json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
This prints a small retrospective diff for:
|
|
82
|
+
|
|
83
|
+
- total/input/output tokens
|
|
84
|
+
- duration
|
|
85
|
+
- LLM calls
|
|
86
|
+
- tool calls
|
|
87
|
+
- tool errors
|
|
88
|
+
- total cost
|
|
89
|
+
- model/provider mix
|
|
90
|
+
- review sidecar outcome/friction/lesson when present
|
|
91
|
+
|
|
39
92
|
## Capture controls
|
|
40
93
|
|
|
41
94
|
By default, notrace uses `NOTRACE_CAPTURE=redacted`: it captures useful payloads but redacts common secret keys/values and truncates very large values.
|