Creator App Tests / PR Spam Gate (push) Skipped
Frontend Tests / PR Spam Gate (push) Skipped
NPM Format (website & console) / PR Spam Gate (push) Skipped
Pre-commit Checks / PR Spam Gate (push) Skipped
QwenPaw Creator Plugin Release / check-version (push) Canceled after 0s
QwenPaw Creator Plugin Release / upload-oss (push) Canceled after 0s
Tests / PR Spam Gate (push) Skipped
CodeQL / CodeQL (python) (push) Canceled after 0s
CodeQL / CodeQL (typescript) (push) Canceled after 0s
Creator App Tests / Creator Backend Tests (push) Canceled after 0s
Creator App Tests / Creator UI Build & Tests (push) Canceled after 0s
E2E Smoke Tests / Playwright UI Smoke (push) Canceled after 0s
Frontend Tests / Detect console changes (push) Canceled after 0s
NPM Format (website & console) / website format check (push) Canceled after 0s
NPM Format (website & console) / console format check (push) Canceled after 0s
Pre-commit Checks / Pre-commit (push) Canceled after 0s
QwenPaw Data Plugin Release / check-version (push) Canceled after 0s
Tests / Detect code changes (push) Canceled after 0s
Frontend Tests / Vitest Unit Tests (push) Canceled after 0s
Frontend Tests / Frontend Summary (push) Canceled after 0s
QwenPaw Data Plugin Release / upload-oss (push) Canceled after 0s
Tests / Maintainer Approval (push) Canceled after 0s
Tests / Unit Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - fallback (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p2 (push) Canceled after 0s
Tests / Coverage Report (push) Canceled after 0s
Tests / Test Summary (push) Canceled after 0s
59 lines
1.8 KiB
Python
59 lines
1.8 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""Plugin-local mirror of the core Chrome wire protocol; never import core."""
|
|
|
|
PROTOCOL_VERSION = 2
|
|
MIN_COMPATIBLE_PROTOCOL_VERSION = 2
|
|
# Chrome Native Messaging hard limits. Protocol facts, not tunables.
|
|
NM_MAX_INBOUND_BYTES = 64 * 1024 * 1024
|
|
NM_MAX_OUTBOUND_BYTES = 1024 * 1024
|
|
# Application-reserved WebSocket close codes for the Native Messaging bridge.
|
|
NM_CLOSE_STDIN_EOF = 4000
|
|
NM_CLOSE_FRAME_PROTOCOL = 4001
|
|
NM_CLOSE_INBOUND_TOO_LARGE = 4002
|
|
NM_CLOSE_INTERNAL_ERROR = 4003
|
|
EXTENSION_COMMANDS = frozenset(
|
|
{
|
|
"cdp.send",
|
|
"command.execute",
|
|
"command.status",
|
|
"tabs.list",
|
|
"tab.attach",
|
|
"tab.detach",
|
|
"tab.ensure",
|
|
"tab.activate",
|
|
"tab.close",
|
|
"tab.create",
|
|
"tab.metadata.commit",
|
|
"banner.show",
|
|
"banner.hide",
|
|
"file.upload",
|
|
"download.read",
|
|
"dialog.set",
|
|
"extension.open_extensions_manager",
|
|
"status.get",
|
|
"bridge.connect",
|
|
"extension.reload",
|
|
},
|
|
)
|
|
EVENT_TYPES = frozenset({"load", "dialog"})
|
|
|
|
|
|
def contract_snapshot() -> dict[str, object]:
|
|
"""Values this plugin build claims to implement, for core comparison."""
|
|
return {
|
|
"protocolVersion": PROTOCOL_VERSION,
|
|
"minCompatibleProtocolVersion": MIN_COMPATIBLE_PROTOCOL_VERSION,
|
|
"nmMaxInboundBytes": NM_MAX_INBOUND_BYTES,
|
|
"nmMaxOutboundBytes": NM_MAX_OUTBOUND_BYTES,
|
|
}
|
|
|
|
|
|
def close_code_catalog() -> dict[int, str]:
|
|
"""Close-code meanings shared with the core browser bridge."""
|
|
return {
|
|
NM_CLOSE_STDIN_EOF: "stdin_eof",
|
|
NM_CLOSE_FRAME_PROTOCOL: "frame_protocol_error",
|
|
NM_CLOSE_INBOUND_TOO_LARGE: "inbound_frame_too_large",
|
|
NM_CLOSE_INTERNAL_ERROR: "host_internal_error",
|
|
}
|