@vforsh/argus-watcher 0.1.16 → 0.3.0
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 +11 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/buffer/LogBuffer.d.ts +30 -3
- package/dist/buffer/LogBuffer.d.ts.map +1 -1
- package/dist/buffer/LogBuffer.js +133 -4
- package/dist/buffer/LogBuffer.js.map +1 -1
- package/dist/cdp/eval.d.ts +2 -0
- package/dist/cdp/eval.d.ts.map +1 -1
- package/dist/cdp/eval.js +39 -0
- package/dist/cdp/eval.js.map +1 -1
- package/dist/cdp/scenarioBridge.js +3 -9
- package/dist/cdp/scenarioBridge.js.map +1 -1
- package/dist/events.d.ts +4 -1
- package/dist/events.d.ts.map +1 -1
- package/dist/http/routes/getLogEpoch.d.ts +2 -0
- package/dist/http/routes/getLogEpoch.d.ts.map +1 -0
- package/dist/http/routes/getLogEpoch.js +7 -0
- package/dist/http/routes/getLogEpoch.js.map +1 -0
- package/dist/http/routes/getLogs.d.ts.map +1 -1
- package/dist/http/routes/getLogs.js +26 -5
- package/dist/http/routes/getLogs.js.map +1 -1
- package/dist/http/routes/getTail.d.ts.map +1 -1
- package/dist/http/routes/getTail.js +26 -5
- package/dist/http/routes/getTail.js.map +1 -1
- package/dist/http/routes/index.d.ts.map +1 -1
- package/dist/http/routes/index.js +2 -0
- package/dist/http/routes/index.js.map +1 -1
- package/dist/http/routes/logEpochQuery.d.ts +20 -0
- package/dist/http/routes/logEpochQuery.d.ts.map +1 -0
- package/dist/http/routes/logEpochQuery.js +57 -0
- package/dist/http/routes/logEpochQuery.js.map +1 -0
- package/dist/http/routes/postEval.d.ts.map +1 -1
- package/dist/http/routes/postEval.js +1 -0
- package/dist/http/routes/postEval.js.map +1 -1
- package/dist/http/server.d.ts +2 -1
- package/dist/http/server.d.ts.map +1 -1
- package/dist/http/server.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -62,6 +62,17 @@ await watcher.close()
|
|
|
62
62
|
- `ttlMs`: how long the page keeps the indicator without pings (default `6000`)
|
|
63
63
|
- Works in both direct CDP mode and Chrome extension mode; it is removed on detach and also self-expires if heartbeats stop.
|
|
64
64
|
|
|
65
|
+
## Action-scoped log reads
|
|
66
|
+
|
|
67
|
+
The watcher exposes `GET /logs/cursor` and `GET /logs/epoch`, both returning an opaque cursor for the current watcher session. Pass it as `sinceEpoch` (or `after`) to `GET /logs` or `GET /tail`:
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
GET /logs/epoch
|
|
71
|
+
GET /logs?sinceEpoch=<cursor>&levels=error,exception
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The cursor is monotonic within one live watcher and remains valid across page reloads, so duplicate messages remain distinct. A restarted watcher, foreign cursor, future cursor, or cursor whose unread range was evicted returns a deterministic `log_epoch_*` error; start a new epoch instead of subtracting message content.
|
|
75
|
+
|
|
65
76
|
## Directory layout
|
|
66
77
|
|
|
67
78
|
All artifacts are stored under `artifacts.base` (default: `<cwd>/argus-artifacts`):
|