@walkhi/code-relax 0.1.0-beta.1
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 +83 -0
- package/dist/bin/codex-remote.mjs +262 -0
- package/dist/bin/self-relay-demo.mjs +33 -0
- package/dist/bin/self-relay-server.mjs +50 -0
- package/dist/get-lan-networks.ps1 +40 -0
- package/dist/get-shared-service-url.ps1 +6 -0
- package/dist/shared/app-server-events.cjs +266 -0
- package/dist/shared/p2p-diagnostics.cjs +28 -0
- package/dist/shared/server-requests.cjs +67 -0
- package/dist/shared/timeline-sync.cjs +67 -0
- package/dist/skills/code-relax/SKILL.md +17 -0
- package/dist/src/app-server-client.mjs +468 -0
- package/dist/src/app-server-tasks.mjs +355 -0
- package/dist/src/background-process.mjs +18 -0
- package/dist/src/debug-ui.mjs +131 -0
- package/dist/src/desktop-launcher.mjs +51 -0
- package/dist/src/execution-health.mjs +26 -0
- package/dist/src/lan-socket-server.mjs +103 -0
- package/dist/src/managed-app-server.mjs +207 -0
- package/dist/src/message-images.mjs +27 -0
- package/dist/src/onboarding.mjs +31 -0
- package/dist/src/platform/README.md +12 -0
- package/dist/src/platform/linux/README.md +3 -0
- package/dist/src/platform/macos/README.md +3 -0
- package/dist/src/platform/windows/IsolatedProcess.cs +75 -0
- package/dist/src/platform/windows/background-process.mjs +25 -0
- package/dist/src/platform/windows/credential-store.mjs +27 -0
- package/dist/src/platform/windows/credential-store.ps1 +49 -0
- package/dist/src/platform/windows/desktop-host.mjs +38 -0
- package/dist/src/platform/windows/desktop-info.ps1 +16 -0
- package/dist/src/platform/windows/desktop-monitor.mjs +34 -0
- package/dist/src/platform/windows/desktop-shortcut-run.ps1 +5 -0
- package/dist/src/platform/windows/desktop-shortcuts.ps1 +28 -0
- package/dist/src/platform/windows/desktop-tools.mjs +48 -0
- package/dist/src/platform/windows/launch-worker.ps1 +13 -0
- package/dist/src/platform/windows/network-info.mjs +34 -0
- package/dist/src/platform/windows/resident-start.ps1 +7 -0
- package/dist/src/platform/windows/resident-startup.ps1 +27 -0
- package/dist/src/platform/windows/resolve-state-root.ps1 +14 -0
- package/dist/src/platform/windows/runtime-paths.mjs +20 -0
- package/dist/src/platform/windows/service-host.mjs +43 -0
- package/dist/src/platform/windows/start-hidden-console.ps1 +39 -0
- package/dist/src/platform/windows/stop-desktop.ps1 +19 -0
- package/dist/src/platform/windows/user-environment.mjs +50 -0
- package/dist/src/platform/windows/user-environment.ps1 +41 -0
- package/dist/src/self-relay/client.mjs +59 -0
- package/dist/src/self-relay/connector.mjs +147 -0
- package/dist/src/self-relay/debug-allowlist.mjs +33 -0
- package/dist/src/self-relay/demo.mjs +38 -0
- package/dist/src/self-relay/device-store.mjs +84 -0
- package/dist/src/self-relay/lan-authorizations.mjs +29 -0
- package/dist/src/self-relay/lifecycle.mjs +281 -0
- package/dist/src/self-relay/p2p-probe.mjs +83 -0
- package/dist/src/self-relay/server.mjs +340 -0
- package/dist/src/self-relay/windows-route-helper.mjs +75 -0
- package/dist/src/self-relay/wire.mjs +36 -0
- package/dist/src/server.mjs +2086 -0
- package/dist/src/service-control.mjs +72 -0
- package/dist/src/service-doctor.mjs +63 -0
- package/dist/src/service-health.mjs +33 -0
- package/dist/src/service-install.mjs +91 -0
- package/dist/src/service-lifecycle.mjs +130 -0
- package/dist/src/service-restart.mjs +48 -0
- package/dist/src/shared-app-server.mjs +356 -0
- package/dist/src/shared-catalog.mjs +60 -0
- package/dist/src/shared-recovery.mjs +142 -0
- package/dist/src/shared-thread-stream.mjs +80 -0
- package/dist/src/skill-install.mjs +64 -0
- package/dist/src/thread-catalog.mjs +42 -0
- package/dist/src/thread-title-generation.mjs +150 -0
- package/dist/tools/find-desktop-pipe.mjs +10 -0
- package/dist/tools/rtc-route-helper.ps1 +99 -0
- package/dist/tools/start-rtc-route-helper.ps1 +15 -0
- package/dist/web/approval-ui.js +188 -0
- package/dist/web/capabilities.js +57 -0
- package/dist/web/chat-transport.js +196 -0
- package/dist/web/chat.css +736 -0
- package/dist/web/chat.js +5149 -0
- package/dist/web/client-platform.js +11 -0
- package/dist/web/harmony-platform.js +51 -0
- package/dist/web/highlight-powershell.min.js +39 -0
- package/dist/web/highlight.min.js +1262 -0
- package/dist/web/history-cache.js +146 -0
- package/dist/web/index.html +222 -0
- package/dist/web/lan-session.js +122 -0
- package/dist/web/p2p-diagnostics.js +28 -0
- package/dist/web/p2p-probe.js +83 -0
- package/dist/web/resources.json +1 -0
- package/dist/web/self-relay-session.js +119 -0
- package/dist/web/server-requests.js +67 -0
- package/dist/web/timeline-sync.js +67 -0
- package/dist/web/vendor/README.md +14 -0
- package/dist/web/vendor/highlight-powershell.min.js +39 -0
- package/dist/web/vendor/highlight.LICENSE.txt +29 -0
- package/dist/web/vendor/highlight.min.js +1262 -0
- package/dist/web/vendor/markdown-it.LICENSE.txt +22 -0
- package/dist/web/vendor/markdown-it.umd.min.js +14 -0
- package/node_modules/@img/colour/LICENSE.md +82 -0
- package/node_modules/@img/colour/README.md +15 -0
- package/node_modules/@img/colour/color.cjs +1596 -0
- package/node_modules/@img/colour/index.cjs +1 -0
- package/node_modules/@img/colour/index.d.ts +929 -0
- package/node_modules/@img/colour/package.json +58 -0
- package/node_modules/@img/sharp-win32-x64/LICENSE +191 -0
- package/node_modules/@img/sharp-win32-x64/README.md +59 -0
- package/node_modules/@img/sharp-win32-x64/index.cjs +1 -0
- package/node_modules/@img/sharp-win32-x64/lib/libvips-42.dll +0 -0
- package/node_modules/@img/sharp-win32-x64/lib/libvips-cpp-8.18.6.dll +0 -0
- package/node_modules/@img/sharp-win32-x64/lib/sharp-win32-x64-0.35.4.node +0 -0
- package/node_modules/@img/sharp-win32-x64/package.json +40 -0
- package/node_modules/@img/sharp-win32-x64/versions.json +30 -0
- package/node_modules/@node-datachannel/win32-x64-msvc/node_datachannel.node +0 -0
- package/node_modules/@node-datachannel/win32-x64-msvc/package.json +20 -0
- package/node_modules/ansi-regex/index.d.ts +37 -0
- package/node_modules/ansi-regex/index.js +10 -0
- package/node_modules/ansi-regex/license +9 -0
- package/node_modules/ansi-regex/package.json +55 -0
- package/node_modules/ansi-regex/readme.md +78 -0
- package/node_modules/ansi-styles/index.d.ts +345 -0
- package/node_modules/ansi-styles/index.js +163 -0
- package/node_modules/ansi-styles/license +9 -0
- package/node_modules/ansi-styles/package.json +56 -0
- package/node_modules/ansi-styles/readme.md +152 -0
- package/node_modules/camelcase/index.d.ts +63 -0
- package/node_modules/camelcase/index.js +76 -0
- package/node_modules/camelcase/license +9 -0
- package/node_modules/camelcase/package.json +43 -0
- package/node_modules/camelcase/readme.md +99 -0
- package/node_modules/cliui/CHANGELOG.md +76 -0
- package/node_modules/cliui/LICENSE.txt +14 -0
- package/node_modules/cliui/README.md +115 -0
- package/node_modules/cliui/index.js +354 -0
- package/node_modules/cliui/package.json +65 -0
- package/node_modules/color-convert/CHANGELOG.md +54 -0
- package/node_modules/color-convert/LICENSE +21 -0
- package/node_modules/color-convert/README.md +68 -0
- package/node_modules/color-convert/conversions.js +839 -0
- package/node_modules/color-convert/index.js +81 -0
- package/node_modules/color-convert/package.json +48 -0
- package/node_modules/color-convert/route.js +97 -0
- package/node_modules/color-name/LICENSE +8 -0
- package/node_modules/color-name/README.md +11 -0
- package/node_modules/color-name/index.js +152 -0
- package/node_modules/color-name/package.json +28 -0
- package/node_modules/decamelize/index.js +13 -0
- package/node_modules/decamelize/license +21 -0
- package/node_modules/decamelize/package.json +38 -0
- package/node_modules/decamelize/readme.md +48 -0
- package/node_modules/detect-libc/LICENSE +201 -0
- package/node_modules/detect-libc/README.md +163 -0
- package/node_modules/detect-libc/index.d.ts +14 -0
- package/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/node_modules/detect-libc/lib/elf.js +39 -0
- package/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/node_modules/detect-libc/lib/process.js +24 -0
- package/node_modules/detect-libc/package.json +44 -0
- package/node_modules/dijkstrajs/.travis.yml +4 -0
- package/node_modules/dijkstrajs/CONTRIBUTING.md +8 -0
- package/node_modules/dijkstrajs/LICENSE.md +19 -0
- package/node_modules/dijkstrajs/README.md +18 -0
- package/node_modules/dijkstrajs/dijkstra.js +165 -0
- package/node_modules/dijkstrajs/package.json +60 -0
- package/node_modules/dijkstrajs/test/dijkstra.test.js +96 -0
- package/node_modules/emoji-regex/LICENSE-MIT.txt +20 -0
- package/node_modules/emoji-regex/README.md +73 -0
- package/node_modules/emoji-regex/es2015/index.js +6 -0
- package/node_modules/emoji-regex/es2015/text.js +6 -0
- package/node_modules/emoji-regex/index.d.ts +23 -0
- package/node_modules/emoji-regex/index.js +6 -0
- package/node_modules/emoji-regex/package.json +50 -0
- package/node_modules/emoji-regex/text.js +6 -0
- package/node_modules/find-up/index.d.ts +137 -0
- package/node_modules/find-up/index.js +89 -0
- package/node_modules/find-up/license +9 -0
- package/node_modules/find-up/package.json +53 -0
- package/node_modules/find-up/readme.md +156 -0
- package/node_modules/get-caller-file/LICENSE.md +6 -0
- package/node_modules/get-caller-file/README.md +41 -0
- package/node_modules/get-caller-file/index.d.ts +2 -0
- package/node_modules/get-caller-file/index.js +22 -0
- package/node_modules/get-caller-file/index.js.map +1 -0
- package/node_modules/get-caller-file/package.json +42 -0
- package/node_modules/is-fullwidth-code-point/index.d.ts +17 -0
- package/node_modules/is-fullwidth-code-point/index.js +50 -0
- package/node_modules/is-fullwidth-code-point/license +9 -0
- package/node_modules/is-fullwidth-code-point/package.json +42 -0
- package/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/node_modules/locate-path/index.d.ts +83 -0
- package/node_modules/locate-path/index.js +65 -0
- package/node_modules/locate-path/license +9 -0
- package/node_modules/locate-path/package.json +45 -0
- package/node_modules/locate-path/readme.md +122 -0
- package/node_modules/node-datachannel/.clang-format +17 -0
- package/node_modules/node-datachannel/.editorconfig +12 -0
- package/node_modules/node-datachannel/.eslintignore +8 -0
- package/node_modules/node-datachannel/.eslintrc.json +27 -0
- package/node_modules/node-datachannel/.gitmodules +3 -0
- package/node_modules/node-datachannel/.prettierignore +7 -0
- package/node_modules/node-datachannel/.prettierrc +13 -0
- package/node_modules/node-datachannel/API.md +247 -0
- package/node_modules/node-datachannel/BULDING.md +26 -0
- package/node_modules/node-datachannel/CMakeLists.txt +153 -0
- package/node_modules/node-datachannel/LICENSE +373 -0
- package/node_modules/node-datachannel/README.md +129 -0
- package/node_modules/node-datachannel/dist/cjs/index.cjs +11 -0
- package/node_modules/node-datachannel/dist/cjs/index.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/lib/datachannel-stream.cjs +101 -0
- package/node_modules/node-datachannel/dist/cjs/lib/datachannel-stream.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/lib/index.cjs +91 -0
- package/node_modules/node-datachannel/dist/cjs/lib/index.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/lib/node-datachannel.cjs +94 -0
- package/node_modules/node-datachannel/dist/cjs/lib/node-datachannel.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/lib/websocket-server.cjs +45 -0
- package/node_modules/node-datachannel/dist/cjs/lib/websocket-server.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/lib/websocket.cjs +8 -0
- package/node_modules/node-datachannel/dist/cjs/lib/websocket.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/Events.cjs +86 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/Events.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/Exception.cjs +34 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/Exception.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCCertificate.cjs +34 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCCertificate.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCDataChannel.cjs +214 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCDataChannel.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCDtlsTransport.cjs +53 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCDtlsTransport.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCError.cjs +83 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCError.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCIceCandidate.cjs +132 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCIceCandidate.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCIceTransport.cjs +94 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCIceTransport.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCPeerConnection.cjs +434 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCPeerConnection.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCSctpTransport.cjs +59 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCSctpTransport.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCSessionDescription.cjs +45 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/RTCSessionDescription.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/index.cjs +42 -0
- package/node_modules/node-datachannel/dist/cjs/polyfill/index.cjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/index.mjs +8 -0
- package/node_modules/node-datachannel/dist/esm/index.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/lib/datachannel-stream.mjs +78 -0
- package/node_modules/node-datachannel/dist/esm/lib/datachannel-stream.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/lib/index.mjs +64 -0
- package/node_modules/node-datachannel/dist/esm/lib/index.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/lib/node-datachannel.mjs +78 -0
- package/node_modules/node-datachannel/dist/esm/lib/node-datachannel.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/lib/websocket-server.mjs +43 -0
- package/node_modules/node-datachannel/dist/esm/lib/websocket-server.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/lib/websocket.mjs +6 -0
- package/node_modules/node-datachannel/dist/esm/lib/websocket.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/Events.mjs +82 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/Events.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/Exception.mjs +28 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/Exception.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCCertificate.mjs +30 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCCertificate.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCDataChannel.mjs +210 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCDataChannel.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCDtlsTransport.mjs +49 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCDtlsTransport.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCError.mjs +79 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCError.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCIceCandidate.mjs +128 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCIceCandidate.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCIceTransport.mjs +89 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCIceTransport.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCPeerConnection.mjs +430 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCPeerConnection.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCSctpTransport.mjs +55 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCSctpTransport.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCSessionDescription.mjs +41 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/RTCSessionDescription.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/index.mjs +27 -0
- package/node_modules/node-datachannel/dist/esm/polyfill/index.mjs.map +1 -0
- package/node_modules/node-datachannel/dist/types/lib/datachannel-stream.d.ts +24 -0
- package/node_modules/node-datachannel/dist/types/lib/index.d.ts +241 -0
- package/node_modules/node-datachannel/dist/types/lib/types.d.ts +119 -0
- package/node_modules/node-datachannel/dist/types/lib/websocket-server.d.ts +13 -0
- package/node_modules/node-datachannel/dist/types/lib/websocket.d.ts +25 -0
- package/node_modules/node-datachannel/dist/types/polyfill/Events.d.ts +15 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCCertificate.d.ts +9 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCDataChannel.d.ts +29 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCDtlsTransport.d.ts +15 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCError.d.ts +17 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCIceCandidate.d.ts +21 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCIceTransport.d.ts +30 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCPeerConnection.d.ts +64 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCSctpTransport.d.ts +15 -0
- package/node_modules/node-datachannel/dist/types/polyfill/RTCSessionDescription.d.ts +10 -0
- package/node_modules/node-datachannel/dist/types/polyfill/index.d.ts +26 -0
- package/node_modules/node-datachannel/jest.config.ts +14 -0
- package/node_modules/node-datachannel/package.json +133 -0
- package/node_modules/node-datachannel/rollup.config.mjs +67 -0
- package/node_modules/node-datachannel/src/cpp/data-channel-wrapper.cpp +530 -0
- package/node_modules/node-datachannel/src/cpp/data-channel-wrapper.h +63 -0
- package/node_modules/node-datachannel/src/cpp/ice-udp-mux-listener-wrapper.cpp +172 -0
- package/node_modules/node-datachannel/src/cpp/ice-udp-mux-listener-wrapper.h +43 -0
- package/node_modules/node-datachannel/src/cpp/main.cpp +58 -0
- package/node_modules/node-datachannel/src/cpp/media-audio-wrapper.cpp +457 -0
- package/node_modules/node-datachannel/src/cpp/media-audio-wrapper.h +52 -0
- package/node_modules/node-datachannel/src/cpp/media-av1packetization.cpp +24 -0
- package/node_modules/node-datachannel/src/cpp/media-av1packetization.h +11 -0
- package/node_modules/node-datachannel/src/cpp/media-av1rtppacketizer-wrapper.cpp +126 -0
- package/node_modules/node-datachannel/src/cpp/media-av1rtppacketizer-wrapper.h +29 -0
- package/node_modules/node-datachannel/src/cpp/media-direction.cpp +43 -0
- package/node_modules/node-datachannel/src/cpp/media-direction.h +10 -0
- package/node_modules/node-datachannel/src/cpp/media-h264rtppacketizer-wrapper.cpp +126 -0
- package/node_modules/node-datachannel/src/cpp/media-h264rtppacketizer-wrapper.h +30 -0
- package/node_modules/node-datachannel/src/cpp/media-h265rtppacketizer-wrapper.cpp +126 -0
- package/node_modules/node-datachannel/src/cpp/media-h265rtppacketizer-wrapper.h +30 -0
- package/node_modules/node-datachannel/src/cpp/media-h26xseparator.cpp +32 -0
- package/node_modules/node-datachannel/src/cpp/media-h26xseparator.h +11 -0
- package/node_modules/node-datachannel/src/cpp/media-mediahandler-helper.cpp +31 -0
- package/node_modules/node-datachannel/src/cpp/media-mediahandler-helper.h +11 -0
- package/node_modules/node-datachannel/src/cpp/media-pacinghandler-wrapper.cpp +79 -0
- package/node_modules/node-datachannel/src/cpp/media-pacinghandler-wrapper.h +28 -0
- package/node_modules/node-datachannel/src/cpp/media-rtcpnackresponder-wrapper.cpp +68 -0
- package/node_modules/node-datachannel/src/cpp/media-rtcpnackresponder-wrapper.h +28 -0
- package/node_modules/node-datachannel/src/cpp/media-rtcpreceivingsession-wrapper.cpp +57 -0
- package/node_modules/node-datachannel/src/cpp/media-rtcpreceivingsession-wrapper.h +28 -0
- package/node_modules/node-datachannel/src/cpp/media-rtcpsrreporter-wrapper.cpp +93 -0
- package/node_modules/node-datachannel/src/cpp/media-rtcpsrreporter-wrapper.h +30 -0
- package/node_modules/node-datachannel/src/cpp/media-rtppacketizationconfig-wrapper.cpp +167 -0
- package/node_modules/node-datachannel/src/cpp/media-rtppacketizationconfig-wrapper.h +35 -0
- package/node_modules/node-datachannel/src/cpp/media-rtppacketizer-wrapper.cpp +95 -0
- package/node_modules/node-datachannel/src/cpp/media-rtppacketizer-wrapper.h +30 -0
- package/node_modules/node-datachannel/src/cpp/media-track-wrapper.cpp +458 -0
- package/node_modules/node-datachannel/src/cpp/media-track-wrapper.h +61 -0
- package/node_modules/node-datachannel/src/cpp/media-video-wrapper.cpp +526 -0
- package/node_modules/node-datachannel/src/cpp/media-video-wrapper.h +56 -0
- package/node_modules/node-datachannel/src/cpp/peer-connection-wrapper.cpp +1298 -0
- package/node_modules/node-datachannel/src/cpp/peer-connection-wrapper.h +89 -0
- package/node_modules/node-datachannel/src/cpp/rtc-wrapper.cpp +205 -0
- package/node_modules/node-datachannel/src/cpp/rtc-wrapper.h +24 -0
- package/node_modules/node-datachannel/src/cpp/thread-safe-callback.cpp +57 -0
- package/node_modules/node-datachannel/src/cpp/thread-safe-callback.h +47 -0
- package/node_modules/node-datachannel/src/cpp/web-socket-server-wrapper.cpp +275 -0
- package/node_modules/node-datachannel/src/cpp/web-socket-server-wrapper.h +41 -0
- package/node_modules/node-datachannel/src/cpp/web-socket-wrapper.cpp +796 -0
- package/node_modules/node-datachannel/src/cpp/web-socket-wrapper.h +63 -0
- package/node_modules/node-datachannel/src/index.ts +9 -0
- package/node_modules/node-datachannel/src/lib/datachannel-stream.ts +100 -0
- package/node_modules/node-datachannel/src/lib/index.ts +290 -0
- package/node_modules/node-datachannel/src/lib/node-datachannel.ts +84 -0
- package/node_modules/node-datachannel/src/lib/types.ts +169 -0
- package/node_modules/node-datachannel/src/lib/websocket-server.ts +37 -0
- package/node_modules/node-datachannel/src/lib/websocket.ts +26 -0
- package/node_modules/node-datachannel/src/polyfill/Events.ts +82 -0
- package/node_modules/node-datachannel/src/polyfill/Exception.ts +37 -0
- package/node_modules/node-datachannel/src/polyfill/README.md +41 -0
- package/node_modules/node-datachannel/src/polyfill/RTCCertificate.ts +21 -0
- package/node_modules/node-datachannel/src/polyfill/RTCDataChannel.ts +225 -0
- package/node_modules/node-datachannel/src/polyfill/RTCDtlsTransport.ts +46 -0
- package/node_modules/node-datachannel/src/polyfill/RTCError.ts +78 -0
- package/node_modules/node-datachannel/src/polyfill/RTCIceCandidate.ts +128 -0
- package/node_modules/node-datachannel/src/polyfill/RTCIceTransport.ts +90 -0
- package/node_modules/node-datachannel/src/polyfill/RTCPeerConnection.ts +527 -0
- package/node_modules/node-datachannel/src/polyfill/RTCSctpTransport.ts +51 -0
- package/node_modules/node-datachannel/src/polyfill/RTCSessionDescription.ts +41 -0
- package/node_modules/node-datachannel/src/polyfill/index.ts +38 -0
- package/node_modules/node-datachannel/tsconfig.json +21 -0
- package/node_modules/p-limit/index.d.ts +38 -0
- package/node_modules/p-limit/index.js +57 -0
- package/node_modules/p-limit/license +9 -0
- package/node_modules/p-limit/package.json +52 -0
- package/node_modules/p-limit/readme.md +101 -0
- package/node_modules/p-locate/index.d.ts +64 -0
- package/node_modules/p-locate/index.js +52 -0
- package/node_modules/p-locate/license +9 -0
- package/node_modules/p-locate/package.json +53 -0
- package/node_modules/p-locate/readme.md +90 -0
- package/node_modules/p-try/index.d.ts +39 -0
- package/node_modules/p-try/index.js +9 -0
- package/node_modules/p-try/license +9 -0
- package/node_modules/p-try/package.json +42 -0
- package/node_modules/p-try/readme.md +58 -0
- package/node_modules/path-exists/index.d.ts +28 -0
- package/node_modules/path-exists/index.js +23 -0
- package/node_modules/path-exists/license +9 -0
- package/node_modules/path-exists/package.json +39 -0
- package/node_modules/path-exists/readme.md +52 -0
- package/node_modules/pngjs/.eslintignore +2 -0
- package/node_modules/pngjs/.eslintrc.json +19 -0
- package/node_modules/pngjs/.prettierignore +3 -0
- package/node_modules/pngjs/LICENSE +20 -0
- package/node_modules/pngjs/README.md +429 -0
- package/node_modules/pngjs/browser.js +16096 -0
- package/node_modules/pngjs/coverage/lcov-report/base.css +354 -0
- package/node_modules/pngjs/coverage/lcov-report/bitmapper.js.html +881 -0
- package/node_modules/pngjs/coverage/lcov-report/bitpacker.js.html +554 -0
- package/node_modules/pngjs/coverage/lcov-report/block-navigation.js +77 -0
- package/node_modules/pngjs/coverage/lcov-report/chunkstream.js.html +647 -0
- package/node_modules/pngjs/coverage/lcov-report/constants.js.html +176 -0
- package/node_modules/pngjs/coverage/lcov-report/crc.js.html +200 -0
- package/node_modules/pngjs/coverage/lcov-report/favicon.png +0 -0
- package/node_modules/pngjs/coverage/lcov-report/filter-pack.js.html +593 -0
- package/node_modules/pngjs/coverage/lcov-report/filter-parse-async.js.html +152 -0
- package/node_modules/pngjs/coverage/lcov-report/filter-parse-sync.js.html +143 -0
- package/node_modules/pngjs/coverage/lcov-report/filter-parse.js.html +611 -0
- package/node_modules/pngjs/coverage/lcov-report/format-normaliser.js.html +359 -0
- package/node_modules/pngjs/coverage/lcov-report/index.html +426 -0
- package/node_modules/pngjs/coverage/lcov-report/interlace.js.html +365 -0
- package/node_modules/pngjs/coverage/lcov-report/packer-async.js.html +230 -0
- package/node_modules/pngjs/coverage/lcov-report/packer-sync.js.html +248 -0
- package/node_modules/pngjs/coverage/lcov-report/packer.js.html +467 -0
- package/node_modules/pngjs/coverage/lcov-report/paeth-predictor.js.html +128 -0
- package/node_modules/pngjs/coverage/lcov-report/parser-async.js.html +575 -0
- package/node_modules/pngjs/coverage/lcov-report/parser-sync.js.html +404 -0
- package/node_modules/pngjs/coverage/lcov-report/parser.js.html +950 -0
- package/node_modules/pngjs/coverage/lcov-report/png-sync.js.html +116 -0
- package/node_modules/pngjs/coverage/lcov-report/png.js.html +662 -0
- package/node_modules/pngjs/coverage/lcov-report/prettify.css +101 -0
- package/node_modules/pngjs/coverage/lcov-report/prettify.js +1007 -0
- package/node_modules/pngjs/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/node_modules/pngjs/coverage/lcov-report/sorter.js +169 -0
- package/node_modules/pngjs/coverage/lcov-report/sync-inflate.js.html +584 -0
- package/node_modules/pngjs/coverage/lcov-report/sync-reader.js.html +215 -0
- package/node_modules/pngjs/coverage/lcov.info +2177 -0
- package/node_modules/pngjs/lib/bitmapper.js +267 -0
- package/node_modules/pngjs/lib/bitpacker.js +158 -0
- package/node_modules/pngjs/lib/chunkstream.js +189 -0
- package/node_modules/pngjs/lib/constants.js +32 -0
- package/node_modules/pngjs/lib/crc.js +40 -0
- package/node_modules/pngjs/lib/filter-pack.js +171 -0
- package/node_modules/pngjs/lib/filter-parse-async.js +24 -0
- package/node_modules/pngjs/lib/filter-parse-sync.js +21 -0
- package/node_modules/pngjs/lib/filter-parse.js +177 -0
- package/node_modules/pngjs/lib/format-normaliser.js +93 -0
- package/node_modules/pngjs/lib/interlace.js +95 -0
- package/node_modules/pngjs/lib/packer-async.js +50 -0
- package/node_modules/pngjs/lib/packer-sync.js +56 -0
- package/node_modules/pngjs/lib/packer.js +129 -0
- package/node_modules/pngjs/lib/paeth-predictor.js +16 -0
- package/node_modules/pngjs/lib/parser-async.js +165 -0
- package/node_modules/pngjs/lib/parser-sync.js +108 -0
- package/node_modules/pngjs/lib/parser.js +290 -0
- package/node_modules/pngjs/lib/png-sync.js +12 -0
- package/node_modules/pngjs/lib/png.js +194 -0
- package/node_modules/pngjs/lib/sync-inflate.js +168 -0
- package/node_modules/pngjs/lib/sync-reader.js +45 -0
- package/node_modules/pngjs/package.json +73 -0
- package/node_modules/qrcode/README.md +770 -0
- package/node_modules/qrcode/bin/qrcode +159 -0
- package/node_modules/qrcode/helper/to-sjis-browser.js +2 -0
- package/node_modules/qrcode/helper/to-sjis.js +105 -0
- package/node_modules/qrcode/lib/browser.js +76 -0
- package/node_modules/qrcode/lib/can-promise.js +7 -0
- package/node_modules/qrcode/lib/core/alignment-pattern.js +83 -0
- package/node_modules/qrcode/lib/core/alphanumeric-data.js +59 -0
- package/node_modules/qrcode/lib/core/bit-buffer.js +37 -0
- package/node_modules/qrcode/lib/core/bit-matrix.js +65 -0
- package/node_modules/qrcode/lib/core/byte-data.js +30 -0
- package/node_modules/qrcode/lib/core/error-correction-code.js +135 -0
- package/node_modules/qrcode/lib/core/error-correction-level.js +50 -0
- package/node_modules/qrcode/lib/core/finder-pattern.js +22 -0
- package/node_modules/qrcode/lib/core/format-info.js +29 -0
- package/node_modules/qrcode/lib/core/galois-field.js +69 -0
- package/node_modules/qrcode/lib/core/kanji-data.js +54 -0
- package/node_modules/qrcode/lib/core/mask-pattern.js +234 -0
- package/node_modules/qrcode/lib/core/mode.js +167 -0
- package/node_modules/qrcode/lib/core/numeric-data.js +43 -0
- package/node_modules/qrcode/lib/core/polynomial.js +62 -0
- package/node_modules/qrcode/lib/core/qrcode.js +495 -0
- package/node_modules/qrcode/lib/core/reed-solomon-encoder.js +56 -0
- package/node_modules/qrcode/lib/core/regex.js +31 -0
- package/node_modules/qrcode/lib/core/segments.js +330 -0
- package/node_modules/qrcode/lib/core/utils.js +63 -0
- package/node_modules/qrcode/lib/core/version-check.js +9 -0
- package/node_modules/qrcode/lib/core/version.js +163 -0
- package/node_modules/qrcode/lib/index.js +12 -0
- package/node_modules/qrcode/lib/renderer/canvas.js +63 -0
- package/node_modules/qrcode/lib/renderer/png.js +78 -0
- package/node_modules/qrcode/lib/renderer/svg-tag.js +81 -0
- package/node_modules/qrcode/lib/renderer/svg.js +19 -0
- package/node_modules/qrcode/lib/renderer/terminal/terminal-small.js +85 -0
- package/node_modules/qrcode/lib/renderer/terminal/terminal.js +49 -0
- package/node_modules/qrcode/lib/renderer/terminal.js +9 -0
- package/node_modules/qrcode/lib/renderer/utf8.js +71 -0
- package/node_modules/qrcode/lib/renderer/utils.js +99 -0
- package/node_modules/qrcode/lib/server.js +138 -0
- package/node_modules/qrcode/license +10 -0
- package/node_modules/qrcode/package.json +77 -0
- package/node_modules/require-directory/.jshintrc +67 -0
- package/node_modules/require-directory/.npmignore +1 -0
- package/node_modules/require-directory/.travis.yml +3 -0
- package/node_modules/require-directory/LICENSE +22 -0
- package/node_modules/require-directory/README.markdown +184 -0
- package/node_modules/require-directory/index.js +86 -0
- package/node_modules/require-directory/package.json +40 -0
- package/node_modules/require-main-filename/CHANGELOG.md +26 -0
- package/node_modules/require-main-filename/LICENSE.txt +14 -0
- package/node_modules/require-main-filename/README.md +26 -0
- package/node_modules/require-main-filename/index.js +18 -0
- package/node_modules/require-main-filename/package.json +35 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +680 -0
- package/node_modules/semver/bin/semver.js +195 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +577 -0
- package/node_modules/semver/classes/semver.js +350 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/truncate.js +48 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +93 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +17 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/set-blocking/CHANGELOG.md +26 -0
- package/node_modules/set-blocking/LICENSE.txt +14 -0
- package/node_modules/set-blocking/README.md +31 -0
- package/node_modules/set-blocking/index.js +7 -0
- package/node_modules/set-blocking/package.json +42 -0
- package/node_modules/sharp/LICENSE +191 -0
- package/node_modules/sharp/README.md +112 -0
- package/node_modules/sharp/dist/channel.cjs +177 -0
- package/node_modules/sharp/dist/channel.mjs +177 -0
- package/node_modules/sharp/dist/colour.cjs +199 -0
- package/node_modules/sharp/dist/colour.mjs +199 -0
- package/node_modules/sharp/dist/composite.cjs +213 -0
- package/node_modules/sharp/dist/composite.mjs +213 -0
- package/node_modules/sharp/dist/constructor.cjs +511 -0
- package/node_modules/sharp/dist/constructor.mjs +511 -0
- package/node_modules/sharp/dist/index.cjs +25 -0
- package/node_modules/sharp/dist/index.d.cts +1999 -0
- package/node_modules/sharp/dist/index.d.mts +2046 -0
- package/node_modules/sharp/dist/index.mjs +25 -0
- package/node_modules/sharp/dist/input.cjs +819 -0
- package/node_modules/sharp/dist/input.mjs +819 -0
- package/node_modules/sharp/dist/is.cjs +143 -0
- package/node_modules/sharp/dist/is.mjs +143 -0
- package/node_modules/sharp/dist/libvips.cjs +212 -0
- package/node_modules/sharp/dist/libvips.mjs +212 -0
- package/node_modules/sharp/dist/operation.cjs +1002 -0
- package/node_modules/sharp/dist/operation.mjs +1002 -0
- package/node_modules/sharp/dist/output.cjs +1785 -0
- package/node_modules/sharp/dist/output.mjs +1785 -0
- package/node_modules/sharp/dist/resize.cjs +617 -0
- package/node_modules/sharp/dist/resize.mjs +617 -0
- package/node_modules/sharp/dist/sharp.cjs +174 -0
- package/node_modules/sharp/dist/sharp.mjs +174 -0
- package/node_modules/sharp/dist/utility.cjs +301 -0
- package/node_modules/sharp/dist/utility.mjs +301 -0
- package/node_modules/sharp/install/build.js +38 -0
- package/node_modules/sharp/lib/index.d.ts +1999 -0
- package/node_modules/sharp/package.json +227 -0
- package/node_modules/sharp/src/binding.gyp +303 -0
- package/node_modules/sharp/src/common.cc +1186 -0
- package/node_modules/sharp/src/common.h +421 -0
- package/node_modules/sharp/src/metadata.cc +404 -0
- package/node_modules/sharp/src/metadata.h +95 -0
- package/node_modules/sharp/src/operations.cc +516 -0
- package/node_modules/sharp/src/operations.h +137 -0
- package/node_modules/sharp/src/pipeline.cc +1948 -0
- package/node_modules/sharp/src/pipeline.h +422 -0
- package/node_modules/sharp/src/sharp.cc +43 -0
- package/node_modules/sharp/src/stats.cc +186 -0
- package/node_modules/sharp/src/stats.h +62 -0
- package/node_modules/sharp/src/utilities.cc +289 -0
- package/node_modules/sharp/src/utilities.h +22 -0
- package/node_modules/string-width/index.d.ts +29 -0
- package/node_modules/string-width/index.js +47 -0
- package/node_modules/string-width/license +9 -0
- package/node_modules/string-width/package.json +56 -0
- package/node_modules/string-width/readme.md +50 -0
- package/node_modules/strip-ansi/index.d.ts +17 -0
- package/node_modules/strip-ansi/index.js +4 -0
- package/node_modules/strip-ansi/license +9 -0
- package/node_modules/strip-ansi/package.json +54 -0
- package/node_modules/strip-ansi/readme.md +46 -0
- package/node_modules/which-module/LICENSE +13 -0
- package/node_modules/which-module/README.md +58 -0
- package/node_modules/which-module/index.js +9 -0
- package/node_modules/which-module/package.json +41 -0
- package/node_modules/wrap-ansi/index.js +186 -0
- package/node_modules/wrap-ansi/license +9 -0
- package/node_modules/wrap-ansi/package.json +61 -0
- package/node_modules/wrap-ansi/readme.md +97 -0
- package/node_modules/ws/LICENSE +20 -0
- package/node_modules/ws/README.md +548 -0
- package/node_modules/ws/browser.js +8 -0
- package/node_modules/ws/index.js +22 -0
- package/node_modules/ws/lib/buffer-util.js +131 -0
- package/node_modules/ws/lib/constants.js +19 -0
- package/node_modules/ws/lib/event-target.js +292 -0
- package/node_modules/ws/lib/extension.js +203 -0
- package/node_modules/ws/lib/limiter.js +55 -0
- package/node_modules/ws/lib/permessage-deflate.js +530 -0
- package/node_modules/ws/lib/receiver.js +743 -0
- package/node_modules/ws/lib/sender.js +607 -0
- package/node_modules/ws/lib/stream.js +161 -0
- package/node_modules/ws/lib/subprotocol.js +62 -0
- package/node_modules/ws/lib/validation.js +152 -0
- package/node_modules/ws/lib/websocket-server.js +562 -0
- package/node_modules/ws/lib/websocket.js +1407 -0
- package/node_modules/ws/package.json +74 -0
- package/node_modules/ws/wrapper.mjs +21 -0
- package/node_modules/y18n/CHANGELOG.md +35 -0
- package/node_modules/y18n/LICENSE +13 -0
- package/node_modules/y18n/README.md +109 -0
- package/node_modules/y18n/index.js +188 -0
- package/node_modules/y18n/package.json +39 -0
- package/node_modules/yargs/CHANGELOG.md +420 -0
- package/node_modules/yargs/LICENSE +21 -0
- package/node_modules/yargs/README.md +140 -0
- package/node_modules/yargs/build/lib/apply-extends.d.ts +2 -0
- package/node_modules/yargs/build/lib/apply-extends.js +65 -0
- package/node_modules/yargs/build/lib/argsert.d.ts +2 -0
- package/node_modules/yargs/build/lib/argsert.js +65 -0
- package/node_modules/yargs/build/lib/command.d.ts +64 -0
- package/node_modules/yargs/build/lib/command.js +416 -0
- package/node_modules/yargs/build/lib/common-types.d.ts +36 -0
- package/node_modules/yargs/build/lib/common-types.js +25 -0
- package/node_modules/yargs/build/lib/completion-templates.d.ts +2 -0
- package/node_modules/yargs/build/lib/completion-templates.js +50 -0
- package/node_modules/yargs/build/lib/completion.d.ts +21 -0
- package/node_modules/yargs/build/lib/completion.js +135 -0
- package/node_modules/yargs/build/lib/is-promise.d.ts +1 -0
- package/node_modules/yargs/build/lib/is-promise.js +9 -0
- package/node_modules/yargs/build/lib/levenshtein.d.ts +1 -0
- package/node_modules/yargs/build/lib/levenshtein.js +58 -0
- package/node_modules/yargs/build/lib/middleware.d.ts +10 -0
- package/node_modules/yargs/build/lib/middleware.js +57 -0
- package/node_modules/yargs/build/lib/obj-filter.d.ts +1 -0
- package/node_modules/yargs/build/lib/obj-filter.js +14 -0
- package/node_modules/yargs/build/lib/parse-command.d.ts +11 -0
- package/node_modules/yargs/build/lib/parse-command.js +36 -0
- package/node_modules/yargs/build/lib/process-argv.d.ts +2 -0
- package/node_modules/yargs/build/lib/process-argv.js +31 -0
- package/node_modules/yargs/build/lib/usage.d.ts +49 -0
- package/node_modules/yargs/build/lib/usage.js +540 -0
- package/node_modules/yargs/build/lib/validation.d.ts +34 -0
- package/node_modules/yargs/build/lib/validation.js +330 -0
- package/node_modules/yargs/build/lib/yargs.d.ts +274 -0
- package/node_modules/yargs/build/lib/yargs.js +1190 -0
- package/node_modules/yargs/build/lib/yerror.d.ts +4 -0
- package/node_modules/yargs/build/lib/yerror.js +11 -0
- package/node_modules/yargs/index.js +40 -0
- package/node_modules/yargs/locales/be.json +46 -0
- package/node_modules/yargs/locales/de.json +46 -0
- package/node_modules/yargs/locales/en.json +51 -0
- package/node_modules/yargs/locales/es.json +46 -0
- package/node_modules/yargs/locales/fi.json +49 -0
- package/node_modules/yargs/locales/fr.json +53 -0
- package/node_modules/yargs/locales/hi.json +49 -0
- package/node_modules/yargs/locales/hu.json +46 -0
- package/node_modules/yargs/locales/id.json +50 -0
- package/node_modules/yargs/locales/it.json +46 -0
- package/node_modules/yargs/locales/ja.json +51 -0
- package/node_modules/yargs/locales/ko.json +49 -0
- package/node_modules/yargs/locales/nb.json +44 -0
- package/node_modules/yargs/locales/nl.json +49 -0
- package/node_modules/yargs/locales/nn.json +44 -0
- package/node_modules/yargs/locales/pirate.json +13 -0
- package/node_modules/yargs/locales/pl.json +49 -0
- package/node_modules/yargs/locales/pt.json +45 -0
- package/node_modules/yargs/locales/pt_BR.json +48 -0
- package/node_modules/yargs/locales/ru.json +46 -0
- package/node_modules/yargs/locales/th.json +46 -0
- package/node_modules/yargs/locales/tr.json +48 -0
- package/node_modules/yargs/locales/zh_CN.json +48 -0
- package/node_modules/yargs/locales/zh_TW.json +47 -0
- package/node_modules/yargs/package.json +92 -0
- package/node_modules/yargs/yargs.js +14 -0
- package/node_modules/yargs-parser/CHANGELOG.md +601 -0
- package/node_modules/yargs-parser/LICENSE.txt +14 -0
- package/node_modules/yargs-parser/README.md +449 -0
- package/node_modules/yargs-parser/index.js +1032 -0
- package/node_modules/yargs-parser/lib/tokenize-arg-string.js +40 -0
- package/node_modules/yargs-parser/package.json +46 -0
- package/package.json +50 -0
- package/tools/postinstall.mjs +9 -0
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof module === 'object' && module.exports) module.exports = factory();
|
|
3
|
+
else root.CodexAppServerEvents = factory();
|
|
4
|
+
})(globalThis, function () {
|
|
5
|
+
function mergeItems(existing, incoming = []) {
|
|
6
|
+
for (const item of incoming) {
|
|
7
|
+
const index = existing.findIndex(current => current.id === item.id);
|
|
8
|
+
if (index < 0) existing.push(item);
|
|
9
|
+
else existing[index] = { ...existing[index], ...item };
|
|
10
|
+
}
|
|
11
|
+
return existing;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Both relay and local WebSocket carry these same app-server notifications.
|
|
15
|
+
// Mutate one thread and return only the affected turn for incremental rendering.
|
|
16
|
+
function applyNotification(thread, method, p) {
|
|
17
|
+
if (method === 'thread/status/changed') thread.status = p.status;
|
|
18
|
+
else if (method === 'thread/name/updated') thread.name = p.threadName;
|
|
19
|
+
else if (!['turn/started', 'turn/completed', 'item/started', 'item/completed', 'item/agentMessage/delta',
|
|
20
|
+
'item/reasoning/summaryTextDelta', 'item/reasoning/summaryPartAdded', 'item/commandExecution/outputDelta'].includes(method)) return null;
|
|
21
|
+
thread.turns ||= [];
|
|
22
|
+
let turn = thread.turns.find(t => t.id === (p.turnId || p.turn?.id));
|
|
23
|
+
if (!turn && p.turnId && p.item) { turn = { id: p.turnId, status: 'inProgress', items: [] }; thread.turns.push(turn); }
|
|
24
|
+
if (p.turn) {
|
|
25
|
+
if (!turn) { turn = { ...p.turn, items: p.turn.items || [] }; thread.turns.push(turn); }
|
|
26
|
+
else Object.assign(turn, { ...p.turn, items: mergeItems(turn.items || [], p.turn.items) });
|
|
27
|
+
thread.status = method === 'turn/started' ? 'active' : method === 'turn/completed' ? 'idle' : thread.status;
|
|
28
|
+
}
|
|
29
|
+
if (p.item && turn) mergeItems(turn.items, [p.item]);
|
|
30
|
+
const item = turn?.items.find(item => item.id === p.itemId);
|
|
31
|
+
if (item) {
|
|
32
|
+
if (method === 'item/agentMessage/delta') item.text = (item.text || '') + p.delta;
|
|
33
|
+
if (method === 'item/reasoning/summaryTextDelta') {
|
|
34
|
+
item.summary ||= []; item.summary[p.summaryIndex] = (item.summary[p.summaryIndex] || '') + p.delta;
|
|
35
|
+
}
|
|
36
|
+
if (method === 'item/reasoning/summaryPartAdded') { item.summary ||= []; item.summary[p.summaryIndex] ??= ''; }
|
|
37
|
+
if (method === 'item/commandExecution/outputDelta') item.aggregatedOutput = (item.aggregatedOutput || '') + p.delta;
|
|
38
|
+
}
|
|
39
|
+
return turn || (['thread/status/changed', 'thread/name/updated'].includes(method) ? thread.turns.at(-1) : null);
|
|
40
|
+
}
|
|
41
|
+
function mergeAvailable(previous, incoming) {
|
|
42
|
+
const result = { ...previous };
|
|
43
|
+
for (const [key, value] of Object.entries(incoming || {})) {
|
|
44
|
+
if (value === null || value === undefined) continue;
|
|
45
|
+
result[key] = typeof value === 'object' && !Array.isArray(value) ? mergeAvailable(result[key], value) : value;
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
function mergeUsage(snapshot, update) {
|
|
50
|
+
const limit = update.rateLimits;
|
|
51
|
+
if (!limit) return snapshot;
|
|
52
|
+
const id = limit.limitId || 'codex';
|
|
53
|
+
const buckets = { ...snapshot.rateLimitsByLimitId };
|
|
54
|
+
if (!Object.keys(buckets).length && snapshot.rateLimits) buckets[snapshot.rateLimits.limitId || 'codex'] = snapshot.rateLimits;
|
|
55
|
+
buckets[id] = mergeAvailable(buckets[id], limit);
|
|
56
|
+
const primaryId = snapshot.rateLimits?.limitId || 'codex';
|
|
57
|
+
return { ...snapshot, rateLimitsByLimitId: buckets, rateLimits: id === primaryId ? buckets[id] : snapshot.rateLimits };
|
|
58
|
+
}
|
|
59
|
+
class UsageCache {
|
|
60
|
+
constructor(changed = () => {}) { this.changed = changed; this.generation = 0; this.reset(); }
|
|
61
|
+
reset() { this.generation++; this.value = null; this.pending = null; this.updates = []; this.changed(null); }
|
|
62
|
+
update(params) {
|
|
63
|
+
if (!this.value) { this.updates.push(params); return; }
|
|
64
|
+
this.value = mergeUsage(this.value, params); this.changed(this.value);
|
|
65
|
+
}
|
|
66
|
+
read(fetchSnapshot) {
|
|
67
|
+
if (this.value) return Promise.resolve(this.value);
|
|
68
|
+
if (this.pending) return this.pending;
|
|
69
|
+
const generation = this.generation;
|
|
70
|
+
const job = Promise.resolve().then(fetchSnapshot).then(snapshot => {
|
|
71
|
+
if (generation !== this.generation) throw new Error('连接已变化,用量数据已丢弃');
|
|
72
|
+
if (!snapshot?.rateLimits) throw new Error('电脑未返回用量数据');
|
|
73
|
+
this.value = this.updates.reduce(mergeUsage, snapshot); this.updates = [];
|
|
74
|
+
this.changed(this.value); return this.value;
|
|
75
|
+
}).finally(() => { if (this.pending === job) this.pending = null; });
|
|
76
|
+
this.pending = job; return job;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async function readProjects(request) {
|
|
80
|
+
const projects = []; let cursor;
|
|
81
|
+
do {
|
|
82
|
+
const page = await request('project/list', { limit: 100, sortKey: 'position', sortDirection: 'asc', ...(cursor ? { cursor } : {}) });
|
|
83
|
+
projects.push(...page.data); cursor = page.nextCursor;
|
|
84
|
+
} while (cursor);
|
|
85
|
+
return projects;
|
|
86
|
+
}
|
|
87
|
+
function projectRootKey(path = '') {
|
|
88
|
+
const key = path.replace(/^\\\\\?\\/, '').replaceAll('\\', '/').replace(/\/+$/, '');
|
|
89
|
+
return /^[a-z]:\//i.test(key) || key.startsWith('//') ? key.toLowerCase() : key;
|
|
90
|
+
}
|
|
91
|
+
function orderDesktopProjects(projects, nativeProjects) {
|
|
92
|
+
const ranks = new Map();
|
|
93
|
+
nativeProjects.forEach((project, index) => {
|
|
94
|
+
for (const root of project.roots) ranks.set(projectRootKey(root.path), index);
|
|
95
|
+
});
|
|
96
|
+
// Desktop tool IDs differ from app-server IDs; retain them for task creation.
|
|
97
|
+
const local = projects.filter(project => project.hostId === 'local');
|
|
98
|
+
local.sort((a, b) => (ranks.get(projectRootKey(a.path)) ?? Infinity) - (ranks.get(projectRootKey(b.path)) ?? Infinity));
|
|
99
|
+
let index = 0;
|
|
100
|
+
return projects.map(project => project.hostId === 'local' ? local[index++] : project);
|
|
101
|
+
}
|
|
102
|
+
function threadProjectId(thread, projects) {
|
|
103
|
+
if (Object.hasOwn(thread, 'projectId')) return thread.projectId || null;
|
|
104
|
+
const cwd = projectRootKey(thread.cwd);
|
|
105
|
+
let match = null, length = -1;
|
|
106
|
+
for (const project of projects) for (const root of project.roots) {
|
|
107
|
+
const key = projectRootKey(root.path);
|
|
108
|
+
if (key.length > length && (cwd === key || cwd.startsWith(key + '/'))) {
|
|
109
|
+
match = project.id; length = key.length;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return match;
|
|
113
|
+
}
|
|
114
|
+
function projectlessThreadTarget(cwd = '') {
|
|
115
|
+
return { projectId: null, runtimeWorkspaceRoots: [], ...(cwd ? { cwd } : {}) };
|
|
116
|
+
}
|
|
117
|
+
async function updateSettings(request, contexts, notifications, threadId, model, effort, serviceTier) {
|
|
118
|
+
if (serviceTier !== undefined && serviceTier !== null && !['priority', 'fast'].includes(serviceTier)) throw new Error('不支持的快速模式设置');
|
|
119
|
+
const previous = notifications.get(threadId);
|
|
120
|
+
await request('thread/settings/update', { threadId, model, effort, ...(serviceTier !== undefined ? { serviceTier } : {}) });
|
|
121
|
+
// The RPC acknowledges the update. Prefer any settings notification already received,
|
|
122
|
+
// but do not wait for a second acknowledgement or require exact normalized field values.
|
|
123
|
+
if (notifications.get(threadId) === previous) {
|
|
124
|
+
contexts.set(threadId, { ...contexts.get(threadId), model, thinking: effort, ...(serviceTier !== undefined ? { serviceTier } : {}) });
|
|
125
|
+
}
|
|
126
|
+
return contexts.get(threadId);
|
|
127
|
+
}
|
|
128
|
+
const permissionPresets = {
|
|
129
|
+
ask: { permissions: ':workspace', approvalPolicy: 'on-request', approvalsReviewer: 'user' },
|
|
130
|
+
auto: { permissions: ':workspace', approvalPolicy: 'on-request', approvalsReviewer: 'guardian_subagent' },
|
|
131
|
+
full: { permissions: ':danger-full-access', approvalPolicy: 'never', approvalsReviewer: 'user' },
|
|
132
|
+
};
|
|
133
|
+
function isAutoReviewer(value) { return value === 'auto_review' || value === 'guardian_subagent'; }
|
|
134
|
+
function permissionState(settings) {
|
|
135
|
+
const sandboxPolicy = settings.sandboxPolicy ?? settings.sandbox;
|
|
136
|
+
const { approvalPolicy, approvalsReviewer, activePermissionProfile } = settings;
|
|
137
|
+
const profile = activePermissionProfile?.id;
|
|
138
|
+
let permissionMode = null;
|
|
139
|
+
// A custom profile remains custom even when its legacy sandbox looks similar.
|
|
140
|
+
if (!profile || profile.startsWith(':')) {
|
|
141
|
+
if ((profile === ':danger-full-access' || (!profile && sandboxPolicy?.type === 'dangerFullAccess')) && approvalPolicy === 'never' && approvalsReviewer === 'user') permissionMode = 'full';
|
|
142
|
+
const workspace = profile === ':workspace' || (!profile && sandboxPolicy?.type === 'workspaceWrite' && sandboxPolicy.networkAccess === false && !sandboxPolicy.excludeSlashTmp && !sandboxPolicy.excludeTmpdirEnvVar);
|
|
143
|
+
if (workspace && approvalPolicy === 'on-request') {
|
|
144
|
+
if (approvalsReviewer === 'user') permissionMode = 'ask';
|
|
145
|
+
else if (isAutoReviewer(approvalsReviewer)) permissionMode = 'auto';
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return { approvalPolicy, approvalsReviewer, activePermissionProfile: activePermissionProfile ?? null, sandboxPolicy, permissionMode };
|
|
149
|
+
}
|
|
150
|
+
async function readPermissionOptions(request, threadId, cwd) {
|
|
151
|
+
const list = async (method, params) => {
|
|
152
|
+
const data = []; let cursor;
|
|
153
|
+
do {
|
|
154
|
+
const page = await request(method, { ...params, limit: 100, ...(cursor ? { cursor } : {}) });
|
|
155
|
+
data.push(...page.data); cursor = page.nextCursor;
|
|
156
|
+
} while (cursor);
|
|
157
|
+
return data;
|
|
158
|
+
};
|
|
159
|
+
const [profiles, features, requirements] = await Promise.all([
|
|
160
|
+
list('permissionProfile/list', cwd ? { cwd } : {}),
|
|
161
|
+
list('experimentalFeature/list', { threadId }),
|
|
162
|
+
request('configRequirements/read', {}),
|
|
163
|
+
]);
|
|
164
|
+
return { profiles, guardianEnabled: features.some(feature => feature.name === 'guardian_approval' && feature.enabled), requirements: requirements.requirements };
|
|
165
|
+
}
|
|
166
|
+
function availablePermissionModes(options, context) {
|
|
167
|
+
const requirements = options.requirements;
|
|
168
|
+
const model = context.model?.replace(/^[A-Za-z0-9_-]+\//, '');
|
|
169
|
+
const requiresAutoReview = requirements?.autoReview?.requiredOnModels?.includes(model);
|
|
170
|
+
return Object.entries(permissionPresets).filter(([mode, preset]) => {
|
|
171
|
+
if (!options.profiles.some(profile => profile.id === preset.permissions && profile.allowed)) return false;
|
|
172
|
+
if (mode === 'auto' && !options.guardianEnabled) return false;
|
|
173
|
+
if (requiresAutoReview && mode !== 'auto') return false;
|
|
174
|
+
if (requirements?.allowedApprovalPolicies && !requirements.allowedApprovalPolicies.includes(preset.approvalPolicy)) return false;
|
|
175
|
+
if (requirements?.allowedSandboxModes && !requirements.allowedSandboxModes.includes(mode === 'full' ? 'danger-full-access' : 'workspace-write')) return false;
|
|
176
|
+
if (requirements?.allowedPermissionProfiles && requirements.allowedPermissionProfiles[preset.permissions] !== true) return false;
|
|
177
|
+
const reviewers = requirements?.allowedApprovalsReviewers;
|
|
178
|
+
return !reviewers || reviewers.includes(preset.approvalsReviewer) || (mode === 'auto' && reviewers.some(isAutoReviewer));
|
|
179
|
+
}).map(([mode]) => mode);
|
|
180
|
+
}
|
|
181
|
+
class PermissionOptionsCache {
|
|
182
|
+
constructor() { this.entries = new Map(); }
|
|
183
|
+
clear() { this.entries.clear(); }
|
|
184
|
+
delete(threadId) { this.entries.delete(threadId); }
|
|
185
|
+
context(threadId, context) {
|
|
186
|
+
const options = this.entries.get(threadId)?.value;
|
|
187
|
+
return { ...context, ...(options ? { permissionModes: availablePermissionModes(options, context) } : {}) };
|
|
188
|
+
}
|
|
189
|
+
async read(request, threadId, context) {
|
|
190
|
+
let entry = this.entries.get(threadId);
|
|
191
|
+
if (!entry || entry.cwd !== context.cwd) {
|
|
192
|
+
entry = { cwd: context.cwd };
|
|
193
|
+
entry.promise = readPermissionOptions(request, threadId, context.cwd).then(value => { entry.value = value; }).catch(error => {
|
|
194
|
+
if (this.entries.get(threadId) === entry) this.entries.delete(threadId);
|
|
195
|
+
throw error;
|
|
196
|
+
});
|
|
197
|
+
this.entries.set(threadId, entry);
|
|
198
|
+
}
|
|
199
|
+
await entry.promise;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
async function updatePermissions(request, contexts, notifications, optionsCache, threadId, mode) {
|
|
203
|
+
if (!Object.hasOwn(permissionPresets, mode)) throw new Error('不支持的权限模式');
|
|
204
|
+
const context = contexts.get(threadId);
|
|
205
|
+
if (!context) throw new Error('请先打开对话');
|
|
206
|
+
await optionsCache.read(request, threadId, context);
|
|
207
|
+
if (!optionsCache.context(threadId, contexts.get(threadId)).permissionModes.includes(mode)) throw new Error('此主机或项目配置不支持该权限模式');
|
|
208
|
+
const previous = notifications.get(threadId), preset = permissionPresets[mode];
|
|
209
|
+
await request('thread/settings/update', { threadId, ...preset });
|
|
210
|
+
if (notifications.get(threadId) === previous) {
|
|
211
|
+
contexts.set(threadId, { ...contexts.get(threadId), ...preset, activePermissionProfile: { id: preset.permissions, extends: null }, permissionMode: mode });
|
|
212
|
+
}
|
|
213
|
+
return optionsCache.context(threadId, contexts.get(threadId));
|
|
214
|
+
}
|
|
215
|
+
async function createThread(request, target, input, settings) {
|
|
216
|
+
const { thread } = await request('thread/start', target);
|
|
217
|
+
await request('turn/start', { threadId:thread.id, input,
|
|
218
|
+
...(settings.clientUserMessageId ? { clientUserMessageId:settings.clientUserMessageId } : {}),
|
|
219
|
+
...(settings.model ? { model:settings.model } : {}),
|
|
220
|
+
...(settings.thinking ? { effort:settings.thinking } : {}),
|
|
221
|
+
...(settings.serviceTier !== undefined ? { serviceTier:settings.serviceTier } : {}) });
|
|
222
|
+
return { threadId:thread.id };
|
|
223
|
+
}
|
|
224
|
+
async function readQueueItems(request, threadId) {
|
|
225
|
+
const items = []; let cursor = null;
|
|
226
|
+
do {
|
|
227
|
+
const result = await request('thread/queue/list', { threadId, cursor });
|
|
228
|
+
items.push(...result.data); cursor = result.nextCursor;
|
|
229
|
+
} while (cursor);
|
|
230
|
+
return items;
|
|
231
|
+
}
|
|
232
|
+
async function readQueue(request, threadId) {
|
|
233
|
+
const items = await readQueueItems(request, threadId);
|
|
234
|
+
return { items: items.map(item => ({ id: item.id, clientUserMessageId: item.clientUserMessageId,
|
|
235
|
+
prompt: item.input.filter(part => part.type === 'text').map(part => part.text).join('\n') || '图片',
|
|
236
|
+
text: item.input.filter(part => part.type === 'text').map(part => part.text).join('\n'),
|
|
237
|
+
attachments: item.input.filter(part => ['image', 'localImage'].includes(part.type)).map(part => part.type === 'image'
|
|
238
|
+
? { type:'image', available:true, url:part.url } : { type:'image', available:false, remotePath:part.path }),
|
|
239
|
+
createdAt: item.createdAt ?? '', error: '', native: true })) };
|
|
240
|
+
}
|
|
241
|
+
async function addQueue(request, threadId, input, clientUserMessageId) {
|
|
242
|
+
await request('thread/queue/add', { threadId, input, clientUserMessageId });
|
|
243
|
+
return readQueue(request, threadId);
|
|
244
|
+
}
|
|
245
|
+
async function changeQueue(request, threadId, queuedSubmissionId, action) {
|
|
246
|
+
if (action === 'steer') {
|
|
247
|
+
const item = (await readQueueItems(request, threadId)).find(item => item.id === queuedSubmissionId);
|
|
248
|
+
if (!item) throw new Error('该排队消息已不在队列中');
|
|
249
|
+
const { thread } = await request('thread/read', { threadId, includeTurns: true });
|
|
250
|
+
const active = thread.turns.findLast(turn => turn.status === 'inProgress');
|
|
251
|
+
if (active) {
|
|
252
|
+
await request('turn/steer', { threadId, expectedTurnId: active.id, input: item.input,
|
|
253
|
+
clientUserMessageId: item.clientUserMessageId });
|
|
254
|
+
const { deleted } = await request('thread/queue/delete', { threadId, queuedSubmissionId });
|
|
255
|
+
if (!deleted) throw new Error('引导已提交,但原排队消息未删除,请检查队列,勿重复引导');
|
|
256
|
+
} else {
|
|
257
|
+
await request('thread/queue/start', { threadId, queuedSubmissionId });
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
await request(`thread/queue/${action}`, { threadId, queuedSubmissionId });
|
|
261
|
+
}
|
|
262
|
+
return readQueue(request, threadId);
|
|
263
|
+
}
|
|
264
|
+
return { createThread, readQueue, addQueue, changeQueue, mergeItems, applyNotification, mergeUsage, UsageCache, readProjects, orderDesktopProjects, threadProjectId, projectlessThreadTarget, updateSettings,
|
|
265
|
+
permissionState, availablePermissionModes, PermissionOptionsCache, updatePermissions };
|
|
266
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof module === 'object' && module.exports) module.exports = factory();
|
|
3
|
+
else root.CodeRelaxP2pDiagnostics = factory();
|
|
4
|
+
})(globalThis, () => class {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.started = Date.now(); this.local = [0, 0, 0, 0, 0]; this.remote = [0, 0, 0, 0, 0];
|
|
7
|
+
this.offer = false; this.answer = false; this.open = false; this.ping = false; this.pong = false;
|
|
8
|
+
this.ice = 'new'; this.gathering = 'new'; this.error = 'none';
|
|
9
|
+
}
|
|
10
|
+
candidate(side, candidate) {
|
|
11
|
+
const type = /\btyp (host|srflx|prflx|relay)\b/.exec(candidate || '')?.[1];
|
|
12
|
+
const index = ['host', 'srflx', 'prflx', 'relay'].indexOf(type);
|
|
13
|
+
const counts = side === 'local' ? this.local : this.remote;
|
|
14
|
+
counts[index < 0 ? 4 : index]++;
|
|
15
|
+
}
|
|
16
|
+
snapshot(stage) {
|
|
17
|
+
const known = (value, choices) => choices.includes(value) ? value : 'unknown';
|
|
18
|
+
const counts = values => values.map(value => Math.min(value, 999)).join(',');
|
|
19
|
+
return `stage=${known(stage, ['verified', 'timeout', 'failed', 'closed', 'complete', 'replaced', 'unsupported'])}` +
|
|
20
|
+
`;ms=${Math.min(Date.now() - this.started, 999999)}` +
|
|
21
|
+
`;offer=${Number(this.offer)};answer=${Number(this.answer)}` +
|
|
22
|
+
`;ice=${known(this.ice, ['new', 'checking', 'connected', 'completed', 'failed', 'disconnected', 'closed'])}` +
|
|
23
|
+
`;gathering=${known(this.gathering, ['new', 'in-progress', 'gathering', 'complete'])}` +
|
|
24
|
+
`;local=${counts(this.local)};remote=${counts(this.remote)}` +
|
|
25
|
+
`;open=${Number(this.open)};ping=${Number(this.ping)};pong=${Number(this.pong)}` +
|
|
26
|
+
`;error=${known(this.error, ['none', 'stun', 'description', 'candidate', 'channel', 'frame', 'peer', 'initialization', 'signal'])}`;
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof module === 'object' && module.exports) module.exports = factory();
|
|
3
|
+
else root.CodexServerRequests = factory();
|
|
4
|
+
})(globalThis, function () {
|
|
5
|
+
const command = 'item/commandExecution/requestApproval';
|
|
6
|
+
const file = 'item/fileChange/requestApproval';
|
|
7
|
+
const input = 'item/tool/requestUserInput';
|
|
8
|
+
const equal = (a, b) => JSON.stringify(a) === JSON.stringify(b);
|
|
9
|
+
function decisions(request) {
|
|
10
|
+
if (request.method === command) return request.params.availableDecisions ?? ['accept', 'acceptForSession', 'decline', 'cancel'];
|
|
11
|
+
if (request.method === file) return ['accept', 'acceptForSession', 'decline', 'cancel'];
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
function validate(request, result) {
|
|
15
|
+
if ([command, file].includes(request.method)) {
|
|
16
|
+
if (!result || Object.keys(result).length !== 1 || !decisions(request).some(value => equal(value, result.decision))) throw new Error('审批选项不属于当前请求');
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
if (request.method === input) {
|
|
20
|
+
const questions = request.params.questions || [];
|
|
21
|
+
if (!result?.answers || Object.keys(result).length !== 1 || Object.keys(result.answers).length !== questions.length
|
|
22
|
+
|| questions.some(q => !Array.isArray(result.answers[q.id]?.answers) || result.answers[q.id].answers.some(a => typeof a !== 'string'))) throw new Error('回答格式无效');
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
throw new Error('此类请求需在工作站处理');
|
|
26
|
+
}
|
|
27
|
+
class Store {
|
|
28
|
+
constructor(epoch, changed = () => {}) { this.epoch = epoch; this.changed = changed; this.requests = new Map(); }
|
|
29
|
+
list(threadId) { return [...this.requests.values()].filter(r => r.params.threadId === threadId).map(r => ({ ...r })); }
|
|
30
|
+
receive(message) {
|
|
31
|
+
if (!['string', 'number'].includes(typeof message.id) || !message.params?.threadId || this.requests.has(message.id)) return;
|
|
32
|
+
const request = { id: message.id, method: message.method, params: message.params, epoch: this.epoch, status: 'pending' };
|
|
33
|
+
this.requests.set(message.id, request); this.changed(request.params.threadId);
|
|
34
|
+
}
|
|
35
|
+
notification(method, params) {
|
|
36
|
+
if (method === 'serverRequest/resolved') {
|
|
37
|
+
const request = this.requests.get(params.requestId);
|
|
38
|
+
if (request?.params.threadId === params.threadId) { this.requests.delete(params.requestId); this.changed(params.threadId); }
|
|
39
|
+
} else if (method === 'turn/completed' || method === 'thread/closed') {
|
|
40
|
+
for (const [id, r] of this.requests) if (r.params.threadId === params.threadId && (method === 'thread/closed' || r.params.turnId === params.turn?.id)) this.requests.delete(id);
|
|
41
|
+
this.changed(params.threadId);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
forget(threadId) {
|
|
45
|
+
for (const [id, request] of this.requests) if (request.params.threadId === threadId) this.requests.delete(id);
|
|
46
|
+
this.changed(threadId);
|
|
47
|
+
}
|
|
48
|
+
reset(epoch) {
|
|
49
|
+
const threads = new Set([...this.requests.values()].map(r => r.params.threadId));
|
|
50
|
+
this.requests.clear(); this.epoch = epoch; for (const id of threads) this.changed(id);
|
|
51
|
+
}
|
|
52
|
+
async respond(threadId, { id, epoch, result }, send) {
|
|
53
|
+
const request = this.requests.get(id);
|
|
54
|
+
if (!request || epoch !== this.epoch || request.params.threadId !== threadId) throw new Error('审批已处理或连接已变化,请等待同步');
|
|
55
|
+
if (request.status !== 'pending') throw new Error('决定已提交,正在等待工作站确认,请勿重复提交');
|
|
56
|
+
validate(request, result);
|
|
57
|
+
request.status = 'submitted'; this.changed(threadId);
|
|
58
|
+
try { await send({ id: request.id, result }); }
|
|
59
|
+
catch (error) {
|
|
60
|
+
if (this.requests.get(id) === request) { request.status = 'unknown'; this.changed(threadId); }
|
|
61
|
+
throw new Error('审批发送结果未确认,请检查工作站;不会自动重发。' + error.message);
|
|
62
|
+
}
|
|
63
|
+
return { submitted: true };
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return { Store, decisions, validate, command, file, input };
|
|
67
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
(function (root, factory) {
|
|
2
|
+
if (typeof module === 'object' && module.exports) module.exports = factory();
|
|
3
|
+
else root.CodexTimelineSync = factory();
|
|
4
|
+
})(globalThis, function () {
|
|
5
|
+
const equal = (left, right) => JSON.stringify(left) === JSON.stringify(right);
|
|
6
|
+
function changedFields(previous, current, ignored) {
|
|
7
|
+
const set = {}, append = {}, unset = [];
|
|
8
|
+
for (const key of new Set([...Object.keys(previous || {}), ...Object.keys(current || {})])) {
|
|
9
|
+
if (ignored.has(key) || equal(previous?.[key], current?.[key])) continue;
|
|
10
|
+
if (!Object.hasOwn(current, key)) { unset.push(key); continue; }
|
|
11
|
+
const before = previous?.[key], after = current[key];
|
|
12
|
+
if (typeof before === 'string' && typeof after === 'string' && after.startsWith(before)) append[key] = after.slice(before.length);
|
|
13
|
+
else set[key] = after;
|
|
14
|
+
}
|
|
15
|
+
return { set, append, unset };
|
|
16
|
+
}
|
|
17
|
+
const nonempty = changes => Object.keys(changes.set).length || Object.keys(changes.append).length || changes.unset.length;
|
|
18
|
+
function diffTurn(previous, current) {
|
|
19
|
+
if (!previous || !current || previous.id !== current.id) return null;
|
|
20
|
+
const before = Array.isArray(previous.entries) ? previous.entries : [];
|
|
21
|
+
const after = Array.isArray(current.entries) ? current.entries : [];
|
|
22
|
+
if (after.length < before.length) return null;
|
|
23
|
+
const entries = [];
|
|
24
|
+
for (let index = 0; index < before.length; index++) {
|
|
25
|
+
if (before[index]?.id !== after[index]?.id || before[index]?.type !== after[index]?.type ||
|
|
26
|
+
before[index]?.role !== after[index]?.role || before[index]?.kind !== after[index]?.kind) return null;
|
|
27
|
+
const changes = changedFields(before[index], after[index], new Set(['id', 'type', 'role', 'kind']));
|
|
28
|
+
if (nonempty(changes)) entries.push({ id: after[index].id, index, ...changes });
|
|
29
|
+
}
|
|
30
|
+
const turn = changedFields(previous, current, new Set(['id', 'entries']));
|
|
31
|
+
const appended = after.slice(before.length);
|
|
32
|
+
return { id: current.id, ...turn, entries, appended };
|
|
33
|
+
}
|
|
34
|
+
function applyChanges(target, changes) {
|
|
35
|
+
const result = { ...target, ...(changes.set || {}) };
|
|
36
|
+
for (const key of changes.unset || []) delete result[key];
|
|
37
|
+
for (const [key, suffix] of Object.entries(changes.append || {})) {
|
|
38
|
+
if (typeof result[key] !== 'string' || typeof suffix !== 'string') throw new Error('增量字段类型不匹配');
|
|
39
|
+
result[key] += suffix;
|
|
40
|
+
}
|
|
41
|
+
return result;
|
|
42
|
+
}
|
|
43
|
+
function applyTurnPatch(turn, patch) {
|
|
44
|
+
if (!turn || turn.id !== patch?.id) throw new Error('增量轮次不存在');
|
|
45
|
+
const next = applyChanges(turn, patch), entries = (turn.entries || []).map(entry => ({ ...entry }));
|
|
46
|
+
for (const entryPatch of patch.entries || []) {
|
|
47
|
+
const entry = entries[entryPatch.index];
|
|
48
|
+
if (!entry || entry.id !== entryPatch.id) throw new Error('增量条目边界不匹配');
|
|
49
|
+
entries[entryPatch.index] = applyChanges(entry, entryPatch);
|
|
50
|
+
}
|
|
51
|
+
for (const entry of patch.appended || []) {
|
|
52
|
+
if (entries.some(existing => existing.id === entry.id)) throw new Error('增量条目重复');
|
|
53
|
+
entries.push(entry);
|
|
54
|
+
}
|
|
55
|
+
next.entries = entries; return next;
|
|
56
|
+
}
|
|
57
|
+
function acceptSyncUpdate(current, incoming) {
|
|
58
|
+
if (incoming.reset) return { reset: true, next: incoming };
|
|
59
|
+
const valid = current && incoming.id === current.id && incoming.epoch === current.epoch &&
|
|
60
|
+
Number.isSafeInteger(incoming.fromSeq) && incoming.fromSeq >= 1 &&
|
|
61
|
+
Number.isSafeInteger(incoming.toSeq) && incoming.toSeq >= incoming.fromSeq;
|
|
62
|
+
if (!valid || incoming.fromSeq > current.seq + 1) throw new Error('实时更新序号不连续');
|
|
63
|
+
if (incoming.toSeq <= current.seq) return { duplicate: true, next: current };
|
|
64
|
+
return { next: { ...current, seq: incoming.toSeq } };
|
|
65
|
+
}
|
|
66
|
+
return { diffTurn, applyTurnPatch, acceptSyncUpdate };
|
|
67
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-relax
|
|
3
|
+
description: 启动、检查或停止 Code Relax 工作站服务,生成并展示配对二维码。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Code Relax
|
|
7
|
+
|
|
8
|
+
- Bridge 可独立于 Desktop 启动;在 Desktop 任务中执行时保留注入环境,用于基础控制绑定上下文。启动工作站服务用 `relax start --json`;完整控制用 `relax shared-start --json`。已配置 Code Relax 中继时,启动命令同时恢复中继连接器和已有设备授权。
|
|
9
|
+
- npm 全局安装会自动执行服务部署和 Skill 安装;只有修复安装时才单独运行 `relax setup --json` 或 `relax skill-install --json`。
|
|
10
|
+
- `setup` 默认启用当前用户登录启动工作站服务,不自动打开 Codex;用 `autostart-status / autostart-disable / autostart-enable` 管理。恢复完整控制会保留 Bridge 和中继,但仍须明确确认可能中断全部完整控制任务。
|
|
11
|
+
- 用户要求启动 Code Relax 时,执行一次 `relax start --json`。用户要求二维码或当前启动结果包含二维码时,展示 CLI 返回的 `qrPath` 和 `displayText`;没有设备授权时可用 `relax pair --json` 生成新的配对二维码。
|
|
12
|
+
- 配对二维码是短期 HTTPS 邀请,不属于工作站或某一台移动设备,也不含 LAN IP、端口、Bridge Token 或中继地址。新增设备不撤销已有设备。
|
|
13
|
+
- 已授权设备可直接使用 Code Relax 中继。App 以工作站名显示已配对电脑,进入后选择局域网、Code Relax 中继或 OpenAI 中继。启动命令会经已认证中继临时刷新当前 LAN 候选;App 只保存设备凭据验证成功的网络记录。
|
|
14
|
+
- `status --json` 查询工作站服务;`relay-status --json` 查询中继和授权设备数。`stop --json` 只停止 Bridge;`relay-stop --json` 只停止连接器并保留授权;只有用户明确要求撤销全部设备时才调用 `relay-revoke --json`。
|
|
15
|
+
- 启动或配对成功后,将 `qrPath` 以 Markdown 图片嵌入回复,并逐字展示 `displayText`。不要把二维码内容、Token 或 Base64 写进消息。
|
|
16
|
+
- 不自动修改防火墙或发送测试消息。`lanAccess: unverified` 或 `mobileAccess: unverified` 只表示设备链路尚未现场验证。
|
|
17
|
+
- 服务位于用户 `Programs/CodexRemote/service`;配置在 `LocalAppData/CodexRemote`;附件在 `ProgramData/CodexRemote/attachments`。不要删除配置、附件或凭据来排障。
|