@arvoretech/bug-jar 0.7.2 → 0.7.3
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/README.md +13 -19
- package/dist/index.global.js +1 -1
- package/dist/index.js +9 -9
- package/dist/index.mjs +8 -8
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ opens it in the real app, and the encrypted package is uploaded to S3. See
|
|
|
34
34
|
<script src="https://unpkg.com/@arvoretech/bug-jar"></script>
|
|
35
35
|
<script>
|
|
36
36
|
BugJar.init({
|
|
37
|
-
debugSessionEndpoint: 'https://
|
|
37
|
+
debugSessionEndpoint: 'https://your-backend.example.com/debug-sessions',
|
|
38
38
|
})
|
|
39
39
|
</script>
|
|
40
40
|
```
|
|
@@ -67,7 +67,7 @@ init({
|
|
|
67
67
|
onCapture: (report) => console.log(report),
|
|
68
68
|
|
|
69
69
|
// Debug session
|
|
70
|
-
debugSessionEndpoint: 'https://
|
|
70
|
+
debugSessionEndpoint: 'https://your-backend.example.com/debug-sessions',
|
|
71
71
|
// debugToken is read automatically from the ?debug=<token> query param
|
|
72
72
|
})
|
|
73
73
|
```
|
|
@@ -101,7 +101,7 @@ private S3 bucket via a presigned URL. No AWS credentials ever reach the browser
|
|
|
101
101
|
<script src="https://unpkg.com/@arvoretech/bug-jar"></script>
|
|
102
102
|
<script>
|
|
103
103
|
BugJar.init({
|
|
104
|
-
debugSessionEndpoint: 'https://
|
|
104
|
+
debugSessionEndpoint: 'https://your-backend.example.com/debug-sessions',
|
|
105
105
|
// debugToken is read automatically from the ?debug=<token> query param
|
|
106
106
|
})
|
|
107
107
|
</script>
|
|
@@ -112,26 +112,20 @@ Flow:
|
|
|
112
112
|
1. Staff (admin) calls `POST /debug-sessions` with the target app URL and gets back
|
|
113
113
|
a `debugLink` (`https://app.../?debug=<token>`), the server public key, and an expiry.
|
|
114
114
|
2. The user opens the link. Bug Jar detects `?debug=<token>`, persists the token in
|
|
115
|
-
a
|
|
116
|
-
shows an animated **session border** (no button, no banner).
|
|
117
|
-
3. The user just uses the app. The session survives navigation across apps
|
|
118
|
-
|
|
115
|
+
a cookie scoped to your apex domain, fetches the session, starts screen recording,
|
|
116
|
+
and shows an animated **session border** (no button, no banner).
|
|
117
|
+
3. The user just uses the app. The session survives navigation across apps that share
|
|
118
|
+
the cookie domain by re-hydrating the token from the cookie on each
|
|
119
119
|
page. Each page streams **encrypted chunks** to S3 in real time:
|
|
120
120
|
- **data** (network/console/errors/actions/storage) every 5s as JSONL
|
|
121
121
|
- **video** chunks straight from `MediaRecorder` as they are produced
|
|
122
122
|
Chunks are uploaded to `debug/<token>/<pageId>/<stream>/<seq>.bin` via per-chunk
|
|
123
123
|
presigned PUT URLs (`POST /debug-sessions/:token/chunk-url`). Page metadata goes
|
|
124
124
|
to `debug/<token>/<pageId>/meta.json` (`POST /debug-sessions/:token/meta`).
|
|
125
|
-
4. Staff reconstructs the session offline
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
node scripts/decrypt-session.cjs <token> ./out
|
|
130
|
-
```
|
|
131
|
-
This reads the X25519 private key from Secrets Manager (`bug-jar/keypair`),
|
|
132
|
-
downloads all chunks via `GET /debug-sessions/:token/download`, decrypts each
|
|
133
|
-
per-page stream, and writes `<pageId>/data.jsonl`, `<pageId>/video.webm`,
|
|
134
|
-
`<pageId>/meta.json`.
|
|
125
|
+
4. Staff reconstructs the session offline by downloading the encrypted chunks via
|
|
126
|
+
the admin endpoint (`GET /debug-sessions/:token/download`) and decrypting each
|
|
127
|
+
per-page stream with the X25519 private key, producing `<pageId>/data.jsonl`,
|
|
128
|
+
`<pageId>/video.webm`, and `<pageId>/meta.json`.
|
|
135
129
|
|
|
136
130
|
## Speed test
|
|
137
131
|
|
|
@@ -159,8 +153,8 @@ Chunks leave the browser already unreadable; only the holder of the X25519 priva
|
|
|
159
153
|
key can open them. `libsodium-wrappers` is loaded dynamically, so it only ships
|
|
160
154
|
when debug mode is actually used.
|
|
161
155
|
|
|
162
|
-
> Cross-app continuity works because all apps
|
|
163
|
-
>
|
|
156
|
+
> Cross-app continuity works because all apps share a cookie scoped to the same
|
|
157
|
+
> apex domain. Screen recording restarts per app (the browser does
|
|
164
158
|
> not allow `getDisplayMedia` to persist across full page loads / origins), so the
|
|
165
159
|
> video is reconstructed per page rather than as one continuous file.
|
|
166
160
|
|