lustro-cli 0.1.0__py3-none-any.whl

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 (60) hide show
  1. lustro_cli/__init__.py +29 -0
  2. lustro_cli/cli.py +2460 -0
  3. lustro_cli/client.py +434 -0
  4. lustro_cli/discovery.py +1033 -0
  5. lustro_cli/exitcodes.py +25 -0
  6. lustro_cli/mcp.py +867 -0
  7. lustro_cli/wire/__init__.py +62 -0
  8. lustro_cli/wire/_schema.json +97 -0
  9. lustro_cli/wire/cursor-envelope.schema.json +28 -0
  10. lustro_cli/wire/error-envelope.schema.json +46 -0
  11. lustro_cli/wire/golden/cursor-delta.json +91 -0
  12. lustro_cli/wire/golden/cursor-reset.json +65 -0
  13. lustro_cli/wire/golden/cursor-unchanged.json +15 -0
  14. lustro_cli/wire/golden/error-envelope.json +7 -0
  15. lustro_cli/wire/golden/export-har-websocket.json +148 -0
  16. lustro_cli/wire/golden/export-har.json +359 -0
  17. lustro_cli/wire/golden/logs-delta.json +44 -0
  18. lustro_cli/wire/golden/logs-reset.json +73 -0
  19. lustro_cli/wire/golden/logs-unchanged.json +9 -0
  20. lustro_cli/wire/golden/meta.json +12 -0
  21. lustro_cli/wire/golden/prefs-delta.json +58 -0
  22. lustro_cli/wire/golden/prefs-files.json +64 -0
  23. lustro_cli/wire/golden/prefs-reset.json +58 -0
  24. lustro_cli/wire/golden/prefs-unchanged.json +4 -0
  25. lustro_cli/wire/golden/rules-list.json +44 -0
  26. lustro_cli/wire/golden/screen-tree-views.json +596 -0
  27. lustro_cli/wire/golden/screen-tree.json +689 -0
  28. lustro_cli/wire/golden/send-result.json +7 -0
  29. lustro_cli/wire/golden/senders-list.json +6 -0
  30. lustro_cli/wire/golden/sqlite-databases.json +37 -0
  31. lustro_cli/wire/golden/sqlite-exec.json +4 -0
  32. lustro_cli/wire/golden/sqlite-query.json +109 -0
  33. lustro_cli/wire/golden/sqlite-rows.json +109 -0
  34. lustro_cli/wire/golden/sqlite-schema.json +98 -0
  35. lustro_cli/wire/golden/sqlite-tables.json +57 -0
  36. lustro_cli/wire/golden/stream-delta.json +48 -0
  37. lustro_cli/wire/golden/stream-reset.json +66 -0
  38. lustro_cli/wire/golden/stream-unchanged.json +4 -0
  39. lustro_cli/wire/golden/transaction-image.json +43 -0
  40. lustro_cli/wire/golden/transaction.json +41 -0
  41. lustro_cli/wire/golden/websocket.json +37 -0
  42. lustro_cli/wire/golden/websockets-reset.json +89 -0
  43. lustro_cli/wire/golden/work-events.json +152 -0
  44. lustro_cli/wire/golden/work-item.json +118 -0
  45. lustro_cli/wire/golden/work-items.json +129 -0
  46. lustro_cli/wire/golden/work-metrics.json +40 -0
  47. lustro_cli/wire/logs.openapi.json +622 -0
  48. lustro_cli/wire/meta.schema.json +47 -0
  49. lustro_cli/wire/network.openapi.json +2458 -0
  50. lustro_cli/wire/pagination.schema.json +20 -0
  51. lustro_cli/wire/prefs.openapi.json +699 -0
  52. lustro_cli/wire/screen.openapi.json +512 -0
  53. lustro_cli/wire/sqlite.openapi.json +1233 -0
  54. lustro_cli/wire/stream-envelope.schema.json +33 -0
  55. lustro_cli/wire/sync.py +80 -0
  56. lustro_cli/wire/work.openapi.json +1188 -0
  57. lustro_cli-0.1.0.dist-info/METADATA +585 -0
  58. lustro_cli-0.1.0.dist-info/RECORD +60 -0
  59. lustro_cli-0.1.0.dist-info/WHEEL +4 -0
  60. lustro_cli-0.1.0.dist-info/entry_points.txt +3 -0
