@vforsh/argus-watcher 0.1.15 → 0.2.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.
Files changed (44) hide show
  1. package/README.md +11 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/buffer/LogBuffer.d.ts +30 -1
  4. package/dist/buffer/LogBuffer.d.ts.map +1 -1
  5. package/dist/buffer/LogBuffer.js +135 -2
  6. package/dist/buffer/LogBuffer.js.map +1 -1
  7. package/dist/cdp/eval.d.ts +3 -0
  8. package/dist/cdp/eval.d.ts.map +1 -1
  9. package/dist/cdp/eval.js +14 -1
  10. package/dist/cdp/eval.js.map +1 -1
  11. package/dist/cdp/scenarioBridge.d.ts +16 -0
  12. package/dist/cdp/scenarioBridge.d.ts.map +1 -0
  13. package/dist/cdp/scenarioBridge.js +291 -0
  14. package/dist/cdp/scenarioBridge.js.map +1 -0
  15. package/dist/events.d.ts +4 -1
  16. package/dist/events.d.ts.map +1 -1
  17. package/dist/http/routes/getLogCursor.d.ts +2 -0
  18. package/dist/http/routes/getLogCursor.d.ts.map +1 -0
  19. package/dist/http/routes/getLogCursor.js +7 -0
  20. package/dist/http/routes/getLogCursor.js.map +1 -0
  21. package/dist/http/routes/getLogEpoch.d.ts +2 -0
  22. package/dist/http/routes/getLogEpoch.d.ts.map +1 -0
  23. package/dist/http/routes/getLogEpoch.js +7 -0
  24. package/dist/http/routes/getLogEpoch.js.map +1 -0
  25. package/dist/http/routes/getLogs.d.ts.map +1 -1
  26. package/dist/http/routes/getLogs.js +26 -5
  27. package/dist/http/routes/getLogs.js.map +1 -1
  28. package/dist/http/routes/getTail.d.ts.map +1 -1
  29. package/dist/http/routes/getTail.js +26 -5
  30. package/dist/http/routes/getTail.js.map +1 -1
  31. package/dist/http/routes/index.d.ts.map +1 -1
  32. package/dist/http/routes/index.js +4 -0
  33. package/dist/http/routes/index.js.map +1 -1
  34. package/dist/http/routes/logEpochQuery.d.ts +20 -0
  35. package/dist/http/routes/logEpochQuery.d.ts.map +1 -0
  36. package/dist/http/routes/logEpochQuery.js +57 -0
  37. package/dist/http/routes/logEpochQuery.js.map +1 -0
  38. package/dist/http/routes/postEval.d.ts.map +1 -1
  39. package/dist/http/routes/postEval.js +5 -0
  40. package/dist/http/routes/postEval.js.map +1 -1
  41. package/dist/http/server.d.ts +2 -1
  42. package/dist/http/server.d.ts.map +1 -1
  43. package/dist/http/server.js.map +1 -1
  44. 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`):