@@ -0,0 +1,62 @@
1
+ """Bundled wire-protocol artifacts.
2
+
3
+ These JSON files are vendored copies of the SemVer-governed wire protocol:
4
+
5
+ - the shared JSON Schemas from ``wire-protocol/v1/*.schema.json``,
6
+ - the authoritative OpenAPI documents of the Network tab
7
+ (``lustro/openapi/network.openapi.json``, generated from its route declarations), the Logs tab
8
+ (``lustro-logs/openapi/logs.openapi.json``, generated from its route declarations), the
9
+ Preferences tab (``lustro-prefs/openapi/prefs.openapi.json``, generated from its route
10
+ declarations), the
11
+ SQLite tab (``lustro-sqlite/openapi/sqlite.openapi.json``, generated from its route
12
+ declarations), the
13
+ WorkManager tab (``lustro-work/openapi/work.openapi.json``, generated from its route
14
+ declarations), and the
15
+ Screen tab (``lustro-screen/openapi/screen.openapi.json``, generated from its route
16
+ declarations), and
17
+ - the golden response fixtures from ``wire-protocol/v1/golden/``.
18
+
19
+ They are packaged into the wheel so the installed CLI ships its own schemas and
20
+ contract corpus without a source checkout. Regenerate them with
21
+ ``python -m lustro_cli.wire.sync`` after the upstream protocol changes.
22
+ """
23
+
24
+ from __future__ import annotations
25
+
26
+ import json
27
+ from typing import Any
28
+
29
+ try: # Python 3.9+: importlib.resources.files
30
+ from importlib.resources import files as _files
31
+ except ImportError: # pragma: no cover - <3.9 not supported
32
+ _files = None # type: ignore[assignment]
33
+
34
+ __all__ = ["load_schema", "load_openapi", "load_golden", "read_text"]
35
+
36
+
37
+ def read_text(name: str) -> str:
38
+ """Read a bundled artifact (e.g. ``"meta.schema.json"`` or
39
+ ``"golden/cursor-reset.json"``) as text."""
40
+ resource = _files("lustro_cli.wire")
41
+ for part in name.split("/"):
42
+ resource = resource.joinpath(part)
43
+ return resource.read_text(encoding="utf-8")
44
+
45
+
46
+ def _load(name: str) -> Any:
47
+ return json.loads(read_text(name))
48
+
49
+
50
+ def load_schema(name: str) -> Any:
51
+ """Load a shared JSON Schema by file name (e.g. ``"meta.schema.json"``)."""
52
+ return _load(name)
53
+
54
+
55
+ def load_openapi(tab: str = "network") -> Any:
56
+ """Load the bundled OpenAPI document of a tab: ``"network"`` (the default), ``"logs"``, ``"prefs"``, ``"sqlite"``, ``"work"``, or ``"screen"``."""
57
+ return _load(tab + ".openapi.json")
58
+
59
+
60
+ def load_golden(name: str) -> Any:
61
+ """Load a golden fixture by file name (e.g. ``"cursor-reset.json"``)."""
62
+ return _load("golden/" + name)
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://twinsen81.github.io/Lustro/wire-protocol/v1/_schema.json",
4
+ "title": "Lustro shared wire envelopes (v1)",
5
+ "description": "Self-contained bundle of the shared envelope shapes reused by every /api/v1 route. Served at GET /api/v1/_schema. Authoritative copies live in the wire-protocol/v1 repository directory; the definitions are inlined here so the served document resolves without external $ref fetches.",
6
+ "$defs": {
7
+ "errorEnvelope": {
8
+ "$anchor": "errorEnvelope",
9
+ "title": "Error envelope",
10
+ "description": "Uniform error body returned by every /api/v1/* route on failure.",
11
+ "type": "object",
12
+ "required": ["error", "message"],
13
+ "properties": {
14
+ "error": { "type": "string", "enum": ["bad_request", "unauthorized", "forbidden", "not_found", "method_not_allowed", "conflict", "payload_too_large", "unprocessable_entity", "too_many_requests", "internal_error", "unavailable", "timeout", "error"], "description": "Short, stable, machine-readable error identifier." },
15
+ "message": { "type": "string", "description": "Human-readable explanation of what went wrong." },
16
+ "code": { "type": "string", "description": "Optional finer-grained error code." },
17
+ "field": { "type": "string", "description": "Optional name of the offending request field." },
18
+ "hint": { "type": "string", "description": "Optional actionable suggestion." }
19
+ },
20
+ "additionalProperties": false
21
+ },
22
+ "cursorEnvelope": {
23
+ "$anchor": "cursorEnvelope",
24
+ "title": "Cursor envelope",
25
+ "description": "Live-polling envelope. Cursor is opaque; echo it back on the next poll; treat unknown status values as \"reset\". This generic envelope permits additional properties so observable endpoints may extend it (e.g. the Network tab adds a top-level \"state\" object); a tab schema may pin those extensions.",
26
+ "type": "object",
27
+ "required": ["cursor", "status"],
28
+ "properties": {
29
+ "cursor": { "type": "string", "description": "Opaque cursor token; advances when the endpoint's list changes." },
30
+ "status": {
31
+ "type": "string",
32
+ "enum": ["delta", "unchanged", "reset"],
33
+ "description": "delta = items are the authoritative current list (omit => unchanged); unchanged = no change; reset = replace the whole list with items."
34
+ },
35
+ "items": { "type": "array", "description": "Present for reset (and delta when changed).", "items": {} },
36
+ "state": { "type": "object", "description": "Optional endpoint-specific observable state (e.g. Network's paused/overwriteMode/throttleDelayMs). Tab schemas pin the exact shape." }
37
+ }
38
+ },
39
+ "streamEnvelope": {
40
+ "$anchor": "streamEnvelope",
41
+ "title": "Stream envelope",
42
+ "description": "Live-polling envelope for a list that only grows at its end, such as a log. A poll gets only the entries after its cursor. Cursor is opaque; echo it back on the next poll; treat unknown status values as \"reset\". This generic envelope permits additional properties; a tab schema may pin them.",
43
+ "type": "object",
44
+ "required": ["cursor", "status"],
45
+ "properties": {
46
+ "cursor": { "type": "string", "description": "Opaque cursor token; moves forward with the entries the client received." },
47
+ "status": {
48
+ "type": "string",
49
+ "enum": ["delta", "unchanged", "reset"],
50
+ "description": "delta = items are the entries after the cursor: append them; unchanged = no new entry; reset = replace everything with items, the last entries of the list."
51
+ },
52
+ "items": { "type": "array", "description": "Present for reset and delta, oldest first. A delta can arrive in pages: poll again until unchanged.", "items": {} },
53
+ "dropped": { "type": "integer", "minimum": 0, "description": "Present for delta: entries the list evicted before this client received them." },
54
+ "state": { "type": "object", "description": "Optional endpoint-specific observable state. Tab schemas pin the exact shape." }
55
+ }
56
+ },
57
+ "pagination": {
58
+ "$anchor": "pagination",
59
+ "title": "List pagination envelope",
60
+ "description": "Standard list-response shape for collection endpoints.",
61
+ "type": "object",
62
+ "required": ["items", "nextCursor"],
63
+ "properties": {
64
+ "items": { "type": "array", "description": "The page of results.", "items": {} },
65
+ "nextCursor": { "type": ["string", "null"], "description": "Opaque next-page cursor, or null when exhausted." }
66
+ },
67
+ "additionalProperties": false
68
+ },
69
+ "meta": {
70
+ "$anchor": "meta",
71
+ "title": "Framework metadata",
72
+ "description": "Response of GET /api/v1/_meta.",
73
+ "type": "object",
74
+ "required": ["libraryVersion", "protocolVersion", "tabs"],
75
+ "properties": {
76
+ "libraryVersion": { "type": "string", "description": "Lustro library version." },
77
+ "protocolVersion": { "type": "string", "description": "Wire-protocol minor version (major lives in the path)." },
78
+ "tabs": {
79
+ "type": "array",
80
+ "description": "Registered tabs that expose a schema.",
81
+ "items": {
82
+ "type": "object",
83
+ "required": ["id", "title", "schemaUrl", "version"],
84
+ "properties": {
85
+ "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{0,30}$", "description": "Tab id." },
86
+ "title": { "type": "string", "description": "Human-readable tab title." },
87
+ "schemaUrl": { "type": "string", "description": "URL of the tab schema." },
88
+ "version": { "type": "string", "description": "The info.version of the tab's own schema; the protocolVersion for a schema without one." }
89
+ },
90
+ "additionalProperties": false
91
+ }
92
+ }
93
+ },
94
+ "additionalProperties": false
95
+ }
96
+ }
97
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://twinsen81.github.io/Lustro/wire-protocol/v1/cursor-envelope.schema.json",
4
+ "title": "Cursor envelope",
5
+ "description": "Live-polling envelope for observable endpoints. The cursor is opaque; clients echo the last cursor on the next poll and treat any unknown status value as \"reset\". This generic envelope intentionally permits additional properties so observable endpoints may extend it with endpoint-specific data (e.g. the Network tab adds a top-level \"state\" object); a tab schema may pin those extensions.",
6
+ "type": "object",
7
+ "required": ["cursor", "status"],
8
+ "properties": {
9
+ "cursor": {
10
+ "type": "string",
11
+ "description": "Opaque cursor token. Echo it back on the next poll. It advances when the endpoint's list changes; a cursor from before an app restart gets a reset."
12
+ },
13
+ "status": {
14
+ "type": "string",
15
+ "enum": ["delta", "unchanged", "reset"],
16
+ "description": "delta = items carry the authoritative current list (omit items => unchanged); unchanged = no change, items omitted; reset = replace the whole list with items."
17
+ },
18
+ "items": {
19
+ "type": "array",
20
+ "description": "Present for reset (and delta when the list changed). Element shape is endpoint-specific.",
21
+ "items": {}
22
+ },
23
+ "state": {
24
+ "type": "object",
25
+ "description": "Optional endpoint-specific observable state (e.g. the Network tab's paused/overwriteMode/throttleDelayMs). Tab schemas pin the exact shape."
26
+ }
27
+ }
28
+ }
@@ -0,0 +1,46 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://twinsen81.github.io/Lustro/wire-protocol/v1/error-envelope.schema.json",
4
+ "title": "Error envelope",
5
+ "description": "Uniform error body returned by every /api/v1/* route on failure.",
6
+ "type": "object",
7
+ "required": ["error", "message"],
8
+ "properties": {
9
+ "error": {
10
+ "type": "string",
11
+ "enum": [
12
+ "bad_request",
13
+ "unauthorized",
14
+ "forbidden",
15
+ "not_found",
16
+ "method_not_allowed",
17
+ "conflict",
18
+ "payload_too_large",
19
+ "unprocessable_entity",
20
+ "too_many_requests",
21
+ "internal_error",
22
+ "unavailable",
23
+ "timeout",
24
+ "error"
25
+ ],
26
+ "description": "Short, stable, machine-readable error identifier (e.g. \"not_found\")."
27
+ },
28
+ "message": {
29
+ "type": "string",
30
+ "description": "Human-readable explanation of what went wrong."
31
+ },
32
+ "code": {
33
+ "type": "string",
34
+ "description": "Optional finer-grained error code for programmatic handling."
35
+ },
36
+ "field": {
37
+ "type": "string",
38
+ "description": "Optional name of the request field that caused the error."
39
+ },
40
+ "hint": {
41
+ "type": "string",
42
+ "description": "Optional actionable suggestion for resolving the error."
43
+ }
44
+ },
45
+ "additionalProperties": false
46
+ }
@@ -0,0 +1,91 @@
1
+ {
2
+ "cursor": "c:43",
3
+ "status": "delta",
4
+ "state": {
5
+ "paused": false,
6
+ "overwriteMode": false,
7
+ "throttleDelayMs": 250,
8
+ "mockRules": { "enabled": 1, "revision": 4 },
9
+ "captureFilter": null
10
+ },
11
+ "items": [
12
+ {
13
+ "id": "tx_9f3c1a8e",
14
+ "timestamp": "14:22:07.512",
15
+ "startedAt": 1790605327512,
16
+ "completedAt": 1790605327696,
17
+ "method": "GET",
18
+ "url": "https://api.example.com/v1/orders?status=open",
19
+ "finalUrl": null,
20
+ "protocol": "h2",
21
+ "statusCode": 200,
22
+ "durationMs": 184,
23
+ "throttledMs": null,
24
+ "categories": ["api"],
25
+ "isMocked": false,
26
+ "mockRuleId": null,
27
+ "activeMockRuleId": "orders-500",
28
+ "source": "okhttp",
29
+ "replacedCount": 0,
30
+ "requestContentType": null,
31
+ "responseContentType": "application/json; charset=utf-8",
32
+ "requestBodyBytes": 0,
33
+ "responseBodyBytes": 256,
34
+ "responseComplete": true,
35
+ "webSocketId": null,
36
+ "error": null
37
+ },
38
+ {
39
+ "id": "tx_4b1d77a0",
40
+ "timestamp": "14:22:09.003",
41
+ "startedAt": 1790605329003,
42
+ "completedAt": 1790605329325,
43
+ "method": "POST",
44
+ "url": "https://api.example.com/v1/orders",
45
+ "finalUrl": null,
46
+ "protocol": "h2",
47
+ "statusCode": 201,
48
+ "durationMs": 322,
49
+ "throttledMs": null,
50
+ "categories": ["api"],
51
+ "isMocked": false,
52
+ "mockRuleId": null,
53
+ "activeMockRuleId": null,
54
+ "source": "okhttp",
55
+ "replacedCount": 0,
56
+ "requestContentType": "application/json; charset=utf-8",
57
+ "responseContentType": "application/json; charset=utf-8",
58
+ "requestBodyBytes": 64,
59
+ "responseBodyBytes": 128,
60
+ "responseComplete": true,
61
+ "webSocketId": null,
62
+ "error": null
63
+ },
64
+ {
65
+ "id": "tx_77e2c014",
66
+ "timestamp": "14:22:11.781",
67
+ "startedAt": 1790605331781,
68
+ "completedAt": 1790605332822,
69
+ "method": "GET",
70
+ "url": "https://api.example.com/v1/orders/77e2",
71
+ "finalUrl": null,
72
+ "protocol": null,
73
+ "statusCode": 500,
74
+ "durationMs": 41,
75
+ "throttledMs": 1000,
76
+ "categories": ["api"],
77
+ "isMocked": true,
78
+ "mockRuleId": "orders-500",
79
+ "activeMockRuleId": "orders-500",
80
+ "source": "okhttp",
81
+ "replacedCount": 0,
82
+ "requestContentType": null,
83
+ "responseContentType": "application/json",
84
+ "requestBodyBytes": 0,
85
+ "responseBodyBytes": 17,
86
+ "responseComplete": true,
87
+ "webSocketId": null,
88
+ "error": null
89
+ }
90
+ ]
91
+ }
@@ -0,0 +1,65 @@
1
+ {
2
+ "cursor": "c:42",
3
+ "status": "reset",
4
+ "state": {
5
+ "paused": false,
6
+ "overwriteMode": false,
7
+ "throttleDelayMs": 0,
8
+ "mockRules": { "enabled": 1, "revision": 4 },
9
+ "captureFilter": null
10
+ },
11
+ "items": [
12
+ {
13
+ "id": "tx_9f3c1a8e",
14
+ "timestamp": "14:22:07.512",
15
+ "startedAt": 1790605327512,
16
+ "completedAt": 1790605327696,
17
+ "method": "GET",
18
+ "url": "https://api.example.com/v1/orders?status=open",
19
+ "finalUrl": null,
20
+ "protocol": "h2",
21
+ "statusCode": 200,
22
+ "durationMs": 184,
23
+ "throttledMs": null,
24
+ "categories": ["api"],
25
+ "isMocked": false,
26
+ "mockRuleId": null,
27
+ "activeMockRuleId": "orders-500",
28
+ "source": "okhttp",
29
+ "replacedCount": 0,
30
+ "requestContentType": null,
31
+ "responseContentType": "application/json; charset=utf-8",
32
+ "requestBodyBytes": 0,
33
+ "responseBodyBytes": 256,
34
+ "responseComplete": true,
35
+ "webSocketId": null,
36
+ "error": null
37
+ },
38
+ {
39
+ "id": "tx_4b1d77a0",
40
+ "timestamp": "14:22:09.003",
41
+ "startedAt": 1790605329003,
42
+ "completedAt": 1790605329325,
43
+ "method": "POST",
44
+ "url": "https://api.example.com/v1/orders",
45
+ "finalUrl": null,
46
+ "protocol": "h2",
47
+ "statusCode": 201,
48
+ "durationMs": 322,
49
+ "throttledMs": null,
50
+ "categories": ["api"],
51
+ "isMocked": false,
52
+ "mockRuleId": null,
53
+ "activeMockRuleId": null,
54
+ "source": "okhttp",
55
+ "replacedCount": 0,
56
+ "requestContentType": "application/json; charset=utf-8",
57
+ "responseContentType": "application/json; charset=utf-8",
58
+ "requestBodyBytes": 64,
59
+ "responseBodyBytes": 128,
60
+ "responseComplete": true,
61
+ "webSocketId": null,
62
+ "error": null
63
+ }
64
+ ]
65
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "cursor": "c:43",
3
+ "status": "unchanged",
4
+ "state": {
5
+ "paused": false,
6
+ "overwriteMode": false,
7
+ "throttleDelayMs": 250,
8
+ "mockRules": { "enabled": 1, "revision": 4 },
9
+ "captureFilter": {
10
+ "description": "Analytics calls, and requests marked X-No-Capture",
11
+ "skipped": 12,
12
+ "failed": 0
13
+ }
14
+ }
15
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "error": "not_found",
3
+ "message": "No transaction with id tx_9f3c1a8e.",
4
+ "code": "transaction_not_found",
5
+ "field": "id",
6
+ "hint": "Poll GET /api/v1/network/transactions to list current transaction ids."
7
+ }
@@ -0,0 +1,148 @@
1
+ {
2
+ "log": {
3
+ "version": "1.2",
4
+ "creator": {
5
+ "name": "Lustro",
6
+ "version": "0.1.0"
7
+ },
8
+ "entries": [
9
+ {
10
+ "startedDateTime": "2026-09-28T14:22:17.100Z",
11
+ "time": 142,
12
+ "request": {
13
+ "method": "GET",
14
+ "url": "https://chat.example.com/socket?token=%5BREDACTED%5D",
15
+ "httpVersion": "http/1.1",
16
+ "cookies": [],
17
+ "headers": [
18
+ {
19
+ "name": "Upgrade",
20
+ "value": "websocket"
21
+ },
22
+ {
23
+ "name": "Connection",
24
+ "value": "Upgrade"
25
+ },
26
+ {
27
+ "name": "Sec-WebSocket-Key",
28
+ "value": "[REDACTED]"
29
+ },
30
+ {
31
+ "name": "Sec-WebSocket-Version",
32
+ "value": "13"
33
+ },
34
+ {
35
+ "name": "Sec-WebSocket-Extensions",
36
+ "value": "permessage-deflate"
37
+ }
38
+ ],
39
+ "queryString": [
40
+ {
41
+ "name": "token",
42
+ "value": "[REDACTED]"
43
+ }
44
+ ],
45
+ "headersSize": -1,
46
+ "bodySize": -1
47
+ },
48
+ "response": {
49
+ "status": 101,
50
+ "statusText": "",
51
+ "httpVersion": "http/1.1",
52
+ "cookies": [],
53
+ "headers": [
54
+ {
55
+ "name": "Upgrade",
56
+ "value": "websocket"
57
+ },
58
+ {
59
+ "name": "Connection",
60
+ "value": "Upgrade"
61
+ },
62
+ {
63
+ "name": "Sec-WebSocket-Accept",
64
+ "value": "s3pPLMBiTxaQ9kYGzzhZRbK+xOo="
65
+ }
66
+ ],
67
+ "content": {
68
+ "size": 0,
69
+ "mimeType": "x-unknown"
70
+ },
71
+ "redirectURL": "",
72
+ "headersSize": -1,
73
+ "bodySize": 0
74
+ },
75
+ "cache": {},
76
+ "timings": {
77
+ "blocked": -1,
78
+ "dns": -1,
79
+ "connect": -1,
80
+ "ssl": -1,
81
+ "send": 0,
82
+ "wait": 142,
83
+ "receive": 0
84
+ },
85
+ "_resourceType": "websocket",
86
+ "_webSocketMessages": [
87
+ {
88
+ "type": "send",
89
+ "time": 1790605337.250,
90
+ "opcode": 1,
91
+ "data": "{\"type\":\"auth\",\"token\":\"[REDACTED]\"}",
92
+ "_payloadBytes": 36
93
+ },
94
+ {
95
+ "type": "receive",
96
+ "time": 1790605337.391,
97
+ "opcode": 1,
98
+ "data": "{\"type\":\"ready\"}",
99
+ "_payloadBytes": 16
100
+ },
101
+ {
102
+ "type": "send",
103
+ "time": 1790605338.004,
104
+ "opcode": 2,
105
+ "data": "3q2+7w==",
106
+ "_payloadBytes": 4
107
+ },
108
+ {
109
+ "type": "receive",
110
+ "time": 1790605339.112,
111
+ "opcode": 1,
112
+ "data": "{\"type\":\"snapshot\",\"items\":[{\"id\":1,\"na",
113
+ "_payloadBytes": 300000,
114
+ "_truncated": true
115
+ }
116
+ ],
117
+ "_lustro": {
118
+ "id": "tx_a81c3f09",
119
+ "isMocked": false,
120
+ "source": "okhttp",
121
+ "categories": [
122
+ "chat"
123
+ ],
124
+ "requestBodyTruncated": false,
125
+ "responseBodyTruncated": false,
126
+ "responseComplete": true,
127
+ "finalUrl": null,
128
+ "priorResponses": [],
129
+ "error": null,
130
+ "webSocket": {
131
+ "id": "ws_3d2a7f10",
132
+ "url": "wss://chat.example.com/socket?token=%5BREDACTED%5D",
133
+ "state": "closed",
134
+ "closeCode": 1000,
135
+ "closeReason": "bye",
136
+ "closedBy": "app",
137
+ "canceled": false,
138
+ "error": null,
139
+ "sentCount": 2,
140
+ "receivedCount": 2,
141
+ "evictedEvents": 0,
142
+ "droppedEvents": 0
143
+ }
144
+ }
145
+ }
146
+ ]
147
+ }
148
+ }