diff --git a/.playwright-mcp/page-2026-04-01T07-13-27-345Z.yml b/.playwright-mcp/page-2026-04-01T07-13-27-345Z.yml deleted file mode 100644 index 82ce244..0000000 --- a/.playwright-mcp/page-2026-04-01T07-13-27-345Z.yml +++ /dev/null @@ -1,316 +0,0 @@ -- generic [active] [ref=e1]: - - generic [ref=e2]: - - link "Skip to main content" [ref=e3] [cursor=pointer]: - - /url: "#content-area" - - generic [ref=e5]: - - generic [ref=e9]: - - generic [ref=e12]: - - generic [ref=e13]: - - link "OpenClaw home page light logo" [ref=e14] [cursor=pointer]: - - /url: / - - generic [ref=e15]: OpenClaw home page - - img "light logo" [ref=e16] - - button "US English" [ref=e18] [cursor=pointer]: - - img "US" [ref=e20] - - generic [ref=e22]: English - - img [ref=e23] - - button "Open search" [ref=e26] [cursor=pointer]: - - generic [ref=e27]: - - img [ref=e28] - - generic [ref=e31]: Search... - - generic [ref=e32]: ⌘K - - generic [ref=e33]: - - navigation [ref=e34]: - - list [ref=e35]: - - listitem [ref=e36]: - - link "GitHub" [ref=e37] [cursor=pointer]: - - /url: https://github.com/openclaw/openclaw - - img [ref=e38] - - text: GitHub - - listitem [ref=e39]: - - link "Releases" [ref=e40] [cursor=pointer]: - - /url: https://github.com/openclaw/openclaw/releases - - img [ref=e41] - - text: Releases - - listitem [ref=e42]: - - link "Discord" [ref=e43] [cursor=pointer]: - - /url: https://discord.com/invite/clawd - - img [ref=e44] - - text: Discord - - button "Toggle dark mode" [ref=e46] [cursor=pointer]: - - img [ref=e47] - - generic [ref=e55]: - - link "Get started" [ref=e56] [cursor=pointer]: - - /url: / - - text: Get started - - link "Install" [ref=e58] [cursor=pointer]: - - /url: /install - - text: Install - - link "Channels" [ref=e60] [cursor=pointer]: - - /url: /channels - - text: Channels - - link "Agents" [ref=e62] [cursor=pointer]: - - /url: /concepts/architecture - - text: Agents - - link "Tools & Plugins" [ref=e64] [cursor=pointer]: - - /url: /tools - - text: Tools & Plugins - - link "Models" [ref=e66] [cursor=pointer]: - - /url: /providers - - text: Models - - link "Platforms" [ref=e68] [cursor=pointer]: - - /url: /platforms - - text: Platforms - - link "Gateway & Ops" [ref=e70] [cursor=pointer]: - - /url: /gateway - - text: Gateway & Ops - - link "Reference" [ref=e72] [cursor=pointer]: - - /url: /cli - - text: Reference - - link "Help" [ref=e74] [cursor=pointer]: - - /url: /help - - text: Help - - generic [ref=e76]: - - generic [ref=e80]: - - generic [ref=e81]: - - heading "Overview" [level=5] [ref=e83] - - list [ref=e84]: - - listitem [ref=e85]: - - link "OpenClaw" [ref=e86] [cursor=pointer]: - - /url: / - - generic [ref=e89]: OpenClaw - - listitem [ref=e90]: - - link "Showcase" [ref=e91] [cursor=pointer]: - - /url: /start/showcase - - generic [ref=e94]: Showcase - - listitem [ref=e95]: - - link "Features" [ref=e96] [cursor=pointer]: - - /url: /concepts/features - - generic [ref=e99]: Features - - generic [ref=e100]: - - heading "First steps" [level=5] [ref=e102] - - list [ref=e103]: - - listitem [ref=e104]: - - link "Getting Started" [ref=e105] [cursor=pointer]: - - /url: /start/getting-started - - generic [ref=e108]: Getting Started - - listitem [ref=e109]: - - link "Onboarding Overview" [ref=e110] [cursor=pointer]: - - /url: /start/onboarding-overview - - generic [ref=e113]: Onboarding Overview - - listitem [ref=e114]: - - 'link "Onboarding: CLI" [ref=e115] [cursor=pointer]': - - /url: /start/wizard - - generic [ref=e118]: "Onboarding: CLI" - - listitem [ref=e119]: - - 'link "Onboarding: macOS App" [ref=e120] [cursor=pointer]': - - /url: /start/onboarding - - generic [ref=e123]: "Onboarding: macOS App" - - generic [ref=e124]: - - heading "Guides" [level=5] [ref=e126] - - list [ref=e127]: - - listitem [ref=e128]: - - link "Personal Assistant Setup" [ref=e129] [cursor=pointer]: - - /url: /start/openclaw - - generic [ref=e132]: Personal Assistant Setup - - listitem [ref=e133]: - - link "CLI reference" [ref=e134] [cursor=pointer]: - - /url: /start/wizard-cli-reference - - generic [ref=e137]: CLI reference - - listitem [ref=e138]: - - link "CLI automation" [ref=e139] [cursor=pointer]: - - /url: /start/wizard-cli-automation - - generic [ref=e142]: CLI automation - - generic [ref=e145]: - - banner [ref=e146]: - - generic [ref=e147]: - - generic [ref=e148]: First steps - - heading "Getting Started" [level=1] [ref=e150] - - generic [ref=e151]: - - generic [ref=e152]: Install OpenClaw, run onboarding, and chat with your AI assistant — all in about 5 minutes. By the end you will have a running Gateway, configured auth, and a working chat session. - - heading "Navigate to header What you need" [level=2] [ref=e153]: - - link "Navigate to header" [ref=e154] [cursor=pointer]: - - /url: "#what-you-need" - - img [ref=e156] - - generic [ref=e158] [cursor=pointer]: What you need - - list [ref=e159]: - - listitem [ref=e160]: - - strong [ref=e161]: Node.js - - text: — Node 24 recommended (Node 22.14+ also supported) - - listitem [ref=e162]: - - strong [ref=e163]: An API key - - text: from a model provider (Anthropic, OpenAI, Google, etc.) — onboarding will prompt you - - generic [ref=e164]: - - img "Tip" [ref=e166] - - generic [ref=e169]: - - text: Check your Node version with - - code [ref=e170]: node --version - - text: . - - strong [ref=e171]: "Windows users:" - - text: both native Windows and WSL2 are supported. WSL2 is more stable and recommended for the full experience. See - - link "Windows" [ref=e172] [cursor=pointer]: - - /url: /platforms/windows - - text: . Need to install Node? See - - link "Node setup" [ref=e173] [cursor=pointer]: - - /url: /install/node - - text: . - - heading "Navigate to header Quick setup" [level=2] [ref=e174]: - - link "Navigate to header" [ref=e175] [cursor=pointer]: - - /url: "#quick-setup" - - img [ref=e177] - - generic [ref=e179] [cursor=pointer]: Quick setup - - list [ref=e180]: - - listitem [ref=e181]: - - generic [ref=e184]: - - generic [ref=e185]: "1" - - link "Navigate to header" [ref=e187] [cursor=pointer]: - - /url: "#" - - img [ref=e189] - - generic [ref=e191]: - - paragraph [ref=e192]: Install OpenClaw - - generic [ref=e193]: - - generic [ref=e194]: - - tablist [ref=e195]: - - tab "macOS / Linux" [selected] [ref=e196] [cursor=pointer]: - - generic [ref=e197]: macOS / Linux - - tab "Windows (PowerShell)" [ref=e198] [cursor=pointer]: - - generic [ref=e199]: Windows (PowerShell) - - 'tabpanel "macOS / Linux Windows (PowerShell) Copy the contents from the code block curl -fsSL https://openclaw.ai/install.sh | bash Install Script Process Expand image: Install Script Process" [ref=e201]': - - generic [ref=e202]: - - button "Copy the contents from the code block" [ref=e205] [cursor=pointer]: - - img [ref=e206] - - code [ref=e212]: - - generic [ref=e213]: curl -fsSL https://openclaw.ai/install.sh | bash - - generic [ref=e214]: - - img "Install Script Process" [ref=e217] - - generic: - - 'button "Expand image: Install Script Process"' - - generic [ref=e218]: - - img "Note" [ref=e220] - - generic [ref=e223]: - - text: "Other install methods (Docker, Nix, npm):" - - link "Install" [ref=e224] [cursor=pointer]: - - /url: /install - - text: . - - listitem [ref=e225]: - - generic [ref=e228]: - - generic [ref=e229]: "2" - - link "Navigate to header" [ref=e231] [cursor=pointer]: - - /url: "#" - - img [ref=e233] - - generic [ref=e235]: - - paragraph [ref=e236]: Run onboarding - - generic [ref=e237]: - - generic [ref=e238]: - - button "Copy the contents from the code block" [ref=e241] [cursor=pointer]: - - img [ref=e242] - - code [ref=e248]: - - generic [ref=e249]: openclaw onboard --install-daemon - - generic [ref=e250]: The wizard walks you through choosing a model provider, setting an API key, and configuring the Gateway. It takes about 2 minutes. - - generic [ref=e251]: - - text: See - - link "Onboarding (CLI)" [ref=e252] [cursor=pointer]: - - /url: /start/wizard - - text: for the full reference. - - listitem [ref=e253]: - - generic [ref=e256]: - - generic [ref=e257]: "3" - - link "Navigate to header" [ref=e259] [cursor=pointer]: - - /url: "#" - - img [ref=e261] - - generic [ref=e263]: - - paragraph [ref=e264]: Verify the Gateway is running - - generic [ref=e265]: - - generic [ref=e266]: - - button "Copy the contents from the code block" [ref=e269] [cursor=pointer]: - - img [ref=e270] - - code [ref=e276]: - - generic [ref=e277]: openclaw gateway status - - generic [ref=e278]: You should see the Gateway listening on port 18789. - - listitem [ref=e279]: - - generic [ref=e282]: - - generic [ref=e283]: "4" - - link "Navigate to header" [ref=e285] [cursor=pointer]: - - /url: "#" - - img [ref=e287] - - generic [ref=e289]: - - paragraph [ref=e290]: Open the dashboard - - generic [ref=e291]: - - generic [ref=e292]: - - button "Copy the contents from the code block" [ref=e295] [cursor=pointer]: - - img [ref=e296] - - code [ref=e302]: - - generic [ref=e303]: openclaw dashboard - - generic [ref=e304]: This opens the Control UI in your browser. If it loads, everything is working. - - listitem [ref=e305]: - - generic [ref=e308]: - - generic [ref=e309]: "5" - - link "Navigate to header" [ref=e311] [cursor=pointer]: - - /url: "#" - - img [ref=e313] - - generic [ref=e315]: - - paragraph [ref=e316]: Send your first message - - generic [ref=e317]: - - generic [ref=e318]: Type a message in the Control UI chat and you should get an AI reply. - - generic [ref=e319]: - - text: Want to chat from your phone instead? The fastest channel to set up is - - link "Telegram" [ref=e320] [cursor=pointer]: - - /url: /channels/telegram - - text: (just a bot token). See - - link "Channels" [ref=e321] [cursor=pointer]: - - /url: /channels - - text: for all options. - - heading "Navigate to header What to do next" [level=2] [ref=e322]: - - link "Navigate to header" [ref=e323] [cursor=pointer]: - - /url: "#what-to-do-next" - - img [ref=e325] - - generic [ref=e327] [cursor=pointer]: What to do next - - generic [ref=e328]: - - link [ref=e329] [cursor=pointer]: - - link [ref=e331]: - - /url: /channels - - img [ref=e333] - - generic [ref=e334]: - - heading [level=2] [ref=e335]: Connect a channel - - generic [ref=e337]: WhatsApp, Telegram, Discord, iMessage, and more. - - link [ref=e338] [cursor=pointer]: - - link [ref=e340]: - - /url: /channels/pairing - - img [ref=e342] - - generic [ref=e343]: - - heading [level=2] [ref=e344]: Pairing and safety - - generic [ref=e346]: Control who can message your agent. - - link [ref=e347] [cursor=pointer]: - - link [ref=e349]: - - /url: /gateway/configuration - - img [ref=e351] - - generic [ref=e352]: - - heading [level=2] [ref=e353]: Configure the Gateway - - generic [ref=e355]: Models, tools, sandbox, and advanced settings. - - link [ref=e356] [cursor=pointer]: - - link [ref=e358]: - - /url: /tools - - img [ref=e360] - - generic [ref=e361]: - - heading [level=2] [ref=e362]: Browse tools - - generic [ref=e364]: Browser, exec, web search, skills, and plugins. - - group [ref=e365]: - - 'generic "Advanced: environment variables" [ref=e366] [cursor=pointer]': - - img [ref=e368] - - paragraph [ref=e370]: "Advanced: environment variables" - - generic [ref=e371]: - - link "Features" [ref=e372] [cursor=pointer]: - - /url: /concepts/features - - img [ref=e373] - - generic [ref=e375]: Features - - link "Onboarding Overview" [ref=e376] [cursor=pointer]: - - /url: /start/onboarding-overview - - generic [ref=e377]: Onboarding Overview - - img [ref=e378] - - contentinfo [ref=e380]: - - link "Powered by This documentation is built and hosted on Mintlify, a developer documentation platform" [ref=e383] [cursor=pointer]: - - /url: https://www.mintlify.com?utm_campaign=poweredBy&utm_medium=referral&utm_source=clawdhub - - generic [ref=e384]: Powered by - - img [ref=e385] - - generic [ref=e394]: This documentation is built and hosted on Mintlify, a developer documentation platform - - alert [ref=e395] \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c2b0d8..bdc0194 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. +## Unreleased + +### Changed + +- Switched the SimpleX runtime path to the official `simplex-chat` Node runtime and removed the CLI/WebSocket sidecar runtime path. +- Updated the package license to `AGPL-3.0-or-later` because the plugin now depends directly on the official SimpleX runtime package. +- Expanded channel config schema, manifest metadata, README, and docs for Node runtime storage fields. + ## [1.5.0] - 2026-04-26 ### Changed diff --git a/LICENSE b/LICENSE index 86584b2..0ad25db 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,661 @@ -MIT License - -Copyright (c) 2026 Bijaya Dangol - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/README.md b/README.md index e4250f4..b030888 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,15 @@ > **TL;DR:** An OpenClaw channel for SimpleX Chat: invite-based reachability, end-to-end encrypted messaging, and no public bot account or hosted bot platform in the middle. +> **Breaking in 2.0.0:** The plugin now uses the official `simplex-chat` Node runtime only. The old WebSocket/CLI runtime configuration is no longer supported. If you are upgrading from any pre-2.0.0 install, run `openclaw simplex migrate`; see the [Migration guide](https://openclaw-simplex.mintlify.app/guide/migration). + --- Most agent chat channels in OpenClaw assume a platform bot identity: a bot username, a phone number, an app registration, or some other platform-managed endpoint. This plugin takes a different route. -Within OpenClaw's channel ecosystem, it introduces a communication model where the contact path is created by a SimpleX invite or address link rather than by platform bot registration. You generate the link, you share it intentionally, and you revoke it when needed. +Within OpenClaw's channel ecosystem, it introduces a communication model where the contact path is created by a SimpleX one-time invite link or by the account's reusable SimpleX address rather than by platform bot registration. You generate the contact path, share it intentionally, and revoke the SimpleX address when it should no longer be usable. That changes where reachability comes from. The agent does not depend on a public bot-facing identity, and OpenClaw policy sits on top of that link-based contact surface instead of depending on platform-native bot identity. @@ -18,9 +20,9 @@ That changes where reachability comes from. The agent does not depend on a publi **Private, bounded agent access.** A lawyer spinning up an AI assistant for a single client engagement. An HR department running anonymous employee feedback. A therapist giving a patient after-hours access to a support agent. These all benefit from a channel where reachability starts with a link you intentionally shared, not with a public bot endpoint. -**Self-hosted transport, not only self-hosted inference.** If you're running OpenClaw on your own infrastructure and want the runtime and relay path under your control, SimpleX makes that possible. The CLI runs locally, the plugin connects to it over a local WebSocket, and SimpleX relays are self-hostable. If you run the runtime and relays inside your environment, the whole path can stay under your infrastructure. +**Self-hosted transport, not only self-hosted inference.** If you're running OpenClaw on your own infrastructure and want the runtime and relay path under your control, SimpleX makes that possible. By default the plugin uses the official SimpleX Node runtime in-process, and SimpleX relays are self-hostable. If you run the runtime and relays inside your environment, the whole path can stay under your infrastructure. -**Agent-to-agent transport without a platform account layer.** Two OpenClaw instances, each with this plugin, can talk over SimpleX without relying on a shared bot API platform, phone-number-based identity, or workspace app registration. If you run your own relays inside an isolated environment, the path can stay off third-party infrastructure. +**Agent-to-agent chat transport without a platform account layer.** Two OpenClaw instances, each with this plugin, can exchange chat messages over SimpleX without relying on a shared bot API platform, phone-number-based identity, or workspace app registration. This is chat transport, not an implementation of OpenClaw's native federated A2A/session protocol over SimpleX. **Peer access without platform account onboarding.** You can let someone interact with your agent without asking them to create an account on a platform you control. In the common case, a user installs SimpleX, scans your QR code, and the contact path exists. @@ -30,32 +32,20 @@ That changes where reachability comes from. The agent does not depend on a publi **Fresh install:** -1. Install `simplex-chat`: - -```bash -curl -o- https://raw.githubusercontent.com/simplex-chat/simplex-chat/stable/install.sh | bash -``` - -2. Start the WebSocket runtime: - -```bash -simplex-chat -p 5225 -``` - -3. Install and enable the plugin: +1. Install and enable the plugin: ```bash openclaw plugins install @dangoldbj/openclaw-simplex openclaw plugins enable openclaw-simplex ``` -4. Configure the channel: +2. Configure the channel with the official Node runtime: ```bash -openclaw channels add --channel openclaw-simplex --url ws://127.0.0.1:5225 +openclaw channels add --channel openclaw-simplex ``` -5. Generate an invite link: +3. Generate an invite link: ```bash openclaw simplex invite create --qr @@ -63,7 +53,7 @@ openclaw simplex invite create --qr Scan it with the SimpleX app. That's it: your agent is reachable over SimpleX without a public bot account. -**Upgrade from older `simplex` ids:** +**Upgrade from older installs:** ```bash openclaw simplex migrate @@ -91,10 +81,10 @@ Full docs: https://openclaw-simplex.mintlify.app/ | - account/runtime state | +------------+------------+ | - | WebSocket API + | Node runtime API v +-------------------------+ - | SimpleX CLI Runtime | + | SimpleX Node Runtime | | (simplex-chat) | +------------+------------+ | @@ -105,9 +95,9 @@ Full docs: https://openclaw-simplex.mintlify.app/ +-------------------------+ ``` -The plugin connects OpenClaw to a locally running `simplex-chat` process via its WebSocket API. Incoming messages are normalized into the standard OpenClaw message context. OpenClaw applies your policies (`dmPolicy`, `allowFrom`, group policy), runs the agent, and sends the response back through SimpleX. +The plugin connects OpenClaw to SimpleX through the official `simplex-chat` Node runtime by default. Incoming messages are normalized into the standard OpenClaw message context. OpenClaw applies your policies (`dmPolicy`, `allowFrom`, group policy), runs the agent, and sends the response back through SimpleX. -The key runtime boundary is explicit: OpenClaw does not own or supervise the `simplex-chat` process. You run it separately, point OpenClaw at its WebSocket endpoint, and the channel becomes operational. This gives you full control over the runtime lifecycle. +There is no separate `simplex-chat` CLI process and no local WebSocket API to expose or supervise. The SimpleX runtime lives inside the OpenClaw plugin process through the official Node/FFI package. --- @@ -116,75 +106,60 @@ The key runtime boundary is explicit: OpenClaw does not own or supervise the `si - Direct and group messaging over SimpleX - Media send/receive support - Pairing approval, exec approval auth, and allowlist enforcement -- Invite link, address link, and QR generation +- One-time invite link, SimpleX address, and QR generation - Shared `message` actions including `upload-file`, reactions, polls, edits, deletes, and group actions -- Plugin tools and gateway methods for invite and group administration +- Plugin tools and gateway methods for invites, runtime diagnostics, contact requests, group links, and operator-controlled link onboarding - Runtime status reporting, command handling, heartbeat readiness, and Control UI configuration -- External WebSocket runtime integration with explicit operator-managed lifecycle +- Official SimpleX Node runtime integration --- ## Install -### 1. Install SimpleX CLI (`simplex-chat`) - -Official installer: +### 1. Install in OpenClaw ```bash -curl -o- https://raw.githubusercontent.com/simplex-chat/simplex-chat/stable/install.sh | bash +openclaw plugins install @dangoldbj/openclaw-simplex ``` -If the official installer resolves the wrong Darwin/Linux target: +Enable: ```bash -curl -o- https://raw.githubusercontent.com/dangoldbj/simplex-chat/install-arch-matrix/install.sh | bash +openclaw plugins enable openclaw-simplex ``` -Verify: +Trust the plugin: ```bash -simplex-chat -h +openclaw config set plugins.allow "$( + (openclaw config get plugins.allow --json 2>/dev/null || echo '[]') \ + | jq -c '. + ["openclaw-simplex"] | unique' +)" --strict-json ``` -Start the long-running WebSocket process: - -```bash -simplex-chat -p 5225 -``` +This appends `openclaw-simplex` to the existing allowlist instead of replacing it. --- -### 2. Install in OpenClaw +### 2. Configure the default Node runtime ```bash -openclaw plugins install @dangoldbj/openclaw-simplex +openclaw channels add --channel openclaw-simplex ``` -This release no longer requires the unsafe-install override because the plugin does not spawn `simplex-chat`. +By default, the plugin uses the same database prefix as the SimpleX terminal CLI: `~/.simplex/simplex_v1` on Linux/macOS and `%APPDATA%/simplex/simplex_v1` on Windows. Override `dbFilePrefix` only when you want a separate bot identity or a named account. -Enable: - -```bash -openclaw plugins enable openclaw-simplex -``` - -Trust the plugin: +If your package manager blocks native dependency build scripts, approve the `simplex-chat` package build before starting OpenClaw. With pnpm, run: ```bash -openclaw config set plugins.allow "$( - (openclaw config get plugins.allow --json 2>/dev/null || echo '[]') \ - | jq -c '. + ["openclaw-simplex"] | unique' -)" --strict-json +pnpm approve-builds ``` -This appends `openclaw-simplex` to the existing allowlist instead of replacing it. - **Important:** - `openclaw plugins enable openclaw-simplex` only enables the plugin -- OpenClaw will not start the SimpleX channel until `channels.openclaw-simplex.connection` is configured -- Configure `channels.openclaw-simplex.connection.wsUrl` to point to the running SimpleX WebSocket endpoint -- If `simplex-chat` is not running at that endpoint, OpenClaw marks the channel disconnected and stores the error in channel status +- OpenClaw uses the SimpleX terminal CLI database prefix by default; set `channels.openclaw-simplex.dbFilePrefix` only for a separate profile +- The official Node runtime is the only supported runtime - The interactive `openclaw channels add` picker may not list this external plugin yet - The current Control UI SimpleX card is a config editor; it does not expose custom invite buttons for this plugin @@ -196,67 +171,66 @@ This appends `openclaw-simplex` to the existing allowlist instead of replacing i { "channels": { "openclaw-simplex": { - "enabled": true, - "connection": { - "wsUrl": "ws://127.0.0.1:5225" - }, - "allowFrom": ["*"] + "enabled": true } } } ``` -OpenClaw does not supervise `simplex-chat` for external plugins. If you want it to start automatically, run it as a host-managed user service such as `systemd --user` or `launchd`. +The SimpleX runtime runs inside the OpenClaw plugin process through the official Node library. + +With this minimal config, direct messages use the conservative default `dmPolicy: "pairing"`: a new contact can reach the SimpleX runtime, but OpenClaw will not run the agent for that sender until you approve the pairing request. Use `allowFrom` only when you want to pre-approve specific contacts, and use `allowFrom: ["*"]` only for deliberately broad reachability. Keep the split clear: -- `channels.openclaw-simplex` is for OpenClaw-side channel behavior and the WebSocket endpoint -- `simplex-chat` CLI flags such as `--device-name`, `--files-folder`, `--temp-folder`, proxy settings, relay selection, and `--maintenance` belong in the external runtime service definition +- `channels.openclaw-simplex` is for OpenClaw-side channel behavior and Node runtime storage +- OpenClaw still owns policy and agent execution; the plugin translates events and runtime API calls + +Docs: -For full persistent runtime examples and recommended startup-flag placement: https://openclaw-simplex.mintlify.app/guide/runtime-setup +- Runtime setup: https://openclaw-simplex.mintlify.app/guide/runtime-setup --- -## Invite and address management +## Operator CLI -The cleanest path is the plugin CLI: +The cleanest operator path is the plugin CLI: ```bash -# Create a one-time invite link (prints terminal QR with --qr) -openclaw simplex invite create --qr +# Runtime diagnostics +openclaw simplex runtime status +openclaw simplex runtime doctor -# List current invite and address state +# One-time invite links and SimpleX addresses +openclaw simplex invite create --qr openclaw simplex invite list - -# Show the current address link openclaw simplex address show --qr - -# Revoke the current address link openclaw simplex address revoke -``` -You can also use the `simplex-chat` console directly: +# Pending SimpleX contact requests +openclaw simplex requests list +openclaw simplex requests accept --contact-request-id +openclaw simplex requests reject --contact-request-id -| Command | Effect | -|---|---| -| `/c` | Create a one-time connect link | -| `/ad` | Create or return the account address link | -| `/show_address` | Show the current address link | -| `/delete_address` | Revoke the current address link | +# SimpleX groups and group invite links +openclaw simplex groups create --display-name "OpenClaw Ops" +openclaw simplex groups link create --group-id --role member --qr +openclaw simplex groups link revoke --group-id -For automation and integrations, OpenClaw exposes gateway methods: +# Operator-controlled link onboarding +openclaw simplex connect plan --link "" +openclaw simplex connect run --link "" +``` -- `simplex.invite.create` -- `simplex.invite.list` -- `simplex.invite.revoke` +For automation and integrations, OpenClaw exposes gateway methods for one-time invite and SimpleX address management, runtime diagnostics, pending contact requests, group links, and operator-controlled link onboarding. See the [Gateway Methods reference](https://openclaw-simplex.mintlify.app/reference/gateway-methods). --- -## Migration from `simplex` +## Migration -Older `0.x` installs used the `simplex` plugin and channel ids. +Older `0.x` installs used the `simplex` plugin and channel ids. Early `openclaw-simplex` installs could also contain legacy WebSocket/CLI runtime fields. Current installs use `openclaw-simplex` for both plugin and channel ids, with the official SimpleX Node runtime config shape. -If you are upgrading from `0.x`, run: +If you are upgrading either shape, run: ```bash openclaw simplex migrate @@ -274,23 +248,25 @@ This migrates: - `plugins.installs.simplex` → `plugins.installs.openclaw-simplex` - `plugins.allow` / `plugins.deny` entries from `simplex` → `openclaw-simplex` - `channels.simplex` → `channels.openclaw-simplex` +- legacy nested `connection.*` runtime fields to top-level account fields where applicable +- legacy WebSocket/CLI runtime fields such as `wsUrl`, `url`, `host`, `port`, `token`, `managed`, and `cliPath` out of the SimpleX channel config - OpenClaw pairing and allowlist state files under the OpenClaw state directory Current note: - The current plugin id is `openclaw-simplex` - The current channel id is `openclaw-simplex` -- Gateway method names remain `simplex.invite.*` +- Legacy invite gateway method names remain `simplex.invite.*` --- ## Security model -- Reachability starts with a SimpleX invite or address link +- Reachability starts with a SimpleX one-time invite link or SimpleX address - OpenClaw applies sender gating via `dmPolicy`, `allowFrom`, and group policy - Pairing-based approval can require explicit acceptance before a new contact can trigger the agent - Same-chat exec approvals are supported for authorized SimpleX senders -- OpenClaw does not auto-spawn `simplex-chat`; runtime control stays explicit +- The SimpleX runtime is embedded through the official Node library; there is no separate local WebSocket control surface - The plugin does not depend on a platform bot registry or hosted messaging API --- @@ -300,17 +276,13 @@ Current note: ```bash openclaw plugins list openclaw plugins info openclaw-simplex -openclaw channels add --channel openclaw-simplex --url ws://127.0.0.1:5225 +openclaw channels add --channel openclaw-simplex +openclaw simplex runtime doctor openclaw simplex migrate --dry-run openclaw simplex invite create --qr openclaw pairing list ``` -**Gateway methods:** -- `simplex.invite.create` -- `simplex.invite.list` -- `simplex.invite.revoke` - **Plugin tools:** - `simplex_invite_create` - `simplex_invite_list` @@ -326,8 +298,8 @@ openclaw pairing list | Symptom | Fix | |---|---| | Plugin not visible | Check `plugins.allow` and run `openclaw plugins list` | -| Channel not starting | Verify `channels.openclaw-simplex.connection` exists and points to a running SimpleX runtime | -| `Configured No` | Add explicit `channels.openclaw-simplex.connection` config; plugin defaults alone are not enough for startup | +| Channel not starting | Verify the SimpleX database path is writable and the native runtime can start | +| `Configured No` | Add the channel section with `openclaw channels add --channel openclaw-simplex` | | Inbound issues | Review `allowFrom`, `dmPolicy`, and group policy settings | | Media issues | Validate URLs and check size limits | @@ -336,8 +308,8 @@ openclaw pairing list ## Happy path 1. Open `Control → Channels → SimpleX` -2. Start `simplex-chat` separately and configure OpenClaw with its `wsUrl` -3. Run `openclaw simplex invite create --qr` to generate an invite +2. Configure OpenClaw with the Node runtime +3. Run `openclaw simplex invite create --qr` to generate a one-time invite 4. Scan the QR code with the SimpleX app 5. Approve pairing in OpenClaw 6. Send a message and verify the response diff --git a/biome.json b/biome.json index 1f3bf14..55750de 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.4.10/schema.json", + "$schema": "https://biomejs.dev/schemas/2.4.13/schema.json", "files": { "includes": ["**", "!**/dist"] }, diff --git a/docs/docs.json b/docs/docs.json index 7d60c99..ff5fed5 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -19,7 +19,6 @@ "pages": [ "guide/getting-started", "guide/why-simplex", - "guide/how-it-works", "guide/architecture", "guide/runtime-setup", "guide/security-model", @@ -29,12 +28,7 @@ }, { "group": "Reference", - "pages": [ - "reference/config", - "reference/gateway-methods", - "reference/example-commands", - "reference/screenshots" - ] + "pages": ["reference/config", "reference/gateway-methods", "reference/example-commands"] } ] }, diff --git a/docs/guide/architecture.mdx b/docs/guide/architecture.mdx index 7109c40..c7abcd3 100644 --- a/docs/guide/architecture.mdx +++ b/docs/guide/architecture.mdx @@ -1,11 +1,11 @@ --- title: Architecture -description: Understand the runtime boundaries between OpenClaw, the SimpleX channel plugin, and the external simplex-chat process including their responsibilities. +description: Understand the runtime boundaries between OpenClaw, the SimpleX channel plugin, and the official Node runtime. --- -The architecture is built around one rule: OpenClaw should enforce policy and route messages, but it should not own the simplex-chat process lifecycle for this plugin. +The architecture is built around one rule: OpenClaw enforces policy and routes messages; this plugin only translates between OpenClaw channel events/actions and SimpleX runtime API events. -That separation keeps the channel implementation explicit, makes host-level supervision a deployment choice, and avoids hiding the network/runtime boundary inside plugin startup code. +The runtime path uses the official simplex-chat Node package in-process. There is no separate CLI process or local WebSocket API. ## High-level diagram @@ -26,10 +26,10 @@ That separation keeps the channel implementation explicit, makes host-level supe | - account/runtime state | +------------+------------+ | - | WebSocket API + | Node runtime API v +-------------------------+ - | SimpleX CLI Runtime | + | SimpleX Node Runtime | | (simplex-chat) | +------------+------------+ | @@ -47,7 +47,7 @@ That separation keeps the channel implementation explicit, makes host-level supe Access checks stay in OpenClaw through dmPolicy, allowFrom, groupPolicy, pairing state, and command authorization. - The plugin connects to a separately running simplex-chat instance over WebSocket instead of spawning or supervising that process. + The official SimpleX Node runtime runs in the OpenClaw process. @@ -56,20 +56,22 @@ That separation keeps the channel implementation explicit, makes host-level supe Account-specific overrides live under channels.openclaw-simplex.accounts, while shared channel config remains at the channel root. - If the SimpleX WebSocket endpoint is unavailable, this channel reports a runtime error and disconnect state without taking down unrelated OpenClaw channels. + The Node runtime removes the unauthenticated local WebSocket surface, but it shares process fate with OpenClaw. ## Data flow -1. simplex-chat emits events through its WebSocket API. +1. The SimpleX runtime emits events through the Node API. 2. The plugin monitor parses those events into OpenClaw channel context. 3. OpenClaw applies policy checks and runs the agent. -4. The plugin translates replies, edits, reactions, media sends, and group actions back into SimpleX commands. +4. The plugin translates replies, edits, reactions, media sends, and group actions into typed SimpleX runtime API calls. ## Implementation surfaces -- src/channel/simplex-monitor.ts: inbound SimpleX event parsing and message normalization. -- src/channel/simplex-send.ts and src/channel/simplex-outbound.ts: outbound message/action translation. -- src/simplex/simplex-ws-client.ts and src/simplex/simplex-transport.ts: WebSocket transport and command execution. +- src/channel/events/simplex-monitor.ts: inbound SimpleX event parsing and message normalization. +- src/channel/events/simplex-inbound-files.ts: incoming file lifecycle, delayed dispatch, and reply delivery after file resolution. +- src/channel/messaging/simplex-send.ts and src/channel/messaging/simplex-outbound.ts: outbound message/action translation. +- src/simplex/runtime/client.ts: official Node runtime adapter. +- src/simplex/runtime/transport.ts: active-client registry and runtime API execution. - channels.openclaw-simplex and channels.openclaw-simplex.accounts: shared and per-account runtime config. diff --git a/docs/guide/getting-started.mdx b/docs/guide/getting-started.mdx index eb8426d..04fb145 100644 --- a/docs/guide/getting-started.mdx +++ b/docs/guide/getting-started.mdx @@ -1,47 +1,15 @@ --- title: Getting Started -description: Install simplex-chat, configure the OpenClaw SimpleX plugin, generate your first invite link, and pair your first contact with the agent step by step. +description: Install the OpenClaw SimpleX plugin, start the official Node runtime, generate your first one-time invite link, and pair your first contact with the agent step by step. --- This path gets you from zero to the first invited contact talking to your OpenClaw agent over SimpleX. - - - Install the official simplex-chat CLI: - - ```bash - curl -o- https://raw.githubusercontent.com/simplex-chat/simplex-chat/stable/install.sh | bash - ``` - - Verify the CLI: - - ```bash - simplex-chat -h - ``` - - - If the official installer picks the wrong Darwin/Linux build for your host, use the temporary arch-matrix installer: - - ```bash - curl -o- https://raw.githubusercontent.com/dangoldbj/simplex-chat/install-arch-matrix/install.sh | bash - ``` - - - - - Start the WebSocket runtime in a separate terminal: - - ```bash - simplex-chat -p 5225 - ``` - - Expected result: simplex-chat stays in the foreground and serves the WebSocket API on port 5225. - - - This is a long-running foreground process. If you want it to start automatically, use the host-managed service examples in Runtime Setup. - - + + Breaking in 2.0.0: OpenClaw SimpleX now uses the official simplex-chat Node runtime only. The old WebSocket/CLI runtime configuration is no longer supported. If you are upgrading from any pre-2.0.0 install, run openclaw simplex migrate before relying on the channel; see the [Migration guide](/guide/migration). + + Install the plugin in OpenClaw: @@ -67,35 +35,30 @@ This path gets you from zero to the first invited contact talking to your OpenCl - Point OpenClaw at the local SimpleX WebSocket endpoint: + Add the channel: ```bash - openclaw channels add --channel openclaw-simplex --url ws://127.0.0.1:5225 + openclaw channels add --channel openclaw-simplex ``` - That command writes channel config equivalent to: + That writes channel config equivalent to: ```json { "channels": { "openclaw-simplex": { - "enabled": true, - "connection": { - "wsUrl": "ws://127.0.0.1:5225" - }, - "dmPolicy": "pairing", - "allowFrom": ["*"] + "enabled": true } } } ``` - OpenClaw will not start the channel until channels.openclaw-simplex.connection exists. If simplex-chat is not running at that endpoint, OpenClaw will mark the channel disconnected and record the connection error in channel status. + By default, direct messages use dmPolicy: "pairing". A new SimpleX contact can reach the runtime, but OpenClaw will not run the agent until you approve the pairing request. The plugin also uses the same database prefix as the SimpleX terminal CLI: ~/.simplex/simplex_v1 on Linux/macOS and %APPDATA%/simplex/simplex_v1 on Windows. Set dbFilePrefix only when you want a separate bot identity or a named account. - + Confirm the plugin is installed and enabled: ```bash @@ -114,7 +77,7 @@ This path gets you from zero to the first invited contact talking to your OpenCl openclaw simplex invite create --qr ``` - Expected result: the command prints a SimpleX invite link, and --qr renders a scannable QR code in the terminal. + Expected result: the command prints a SimpleX one-time invite link, and --qr renders a scannable QR code in the terminal. In Control UI, you can also open Control -> Channels -> SimpleX to inspect the channel config and runtime state. @@ -142,13 +105,11 @@ openclaw pairing approve openclaw-simplex 5. Send another message in SimpleX and verify the agent responds. -For a visual walkthrough, see [Screenshots](/reference/screenshots). - -For recurring address links, invite listing, revoke flows, and automation APIs, see [Example Commands](/reference/example-commands) and [Gateway Methods](/reference/gateway-methods). +For the reusable SimpleX address, address display, revoke flows, and automation APIs, see [Example Commands](/reference/example-commands) and [Gateway Methods](/reference/gateway-methods). -## Upgrading from an older `simplex` install +## Upgrading from an older install -If you are upgrading from an older `simplex` plugin/channel install, run the migration helper before switching your config and commands to `openclaw-simplex`: +If you are upgrading from an older `simplex` plugin/channel install, or from an early `openclaw-simplex` install that used WebSocket/CLI runtime fields, run the migration helper before relying on the channel: ```bash openclaw simplex migrate diff --git a/docs/guide/how-it-works.mdx b/docs/guide/how-it-works.mdx deleted file mode 100644 index c10cf3c..0000000 --- a/docs/guide/how-it-works.mdx +++ /dev/null @@ -1,54 +0,0 @@ ---- -title: How It Works -description: Trace the full message lifecycle from an incoming SimpleX contact through the plugin WebSocket bridge, OpenClaw policy checks, and agent response delivery. ---- - -The runtime model is intentionally split: OpenClaw owns routing and policy, this plugin translates channel behavior, and simplex-chat remains a separately managed process with a WebSocket API. - -The invite or address link is the access boundary. Once a sender reaches the agent through SimpleX, OpenClaw still applies pairing approval, allowlists, and group policy before that sender can trigger agent work. - - - - OpenClaw registers the openclaw-simplex channel. For disabled or unconfigured channels, it can use the lightweight setup entry before loading the full runtime entry. - - - - OpenClaw only starts the channel after explicit channels.openclaw-simplex.connection config exists. The plugin then connects to the separately running simplex-chat WebSocket API. - - - - Incoming SimpleX events are parsed into OpenClaw message context, including peer/group routing, message bodies, media references, reply context, and runtime status updates. - - - - OpenClaw evaluates DM policy, allowlists, group policy, pairing state, command authorization, and same-chat exec approval authorization. In pairing mode, newly discovered contacts must be approved before they become trusted senders. - - - - Message actions, media sends, polls, edits, deletes, reactions, and group operations are translated back into SimpleX commands and sent through the same WebSocket connection. - - - - - OpenClaw does not spawn simplex-chat, does not create a hosted bot identity for this channel, and does not currently expose plugin-defined invite buttons on the external plugin channel card. - - -## What the plugin surfaces - - - - Channel status snapshots, health state, disconnect tracking, and runtime error surfaces. - - - Default-account behavior and per-account overrides under the shared openclaw-simplex channel config. - - - - - - Send, react, poll, edit, delete, upload-file, and group management actions. - - - Directory lookups, target resolution, heartbeat readiness, and gateway invite methods for developer-controlled onboarding and automation flows. - - diff --git a/docs/guide/migration.mdx b/docs/guide/migration.mdx index af85a98..6627e8a 100644 --- a/docs/guide/migration.mdx +++ b/docs/guide/migration.mdx @@ -1,31 +1,35 @@ --- title: Migration to openclaw-simplex -description: Migrate from the legacy simplex plugin and channel identifiers to the renamed openclaw-simplex format introduced in version 1.0.0 with step-by-step commands. +description: Migrate legacy SimpleX installs to the openclaw-simplex id and the current Node runtime config shape with step-by-step commands. --- -Use this guide only if you previously configured or paired the plugin under the old simplex ids. For a fresh install, start with [Getting Started](/guide/getting-started). +Use this guide if you previously configured or paired the plugin under the old simplex ids, or if you already used openclaw-simplex with the old WebSocket/CLI runtime config. For a fresh install, start with [Getting Started](/guide/getting-started). -## What changed in `1.0.0` + + Breaking in 2.0.0: the SimpleX runtime model changed from the old WebSocket/CLI setup to the official simplex-chat Node runtime. Pre-2.0.0 runtime fields such as wsUrl, url, host, port, token, managed, and cliPath are no longer supported. + -- plugin id: `simplex` -> `openclaw-simplex` -- channel id: `simplex` -> `openclaw-simplex` -- pairing approval commands now use `openclaw-simplex` +## What changed + +- Legacy `0.x` installs used plugin id `simplex` and channel id `simplex`; current installs use `openclaw-simplex` for both. +- Version `2.0.0` replaced the old WebSocket/CLI runtime setup with the official SimpleX Node runtime. +- Early `openclaw-simplex` installs could still contain WebSocket/CLI runtime fields; current installs use the Node runtime config shape. +- Pairing approval commands now use `openclaw-simplex`. - Gateway method names did not change. Programmatic invite flows still use simplex.invite.create, simplex.invite.list, and simplex.invite.revoke. + Legacy invite gateway method names did not change. Programmatic invite flows still use simplex.invite.create, simplex.invite.list, and simplex.invite.revoke. -The migration helper updates config keys and stored pairing/allowlist state so existing approvals can carry forward. +The migration helper is idempotent and covers two independent migrations: - - - Run simplex-chat yourself and expose the WebSocket endpoint the channel should use: +- It renames legacy config and state from simplex to openclaw-simplex so existing approvals can carry forward. +- It normalizes existing openclaw-simplex channel config for the Node runtime by removing legacy WebSocket/CLI fields such as wsUrl, url, host, port, token, managed, and cliPath. - ```bash - simplex-chat -p 5225 - ``` +Policy fields and multi-account settings remain in place. If the helper prints No changes were needed, neither the old id shape nor the old runtime config shape was present. - Make sure your config points to that endpoint under channels.openclaw-simplex.connection.wsUrl. + + + New installs use the official SimpleX Node runtime. Legacy WebSocket runtime config is no longer part of the supported runtime model, and openclaw simplex migrate strips those old runtime fields from both root and per-account SimpleX config. @@ -41,7 +45,7 @@ The migration helper updates config keys and stored pairing/allowlist state so e openclaw simplex migrate ``` - This rewrites the old simplex config keys and renames the related pairing/allowlist state files in the OpenClaw state directory. + This rewrites the old simplex config keys, normalizes the runtime config for the Node runtime, and renames the related pairing/allowlist state files in the OpenClaw state directory. @@ -54,7 +58,7 @@ The migration helper updates config keys and stored pairing/allowlist state so e If you need to re-add the channel explicitly, use the new channel id: ```bash - openclaw channels add --channel openclaw-simplex --url ws://127.0.0.1:5225 + openclaw channels add --channel openclaw-simplex ``` Pairing approval also uses the new channel id: @@ -75,9 +79,7 @@ After migration, the channel should be configured under openclaw-simplexopenclaw-simplex `plugins.installs.openclaw-simplex` - `plugins.allow` / `plugins.deny` - `channels.simplex` -> `channels.openclaw-simplex` +- legacy nested `connection.*` runtime fields are moved to top-level account fields +- legacy SimpleX WebSocket/CLI runtime fields are removed from root and per-account SimpleX config - OpenClaw pairing and allowlist state files under the OpenClaw state directory diff --git a/docs/guide/runtime-setup.mdx b/docs/guide/runtime-setup.mdx index 1298a70..db57fb6 100644 --- a/docs/guide/runtime-setup.mdx +++ b/docs/guide/runtime-setup.mdx @@ -1,153 +1,61 @@ --- title: Runtime Setup -description: Configure simplex-chat as a persistent systemd or launchd service, set the WebSocket endpoint, and connect multiple SimpleX accounts to OpenClaw. +description: Configure SimpleX Node runtime storage and multi-account SimpleX identities for OpenClaw. --- -Use this page after the first setup is already working and you want to make the SimpleX runtime persistent or split multiple accounts across separate runtimes. For the first install and pairing flow, start with [Getting Started](/guide/getting-started). - -## Keep `simplex-chat` running - -If you want the SimpleX runtime to start automatically on login or machine boot, let the host OS supervise it and keep OpenClaw focused on the channel connection itself. - -## Decide which settings go where - -Use this rule: - -- put OpenClaw channel behavior in channels.openclaw-simplex -- put simplex-chat process startup flags in the supervised service command line - -Plugin-side settings: - -- connection.wsUrl -- connection.connectTimeoutMs -- connection.autoAcceptFiles -- dmPolicy, allowFrom, groupPolicy - -Runtime-side startup flags: - -- relay and proxy selection: --server, --xftp-server, --socks-proxy, --host-mode, --smp-proxy -- local storage/layout: --database, --files-folder, --temp-folder, --log-file -- runtime process behavior: --device-name, --maintenance, --mute, --mark-read - -### Create the service - - - - ```bash - mkdir -p ~/.config/systemd/user - cat > ~/.config/systemd/user/simplex-chat.service <<'EOF' - [Unit] - Description=SimpleX Chat WebSocket Runtime - After=network-online.target - - [Service] - ExecStart=%h/.local/bin/simplex-chat -p 5225 --device-name "OpenClaw SimpleX" --files-folder %h/.simplex/files --temp-folder %h/.simplex/tmp - Restart=on-failure - RestartSec=5 - - [Install] - WantedBy=default.target - EOF - ``` - - - Adjust the ExecStart path if simplex-chat is installed somewhere other than %h/.local/bin/simplex-chat. The extra flags above are examples of runtime-owned settings that do not belong in OpenClaw channel config. - - - - ```bash - mkdir -p ~/Library/LaunchAgents - cat > ~/Library/LaunchAgents/ai.openclaw.simplex-chat.plist <<'EOF' - - - - - Label - ai.openclaw.simplex-chat - ProgramArguments - - /usr/local/bin/simplex-chat - -p - 5225 - --device-name - OpenClaw SimpleX - --files-folder - /Users/YOUR_USER/.simplex/files - --temp-folder - /Users/YOUR_USER/.simplex/tmp - - RunAtLoad - - KeepAlive - - - - EOF - ``` - - - Adjust /usr/local/bin/simplex-chat if the binary is installed elsewhere on your system, and replace YOUR_USER in the folder paths. - - - - -### Start it - - - - ```bash - systemctl --user daemon-reload - systemctl --user enable --now simplex-chat.service - ``` - - - ```bash - launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/ai.openclaw.simplex-chat.plist - launchctl kickstart -k gui/$(id -u)/ai.openclaw.simplex-chat - ``` - - - -### Check status - - - - ```bash - systemctl --user status simplex-chat.service - ``` - - Expected result: the service status should be active (running). - - - ```bash - launchctl print gui/$(id -u)/ai.openclaw.simplex-chat - ``` - - Expected result: the launch agent should appear under that label and report a running PID. - - - -## Common startup flag patterns - -These are reasonable patterns to consider when you run simplex-chat as an external service: - -- fixed local identity label: - --device-name "OpenClaw SimpleX" -- explicit file locations: - --files-folder ~/.simplex/files --temp-folder ~/.simplex/tmp -- custom relay policy: - --server "smp1.example.com smp2.example.com" --xftp-server "xftp1.example.com" -- SOCKS/Tor routing: - --socks-proxy :9050 --host-mode onion --required-host-mode -- stricter message routing: - --smp-proxy always --smp-proxy-fallback no - - - Do not copy every CLI flag into the service blindly. Flags such as proxy mode, relay selection, maintenance mode, and custom database paths materially change runtime behavior and should be chosen deliberately for your deployment. - - -## Maintenance mode - -If you need to bring up the runtime without immediately serving chat traffic, run it with --maintenance and start chat manually inside the runtime later. - -This is a simplex-chat operational mode, not an OpenClaw channel config field, so it belongs in the service command only when you intentionally want that behavior. +Use this page after the first setup is already working and you want to tune SimpleX runtime storage or split multiple SimpleX identities across accounts. For the first install and pairing flow, start with [Getting Started](/guide/getting-started). + +## Node runtime storage + +This plugin uses the official simplex-chat Node package in the OpenClaw process. There is no separate simplex-chat CLI process and no local WebSocket endpoint. + +```json +{ + "channels": { + "openclaw-simplex": { + "enabled": true + } + } +} +``` + +By default, the plugin uses the same database prefix as the SimpleX terminal CLI: `~/.simplex/simplex_v1` on Linux/macOS and `%APPDATA%/simplex/simplex_v1` on Windows. The official Node API stores SQLite databases as `_chat.db` and `_agent.db`, so the default Linux/macOS files are `~/.simplex/simplex_v1_chat.db` and `~/.simplex/simplex_v1_agent.db`. + +## Multiple accounts + +Give each account its own database file prefix so each SimpleX identity has isolated local state. + +```json +{ + "channels": { + "openclaw-simplex": { + "enabled": true, + "accounts": { + "ops": { + "enabled": true, + "dbFilePrefix": "~/.simplex/openclaw-ops", + "displayName": "OpenClaw Ops" + }, + "support": { + "enabled": true, + "dbFilePrefix": "~/.simplex/openclaw-support", + "displayName": "OpenClaw Support" + } + } + } + } +} +``` + +## Runtime fields + +- dbFilePrefix: optional SQLite database file prefix used by the SimpleX Node runtime. Omit it for the SimpleX terminal CLI default. +- displayName: display name used when the runtime creates a SimpleX profile. +- fullName: full name used when the runtime creates a SimpleX profile. +- migrationConfirmation: database migration behavior, one of yesUp, yesUpDown, console, or error. +- connectTimeoutMs: runtime connection/start timeout. +- autoAcceptFiles: whether incoming file transfers should be auto-accepted. + +## Operational notes + +The SimpleX runtime shares process fate with OpenClaw. That is the intended official integration path and avoids a separate unauthenticated WebSocket control surface. Treat the database files and file-transfer directories as sensitive local state. diff --git a/docs/guide/security-model.mdx b/docs/guide/security-model.mdx index f7bc778..f16c82f 100644 --- a/docs/guide/security-model.mdx +++ b/docs/guide/security-model.mdx @@ -1,15 +1,15 @@ --- title: Security Model -description: Learn how invite-link access control, OpenClaw pairing and allowlist policies, and simplex-chat runtime trust boundaries work together to secure the channel. +description: Learn how invite-link access control, OpenClaw pairing and allowlist policies, and SimpleX runtime trust boundaries work together to secure the channel. --- -The core security property of this channel is that reachability starts from an invitation, not from a public bot identity. OpenClaw then adds policy checks before a sender can trigger agent work. +The core security property of this channel is that reachability starts from a SimpleX contact path, not from a public bot identity. That path can be a one-time invite link for bounded onboarding or the account's reusable SimpleX address for ongoing reachability. OpenClaw then adds policy checks before a sender can trigger agent work. There are three boundaries to keep straight: -- the SimpleX invite or address link controls who can reach the agent at all +- the SimpleX one-time invite link or reusable SimpleX address controls who can reach the agent at all - OpenClaw policy controls who is allowed to trigger agent work after a message arrives -- the external simplex-chat runtime boundary controls where process and relay trust live +- the SimpleX runtime boundary controls where process, storage, and relay trust live Start conservative: use dmPolicy: "pairing" and groupPolicy: "allowlist" until you have a reason to widen access. @@ -37,20 +37,23 @@ There are three boundaries to keep straight: ## Operational boundaries -- OpenClaw only talks to an already-running simplex-chat endpoint over WebSocket. +- The plugin uses the official simplex-chat Node package in the OpenClaw process, avoiding a separate unauthenticated local WebSocket control surface. +- A fatal SimpleX native/runtime failure can affect the OpenClaw process because they share process fate. - You decide where the runtime runs, which relay path it uses, and whether relays are public or self-hosted. -- If you need a fully internal deployment, keep simplex-chat and your relays inside that network boundary. -- External runtime mode is the supported deployment model for this plugin. OpenClaw does not spawn or supervise simplex-chat here. +- If you need a fully internal deployment, keep the runtime database and your relays inside that network boundary. ## What this does not protect against -- Anyone with a currently valid invite or address link can attempt to contact the agent. Use pairing and allowlists if that link may be shared beyond your intended audience. -- If you set dmPolicy: "open" and allowFrom: ["*"], a shared link becomes broad access to the agent. +- Anyone with a currently valid one-time invite link or SimpleX address can attempt to contact the agent. Use pairing and allowlists if that contact path may be shared beyond your intended audience. +- If you set dmPolicy: "open", a shared link becomes broad access to the agent. Use this only when that is intentional. - If simplex-chat uses public relays, traffic still traverses third-party relay infrastructure even though message contents are end-to-end encrypted. +- SimpleX E2EE protects transport to the local runtime. Messages are plaintext inside the SimpleX runtime, this plugin, OpenClaw, logs, and any agent tools that receive them. ## Recommended production posture - Start with `dmPolicy: "pairing"` and `groupPolicy: "allowlist"`. - Keep `allowFrom`/`groupAllowFrom` narrow. -- Prefer one-time invite links for onboarding and revoke address links when they are no longer needed. +- Prefer one-time invite links for bounded onboarding and revoke the SimpleX address when ongoing reachability is no longer needed. +- Protect the SimpleX database and file-transfer directories as sensitive local state. +- Keep incoming media capped with `mediaMaxMb`; disable `autoAcceptFiles` if your agent should not receive files. - Monitor status snapshots and logs for repeated authorization failures. diff --git a/docs/guide/troubleshooting.mdx b/docs/guide/troubleshooting.mdx index 22f5ca6..f774f7f 100644 --- a/docs/guide/troubleshooting.mdx +++ b/docs/guide/troubleshooting.mdx @@ -1,12 +1,12 @@ --- title: Troubleshooting -description: Diagnose and fix common OpenClaw SimpleX problems including WebSocket connection failures, plugin trust errors, policy rejections, and pairing issues. +description: Diagnose and fix common OpenClaw SimpleX problems including runtime startup failures, plugin trust errors, policy rejections, and pairing issues. --- -Most failures fall into one of three buckets: the plugin is not trusted/enabled, OpenClaw cannot reach the external simplex-chat WebSocket endpoint, or policy settings are correctly rejecting a sender you expected to allow. +Most failures fall into one of three buckets: the plugin is not trusted/enabled, the SimpleX Node runtime cannot start, or policy settings are correctly rejecting a sender you expected to allow. - Two common mistakes: simplex-chat is listening on one port but wsUrl points to another, or dmPolicy: "pairing" is enabled but the sender has not been approved yet. + Two common mistakes: the channel section is missing, or dmPolicy: "pairing" is enabled but the sender has not been approved yet. ## Plugin not listed @@ -34,28 +34,35 @@ If the package is installed but not allowlisted, OpenClaw may still refuse to lo ## Channel fails to start -What to check first: simplex-chat must be running on the same WebSocket endpoint that channels.openclaw-simplex.connection.wsUrl points to. +What to check first: channels.openclaw-simplex must exist. The simplest valid config is: -Start the runtime manually if needed: - -```bash -simplex-chat -p 5225 +```json +{ + "channels": { + "openclaw-simplex": { + "enabled": true + } + } +} ``` -Then verify the configured channel endpoint: +What to verify: + +- the SimpleX default database path is writable, or dbFilePrefix points to a writable prefix +- the simplex-chat package native build was approved by your package manager +- channel status shows the latest runtime startup error + +Run the runtime doctor from the same OpenClaw environment: ```bash -openclaw channels add --channel openclaw-simplex --url ws://127.0.0.1:5225 +openclaw simplex runtime doctor ``` -What to verify: - -- channels.openclaw-simplex.connection exists -- wsUrl matches the port where simplex-chat is actually listening -- if you use wsHost/wsPort instead, those values match the runtime endpoint -- channel status shows the latest connection error if the WebSocket handshake fails +With pnpm, if native build scripts were blocked during install, run: -For persistent startup, run simplex-chat under a host-managed service. See [Runtime Setup](/guide/runtime-setup). +```bash +pnpm approve-builds +``` ## Inbound messages dropped @@ -80,7 +87,7 @@ openclaw pairing approve openclaw-simplex ## Invite methods failing -Invite commands and gateway methods require more than plugin installation: the channel account must be configured, enabled, and connected to a live simplex-chat runtime. +Invite commands and gateway methods require more than plugin installation: the channel account must be configured, enabled, and connected to a live SimpleX runtime. Use the plugin CLI first: @@ -90,9 +97,10 @@ openclaw simplex invite create --qr If that fails: -- confirm the account's connection.wsUrl points at a running runtime +- confirm the Node runtime has writable storage - check whether the channel account is enabled - inspect the latest channel status/runtime error in OpenClaw +- run openclaw simplex runtime status to verify the active account and last SimpleX error - if you are automating through gateway methods, verify the same account works through the plugin CLI first ## Media issues @@ -104,12 +112,6 @@ If that fails: ## Useful diagnostic commands -Start the runtime in the foreground and watch connection behavior directly: - -```bash -simplex-chat -p 5225 -``` - List installed plugins: ```bash @@ -122,16 +124,34 @@ Inspect this plugin's enable/allow state: openclaw plugins info openclaw-simplex ``` -Write the channel endpoint config explicitly: +Write Node runtime channel config explicitly: + +```bash +openclaw channels add --channel openclaw-simplex +``` + +Show runtime status: + +```bash +openclaw simplex runtime status +``` + +Run runtime diagnostics: + +```bash +openclaw simplex runtime doctor +``` + +List pending SimpleX contact requests: ```bash -openclaw channels add --channel openclaw-simplex --url ws://127.0.0.1:5225 +openclaw simplex requests list ``` ## Where to inspect errors - In Control UI, open Control -> Channels -> SimpleX and inspect the channel status and connection state. - Use openclaw plugins info openclaw-simplex to verify plugin enable/allow state. -- Check the terminal or service logs for the simplex-chat process itself, especially if the WebSocket runtime exits or cannot bind the expected port. +- Check OpenClaw logs for SimpleX native/runtime startup errors. -For persistent runtime startup and service examples, see [Runtime Setup](/guide/runtime-setup). +For runtime storage setup, see [Runtime Setup](/guide/runtime-setup). diff --git a/docs/guide/why-simplex.mdx b/docs/guide/why-simplex.mdx index 98ffba8..6ead48a 100644 --- a/docs/guide/why-simplex.mdx +++ b/docs/guide/why-simplex.mdx @@ -5,7 +5,7 @@ description: Discover why SimpleX gives OpenClaw a private, invitation-first mes Most OpenClaw channels start from a registered platform identity: a bot username, a phone number, or an application account that lives inside someone else's platform. -This plugin takes a different shape. With SimpleX, the agent becomes reachable when you hand someone a link. There is no phone-number binding and no hosted bot account to provision before the first conversation starts. +This plugin takes a different shape. With SimpleX, the agent becomes reachable when you hand someone a one-time invite link or share the account's reusable SimpleX address. There is no phone-number binding and no hosted bot account to provision before the first conversation starts. That makes the channel especially useful for OpenClaw deployments where privacy, local control, and explicit network boundaries matter. @@ -13,7 +13,7 @@ The point is not that this channel replaces every platform-backed integration. I - Create a one-time connect link or an address link, share it only with intended users, and revoke it when that access should disappear. + Create a one-time connect link for bounded onboarding, or share a reusable SimpleX address when you want ongoing reachability. No phone number, no bot username, and no bot registration step before your OpenClaw agent can receive a message. @@ -22,7 +22,7 @@ The point is not that this channel replaces every platform-backed integration. I - Run simplex-chat yourself, choose where the runtime and relay path live, and keep OpenClaw policy enforcement local. + Use the official SimpleX Node runtime and choose where the local database and relay path live. Pairing approval, exec approvals, allowlists, invite helpers, media support, reactions, polls, and channel status all exist in the plugin, not in ad hoc glue code. @@ -31,13 +31,14 @@ The point is not that this channel replaces every platform-backed integration. I ## What the plugin provides -A SimpleX channel backed by a local simplex-chat WebSocket runtime: +A SimpleX channel backed by the official Node runtime: - send/receive (text and media) - pairing with allowlist enforcement and same-chat exec approvals - shared `message` actions, including `upload-file`, reactions, polls, edits, deletes, and group actions - plugin tools for invite generation/list/revoke and group administration -- invite link and QR generation +- gateway methods for runtime diagnostics, contact-request review, group-link lifecycle, and operator link onboarding +- one-time invite link, SimpleX address, group-link, and QR generation - runtime status and heartbeat readiness support - Control UI configuration @@ -50,13 +51,13 @@ A SimpleX channel backed by a local simplex-chat WebSocket runtime: ## Why this plugin matters -Without this plugin, using SimpleX with OpenClaw usually means custom integration work around event parsing, outbound command translation, pairing state, and invite management. This package turns that into a standard channel implementation. +Without this plugin, using SimpleX with OpenClaw usually means custom integration work around event parsing, outbound runtime API calls, pairing state, and invite management. This package turns that into a standard channel implementation. The contribution is not just “another channel”. It adds a channel model that is structurally different from bot-account integrations: - no phone number requirement - no hosted bot account or bot API dependency -- access starts from an invitation link, not a public platform identity +- access starts from a one-time invite link or SimpleX address, not a public platform bot identity Low risk to existing OpenClaw channels: the implementation stays isolated and is only active when openclaw-simplex is configured and enabled. diff --git a/docs/images/1-time-link-generation.png b/docs/images/1-time-link-generation.png deleted file mode 100644 index 03a9926..0000000 Binary files a/docs/images/1-time-link-generation.png and /dev/null differ diff --git a/docs/images/approved.png b/docs/images/approved.png deleted file mode 100644 index ad04f86..0000000 Binary files a/docs/images/approved.png and /dev/null differ diff --git a/docs/images/chat.png b/docs/images/chat.png deleted file mode 100644 index 180e62c..0000000 Binary files a/docs/images/chat.png and /dev/null differ diff --git a/docs/images/control-ui.png b/docs/images/control-ui.png deleted file mode 100644 index ec3030f..0000000 Binary files a/docs/images/control-ui.png and /dev/null differ diff --git a/docs/images/pairing-list.png b/docs/images/pairing-list.png deleted file mode 100644 index 30b619d..0000000 Binary files a/docs/images/pairing-list.png and /dev/null differ diff --git a/docs/images/pairing-request.png b/docs/images/pairing-request.png deleted file mode 100644 index bfd2376..0000000 Binary files a/docs/images/pairing-request.png and /dev/null differ diff --git a/docs/index.mdx b/docs/index.mdx index 53b0891..21e9a9d 100644 --- a/docs/index.mdx +++ b/docs/index.mdx @@ -6,16 +6,16 @@ description: Connect your OpenClaw agent to SimpleX for invitation-first messagi Most agent chat channels in OpenClaw assume a platform bot identity: a bot username, a phone number, an app registration, or some other platform-managed endpoint. -Within OpenClaw's channel ecosystem, this plugin enables a communication model that does not rely on platform identity or bot registration. With SimpleX, the invite or address link becomes the access boundary: generate it, share it intentionally, revoke it when needed, and the agent does not expose a platform-discoverable bot identity. +Within OpenClaw's channel ecosystem, this plugin enables a communication model that does not rely on platform identity or bot registration. With SimpleX, reachability starts from either a one-time invite link or the account's reusable SimpleX address: generate the contact path, share it intentionally, revoke the SimpleX address when needed, and the agent does not expose a platform-discoverable bot identity. -The implementation keeps developer-facing boundaries explicit: OpenClaw enforces policy, the plugin translates channel events and actions, and a separately managed simplex-chat runtime handles the SimpleX WebSocket API. +The implementation keeps developer-facing boundaries explicit: OpenClaw enforces policy, the plugin translates channel events and actions, and the SimpleX runtime is the official Node package loaded in the OpenClaw process. - Install the runtime and plugin, configure wsUrl, generate the first invite, and verify end-to-end messaging. + Install the plugin, use the default Node runtime, generate the first one-time invite, and verify end-to-end messaging. - Run simplex-chat yourself, wire OpenClaw to its WebSocket endpoint, and optionally move it under systemd or launchd. + Configure Node runtime storage and multi-account SimpleX identities. @@ -23,8 +23,8 @@ The implementation keeps developer-facing boundaries explicit: OpenClaw enforces See why this channel is built around invitation-based reachability, self-hostable relays, and no platform account dependency. - - Learn how routing, pairing, policy checks, and outbound delivery fit together. + + Learn how routing, runtime state, pairing, policy checks, and outbound delivery fit together. @@ -36,3 +36,12 @@ The implementation keeps developer-facing boundaries explicit: OpenClaw enforces Diagnose startup, runtime, invite, and policy issues quickly. + + + + See every channel field, including runtime storage, media limits, and multi-account settings. + + + Automate runtime status, invites, contact requests, group links, and SimpleX link onboarding. + + diff --git a/docs/reference/config.mdx b/docs/reference/config.mdx index 7321d98..c35b60a 100644 --- a/docs/reference/config.mdx +++ b/docs/reference/config.mdx @@ -1,6 +1,6 @@ --- title: Configuration -description: Complete reference for every OpenClaw SimpleX channel configuration field including connection settings, DM and group policies, and multi-account setup. +description: Complete reference for every OpenClaw SimpleX channel configuration field including runtime storage, DM and group policies, and multi-account setup. --- The plugin reads configuration from channels.openclaw-simplex. @@ -11,10 +11,7 @@ The plugin reads configuration from channels.openclaw-simplex. { "channels": { "openclaw-simplex": { - "enabled": true, - "connection": { - "wsUrl": "ws://127.0.0.1:5225" - } + "enabled": true } } } @@ -36,14 +33,11 @@ If accounts is not set, the root channels.openclaw-simplexaccounts is set, each account entry can override the shared root "enabled": true, "dmPolicy": "pairing", "groupPolicy": "allowlist", - "connection": { - "wsUrl": "ws://127.0.0.1:5225" - }, + "dbFilePrefix": "~/.simplex/openclaw-default", "accounts": { "ops": { "name": "Ops", "enabled": true, "reactionLevel": "extensive", "allowFrom": ["alice", "bob"], - "connection": { - "wsUrl": "ws://127.0.0.1:7777" - } + "dbFilePrefix": "~/.simplex/openclaw-ops" } } } @@ -100,35 +90,20 @@ If accounts is set, each account entry can override the shared root | `markdown` | Markdown rendering config from OpenClaw's shared channel schema. | | `blockStreaming` | If true, buffer the response instead of streaming partial output. | | `blockStreamingCoalesce` | Optional response coalescing behavior for blocked streaming. | -| `connection.mode` | Connection mode. Only `external` is supported. | -| `connection.wsUrl` | WebSocket URL for the running `simplex-chat` WebSocket API. If set, this wins over `wsHost`/`wsPort`. | -| `connection.wsHost` | Optional host fallback when `wsUrl` is not set. Default: `127.0.0.1`. | -| `connection.wsPort` | Optional port fallback when `wsUrl` is not set. Default: `5225`. | -| `connection.autoAcceptFiles` | Whether incoming file transfers should be auto-accepted by the SimpleX runtime. | -| `connection.connectTimeoutMs` | WebSocket connection timeout in milliseconds. | +| `dbFilePrefix` | Optional SQLite database file prefix for the Node runtime. Defaults to the SimpleX terminal CLI prefix: `~/.simplex/simplex_v1` on Linux/macOS and `%APPDATA%/simplex/simplex_v1` on Windows. | +| `displayName` | Display name used when the Node runtime creates its SimpleX profile. | +| `fullName` | Full name used when the Node runtime creates its SimpleX profile. | +| `migrationConfirmation` | Database migration confirmation mode: `yesUp` \| `yesUpDown` \| `console` \| `error`. | +| `autoAcceptFiles` | Whether incoming file transfers should be auto-accepted by the SimpleX runtime. | +| `connectTimeoutMs` | Runtime connection/start timeout in milliseconds. | | `accounts.` | Per-account overrides for the same schema. | - A channel/account is considered configured only when connection.wsUrl, connection.wsHost, or connection.wsPort is present. If none of those are set, OpenClaw will not treat the channel as startup-ready. + The default account is considered configured when channels.openclaw-simplex exists. Named accounts should set dbFilePrefix unless they intentionally inherit an explicit root prefix. With dmPolicy: "pairing", leave allowFrom empty or omit it when you want new contacts to go through pairing; set allowFrom only for pre-approved contacts. -## What belongs in plugin config vs runtime startup - -This plugin talks to an already running external simplex-chat process. That means the OpenClaw config only models settings the plugin can truthfully use at runtime. - -### Good fit for plugin config - -- connection.wsUrl, wsHost, wsPort -- connection.connectTimeoutMs -- connection.autoAcceptFiles -- OpenClaw policy and UX settings such as dmPolicy, allowFrom, groupPolicy, actions, and reactionLevel - -### Intentionally not mirrored into plugin config - -These are primarily simplex-chat startup or environment flags, so they belong in the host-managed service command line, not in channels.openclaw-simplex: +## Runtime config scope -- transport/bootstrap: --server, --xftp-server, --socks-proxy, --socks-mode, --host-mode, --required-host-mode, --smp-proxy, --smp-proxy-fallback, --smp-web-port -- local process/file layout: -d/--database, -k/--key, --files-folder, --temp-folder, --log-file -- runtime process behavior: --device-name, --maintenance, --mute, --mark-read, --reactions, --create-bot-display-name +The runtime is the official simplex-chat Node package. There is no separate simplex-chat CLI process and no local WebSocket endpoint. -Those flags can still be valuable, but the right place to set them is the supervised simplex-chat service definition described in [Runtime Setup](/guide/runtime-setup). +The config surface is intentionally small: local database prefix, initial profile labels, migration behavior, file auto-accept, timeout, and OpenClaw policy/UX fields. Legacy nested connection.* fields and CLI/WebSocket fields such as wsUrl, host, port, token, managed, and cliPath are migrated or removed by openclaw simplex migrate. diff --git a/docs/reference/example-commands.mdx b/docs/reference/example-commands.mdx index 7151f7b..5fcf0ad 100644 --- a/docs/reference/example-commands.mdx +++ b/docs/reference/example-commands.mdx @@ -1,22 +1,12 @@ --- title: Example Commands -description: Copy-paste CLI commands for common OpenClaw SimpleX tasks like generating invite links, approving contacts, listing paired users, and managing addresses. +description: Copy-paste CLI commands for common OpenClaw SimpleX tasks like setup, runtime diagnostics, one-time invites, SimpleX addresses, contact requests, group links, pairing approval, and migration. --- Use this page as a command cookbook after the first setup is working. For the full first-run flow, start with [Getting Started](/guide/getting-started). - - The long-running simplex-chat -p 5225 process should run in a separate terminal or as a host-managed service. See [Runtime Setup](/guide/runtime-setup) for persistent startup. - - ## Install and verify -Start the SimpleX WebSocket runtime: - -```bash -simplex-chat -p 5225 -``` - Install plugin in OpenClaw: ```bash @@ -38,10 +28,10 @@ openclaw config set plugins.allow "$( )" --strict-json ``` -Configure the WebSocket endpoint: +Configure the default Node runtime: ```bash -openclaw channels add --channel openclaw-simplex --url ws://127.0.0.1:5225 +openclaw channels add --channel openclaw-simplex ``` Verify that OpenClaw sees and trusts the plugin: @@ -54,9 +44,29 @@ openclaw plugins list openclaw plugins info openclaw-simplex ``` -If you already completed the first setup flow, you can skip this section and jump straight to invite, pairing, or migration commands below. +If you already completed the first setup flow, you can skip this section and jump straight to runtime, invite, contact-request, group-link, pairing, or migration commands below. + +## Runtime diagnostics + +Show the active SimpleX runtime state: + +```bash +openclaw simplex runtime status +``` + +Run the higher-level diagnostic summary: + +```bash +openclaw simplex runtime doctor +``` + +Use a named account when the channel has multiple accounts: + +```bash +openclaw simplex runtime doctor --account-id support +``` -## Invite and address management +## One-time invites and SimpleX addresses Create a one-time invite link and print a terminal QR code: @@ -64,30 +74,96 @@ Create a one-time invite link and print a terminal QR code: openclaw simplex invite create --qr ``` -List current invite and address state: +List current SimpleX address state: ```bash openclaw simplex invite list ``` -Show the current address link: +Show the current SimpleX address: ```bash openclaw simplex address show --qr ``` -Create or return the current address link: +Create or return the current SimpleX address: ```bash openclaw simplex address create --qr ``` -Revoke the current address link: +Revoke the current SimpleX address: ```bash openclaw simplex address revoke ``` +## Contact requests + +List pending SimpleX contact requests observed by the runtime: + +```bash +openclaw simplex requests list +``` + +Accept a pending request: + +```bash +openclaw simplex requests accept --contact-request-id +``` + +Reject a pending request: + +```bash +openclaw simplex requests reject --contact-request-id +``` + +With multiple accounts: + +```bash +openclaw simplex requests list --account-id support +``` + +## Groups and group links + +Create a SimpleX group: + +```bash +openclaw simplex groups create --display-name "OpenClaw Ops" +``` + +Create a group invite link and print a terminal QR code: + +```bash +openclaw simplex groups link create --group-id --role member --qr +``` + +Show the current group invite link: + +```bash +openclaw simplex groups link list --group-id --qr +``` + +Revoke the current group invite link: + +```bash +openclaw simplex groups link revoke --group-id +``` + +## Link onboarding + +Preview what connecting to a SimpleX link would do: + +```bash +openclaw simplex connect plan --link "" +``` + +Connect the active SimpleX user to a contact, address, or group link: + +```bash +openclaw simplex connect run --link "" +``` + ## Pairing List pending pairing requests: @@ -104,7 +180,7 @@ openclaw pairing approve openclaw-simplex ## Migration -Migrate older simplex installs to openclaw-simplex: +Migrate older simplex ids and legacy WebSocket/CLI runtime config to the current openclaw-simplex Node runtime shape: ```bash openclaw simplex migrate @@ -116,17 +192,6 @@ Preview migration only: openclaw simplex migrate --dry-run ``` -## SimpleX console commands - -Run these inside the simplex-chat console if you want to manage links directly from the runtime: - -| Command | Meaning | -| --- | --- | -| `/c` | Create a one-time connect link. | -| `/ad` | Create or return the account address link. | -| `/show_address` | Show the current address link. | -| `/delete_address` | Revoke the current address link. | - ## Gateway method names -For programmatic invite/address automation, the plugin exposes simplex.invite.create, simplex.invite.list, and simplex.invite.revoke. See [Gateway Methods](/reference/gateway-methods) for request and response shapes. +For programmatic automation, the plugin exposes gateway methods for one-time invite and SimpleX address management, runtime diagnostics, contact-request review, group-link lifecycle, and SimpleX link onboarding. See [Gateway Methods](/reference/gateway-methods) for request and response shapes. diff --git a/docs/reference/gateway-methods.mdx b/docs/reference/gateway-methods.mdx index 0e520c8..f265e9d 100644 --- a/docs/reference/gateway-methods.mdx +++ b/docs/reference/gateway-methods.mdx @@ -1,24 +1,24 @@ --- title: Gateway Methods -description: API reference for the OpenClaw SimpleX gateway RPC methods used to create invite links, generate address QR codes, and automate onboarding programmatically. +description: API reference for OpenClaw SimpleX gateway RPC methods used for runtime status, one-time invite links, SimpleX addresses, contact requests, group links, and operator-controlled SimpleX onboarding. --- -The plugin registers these gateway RPC methods for invite/address automation and programmatic onboarding flows. +The plugin registers these gateway RPC methods for runtime diagnostics, one-time invite and SimpleX address automation, contact-request review, group-link lifecycle, and operator-controlled SimpleX link onboarding. - For day-to-day operator workflows, prefer the plugin CLI commands in [Example Commands](/reference/example-commands). Use these gateway methods when another system needs the same invite/address flow programmatically, including QR data URLs. + For day-to-day one-time invite and SimpleX address workflows, prefer the plugin CLI commands in [Example Commands](/reference/example-commands). Use these gateway methods when another system needs programmatic access to runtime status, contact-request review, group-link lifecycle, or link onboarding. ## Prerequisites and behavior - The target SimpleX account must be enabled and configured under channels.openclaw-simplex. -- The simplex-chat WebSocket runtime must be reachable for that account. +- The SimpleX Node runtime must start successfully for that account. - If accountId is omitted or blank, the plugin uses the channel's default account. -- If the channel is not running, these methods ask OpenClaw to start openclaw-simplex for the target account and retry the SimpleX command. +- These methods call the embedded SimpleX runtime API for the target account directly; they do not start a separate SimpleX CLI or WebSocket sidecar. ## `simplex.invite.create` -Create a one-time connect link or an address link. +Create a one-time connect link or return/create the account's reusable SimpleX address. Request params: @@ -31,8 +31,8 @@ Request params: `mode` supports: -- `connect` -> runs /c -- `address` -> runs /ad +- `connect` -> creates a one-time invitation link +- `address` -> returns or creates the account's reusable SimpleX address Response highlights: @@ -44,7 +44,7 @@ Example response shape: ```json { "accountId": "default", - "command": "/c", + "operation": "create-link", "mode": "connect", "link": "simplex://...", "qrDataUrl": "data:image/png;base64,..." @@ -53,7 +53,7 @@ Example response shape: ## `simplex.invite.list` -List current invite/address links and pending contact hints. Internally this combines /show_address and /contacts. +List the current SimpleX address and related contact state through the SimpleX runtime APIs. Request params: @@ -65,9 +65,9 @@ Request params: Response highlights: -- `addressLink`: current address link if available -- `links`: extracted invite/address links seen in the responses -- `pendingHints`: pending contact hints from `/contacts` +- `addressLink`: current SimpleX address link if available +- `links`: extracted SimpleX address links seen in the responses +- `pendingHints`: pending contact hints, if exposed by the runtime - `addressQrDataUrl`: PNG QR image as a `data:` URL for `addressLink` Example response shape: @@ -84,7 +84,7 @@ Example response shape: ## `simplex.invite.revoke` -Revoke the active address link by running /delete_address. +Revoke the active SimpleX address through the SimpleX runtime API. Request params: @@ -99,8 +99,120 @@ Example response shape: ```json { "accountId": "default", - "response": { - "corrId": "..." + "revoked": true +} +``` + +## `simplex.runtime.status` + +Return runtime and account state for automation and Control UI surfaces. + +Response highlights: + +- `activeUser`: active SimpleX user profile, if available +- `address`: current SimpleX address metadata, if available +- `counts`: contact, group, and user counts +- `runtime`: active client, connection state, and latest runtime error +- `packageVersion`: installed `simplex-chat` package version + +Example response shape: + +```json +{ + "accountId": "default", + "configured": true, + "mode": "node", + "dbFilePrefix": "~/.simplex/simplex_v1", + "packageVersion": "6.5.0", + "runtime": { + "activeClient": true, + "connected": true, + "lastError": null + }, + "counts": { + "contacts": 1, + "groups": 0, + "users": 1 + } +} +``` + +## `simplex.runtime.doctor` + +Return the same runtime status plus `ok` and `issues` fields for operator diagnostics. + +## `simplex.requests.*` + +Manage pending SimpleX contact requests observed from runtime events. + +- `simplex.requests.list`: list stored pending requests for an account +- `simplex.requests.accept`: accept a request by `contactRequestId` +- `simplex.requests.reject`: reject a request by `contactRequestId` + +Example request: + +```json +{ + "accountId": "default", + "contactRequestId": 123 +} +``` + +## `simplex.groups.*` + +Create SimpleX groups and manage group invite links through the official Node runtime. + +- `simplex.groups.create`: create a group from `displayName`, optional `fullName`, and optional `description` +- `simplex.groups.link.create`: create a group link for `groupId` and optional `role` +- `simplex.groups.link.list`: return the current group link plus QR data URL +- `simplex.groups.link.revoke`: delete the current group link + +Example group link request: + +```json +{ + "accountId": "default", + "groupId": 42, + "role": "member" +} +``` + +Example response shape: + +```json +{ + "accountId": "default", + "groupId": 42, + "role": "member", + "link": "simplex://...", + "qrDataUrl": "data:image/png;base64,..." +} +``` + +## `simplex.connect.*` + +Let an operator connect the SimpleX runtime identity to a SimpleX contact/address/group link. + +- `simplex.connect.plan`: inspect what connecting to `link` would do +- `simplex.connect`: connect the active SimpleX user to `link` + +Example request: + +```json +{ + "accountId": "default", + "link": "simplex://..." +} +``` + +Example response shape: + +```json +{ + "accountId": "default", + "connected": true, + "result": { + "type": "sentConfirmation" } } ``` @@ -110,7 +222,7 @@ Example response shape: | Code | Meaning | | --- | --- | | `INVALID_REQUEST` | The request params are invalid. For example, simplex.invite.create received an unsupported mode. | -| `UNAVAILABLE` | The account is disabled/unconfigured, the channel runtime is unavailable, or the underlying SimpleX command failed. The response message includes the failure reason. | +| `UNAVAILABLE` | The account is disabled/unconfigured, the channel runtime is unavailable, or the underlying SimpleX runtime API call failed. The response message includes the failure reason. | ## Related agent tools diff --git a/docs/reference/screenshots.mdx b/docs/reference/screenshots.mdx deleted file mode 100644 index 8959e6d..0000000 --- a/docs/reference/screenshots.mdx +++ /dev/null @@ -1,47 +0,0 @@ ---- -title: Screenshots -description: Step-by-step screenshots showing the full SimpleX pairing flow from generating an invite link through contact approval and the first agent conversation. ---- - -This page shows the supported SimpleX pairing and approval flow. - - - This walkthrough assumes channels.openclaw-simplex.connection.wsUrl already points to a running SimpleX runtime. If not, start with [Getting Started](/guide/getting-started). - - -Generate a one-time invite link with the plugin CLI: - -```bash -openclaw simplex invite create --qr -``` - -You can also generate or inspect links directly in the simplex-chat console with /c, /ad, or /show_address. For automation, OpenClaw also exposes simplex.invite.create and simplex.invite.list. - - - - Send the first message from the SimpleX app and capture the pairing request. - - Pairing code shown in SimpleX app - - - - openclaw pairing list should now show a pending request for the sender that just messaged the agent. - - OpenClaw pairing requests table - - - - ```bash - openclaw pairing list - openclaw pairing approve openclaw-simplex - ``` - - - - After approval, SimpleX should show the access-approved message and the next user message should receive an agent reply. - - SimpleX access approved message - - SimpleX chat after approval - - diff --git a/index.test.ts b/index.test.ts index c78dc36..47667ab 100644 --- a/index.test.ts +++ b/index.test.ts @@ -9,10 +9,6 @@ function setMockResponse(next: MockResponse | MockResponse[]): void { mockSendResponses = Array.isArray(next) ? [...next] : [next]; } -function getLastCommand(): string | null { - return sentCommands[sentCommands.length - 1] ?? null; -} - function getCommands(): string[] { return [...sentCommands]; } @@ -22,26 +18,67 @@ function resetMockState(): void { mockSendResponses = [{ resp: { type: "ok" } }]; } -const qrMocks = vi.hoisted(() => ({ - toDataURL: vi.fn(async () => "data:image/png;base64,mock-base64"), -})); +function nextMockPayload(): MockResponse { + const next = mockSendResponses.shift(); + return (next && "resp" in next ? next.resp : (next ?? { type: "ok" })) as MockResponse; +} + +function extractMockLink(value: unknown): string | null { + if (typeof value === "string") { + return value.match(/simplex:\/\/\S+/)?.[0] ?? null; + } + if (!value || typeof value !== "object") { + return null; + } + const record = value as Record; + return extractMockLink(record.output) ?? extractMockLink(record.message); +} + +function mockContactLink(link: string | null): MockResponse { + return { + connShortLink: link ?? "simplex://address-mock", + }; +} -vi.mock("./src/simplex/simplex-ws-client.js", () => ({ - SimplexWsClient: class { +vi.mock("./src/simplex/runtime/client.js", () => ({ + SimplexClient: class { async connect() {} - async sendCommand(cmd: string) { - sentCommands.push(cmd); - const next = mockSendResponses.shift(); - return next ?? { resp: { type: "ok" } }; + getConnectionState() { + return { connected: true, at: 1, error: null }; + } + async withApi(fn: (api: Record) => Promise) { + const api = { + apiGetActiveUser: vi.fn(async () => ({ userId: 1 })), + apiListUsers: vi.fn(async () => [{ user: { userId: 1 } }]), + apiCreateLink: vi.fn( + async () => extractMockLink(nextMockPayload()) ?? "simplex://invite-mock" + ), + apiGetUserAddress: vi.fn(async () => mockContactLink(extractMockLink(nextMockPayload()))), + apiCreateUserAddress: vi.fn(async () => + mockContactLink(extractMockLink(nextMockPayload())) + ), + apiDeleteUserAddress: vi.fn(async () => undefined), + apiListContacts: vi.fn(async () => [nextMockPayload()]), + apiListGroups: vi.fn(async () => [{ groupId: 10 }]), + apiNewGroup: vi.fn(async () => ({ groupId: 11, groupProfile: { displayName: "Ops" } })), + apiCreateGroupLink: vi.fn(async () => "simplex://group-link"), + apiGetGroupLinkStr: vi.fn(async () => "simplex://group-link"), + apiGetGroupLink: vi.fn(async () => ({ groupLinkId: "group-link" })), + apiDeleteGroupLink: vi.fn(async () => undefined), + apiConnectPlan: vi.fn(async () => [{ type: "ok" }, { connShortLink: "simplex://x" }]), + apiConnectActiveUser: vi.fn(async () => ({ type: "sentConfirmation" })), + apiAcceptContactRequest: vi.fn(async () => ({ contactId: 100 })), + apiRejectContactRequest: vi.fn(async () => undefined), + apiSendMessages: vi.fn(async () => [{ chatItem: { meta: { itemId: 1 } } }]), + apiReceiveFile: vi.fn(async () => ({ chatItem: { meta: { itemId: 1 } } })), + apiCancelFile: vi.fn(async () => undefined), + }; + return await fn(api); } async close() {} }, })); -vi.mock("qrcode", () => ({ - toDataURL: qrMocks.toDataURL, -})); - import type { OpenClawConfig, PluginRuntime } from "openclaw/plugin-sdk/channel-core"; import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; import plugin from "./index.js"; @@ -51,9 +88,7 @@ import { simplexPlugin } from "./src/channel/plugin.js"; const simplexConfiguredChannel = { channels: { "openclaw-simplex": { - connection: { - wsUrl: "ws://127.0.0.1:5225", - }, + dbFilePrefix: "/tmp/openclaw-simplex-test", }, }, }; @@ -68,13 +103,6 @@ const noopLogger = { type Handler = (ctx: { params?: Record; respond: (ok: boolean, payload?: unknown, err?: unknown) => void; - context: { - startChannel: (channel: string, accountId?: string) => Promise; - getRuntimeSnapshot: () => { - channels?: Record; - channelAccounts?: Record>; - }; - }; }) => Promise; type BeforeToolCallHook = (event: { toolName: string; params: Record }) => unknown; @@ -132,11 +160,14 @@ function setupRegistration( }, registerReload: () => {}, registerNodeHostCommand: () => {}, + registerNodeInvokePolicy: () => {}, registerSecurityAuditCollector: () => {}, registerService: () => {}, + registerGatewayDiscoveryService: () => {}, registerCliBackend: () => {}, registerTextTransforms: () => {}, registerConfigMigration: () => {}, + registerMigrationProvider: () => {}, registerAutoEnableProbe: () => {}, registerProvider: () => {}, registerSpeechProvider: () => {}, @@ -153,6 +184,23 @@ function setupRegistration( registerContextEngine: () => {}, registerCompactionProvider: () => {}, registerAgentHarness: () => {}, + registerCodexAppServerExtensionFactory: () => {}, + registerAgentToolResultMiddleware: () => {}, + registerSessionExtension: () => {}, + enqueueNextTurnInjection: async (injection) => ({ + enqueued: false, + id: "mock-injection", + sessionKey: injection.sessionKey, + }), + registerTrustedToolPolicy: () => {}, + registerToolMetadata: () => {}, + registerControlUiDescriptor: () => {}, + registerRuntimeLifecycle: () => {}, + registerAgentEventSubscription: () => {}, + setRunContext: () => false, + getRunContext: () => undefined, + clearRunContext: () => {}, + registerSessionSchedulerJob: () => undefined, registerDetachedTaskRuntime: () => {}, registerMemoryCapability: () => {}, registerMemoryPromptSupplement: () => {}, @@ -162,8 +210,6 @@ function setupRegistration( registerMemoryEmbeddingProvider: () => {}, registerMemoryPromptSection: () => {}, registerCommand: () => {}, - registerEmbeddedExtensionFactory: () => {}, - registerCodexAppServerExtensionFactory: () => {}, on: (hookName, handler) => { hooks.push({ events: hookName, handler }); }, @@ -204,11 +250,26 @@ describe("plugin entry registration modes", () => { expect(full.methods.has("simplex.invite.create")).toBe(true); expect(full.methods.has("simplex.invite.list")).toBe(true); expect(full.methods.has("simplex.invite.revoke")).toBe(true); + expect(full.methods.has("simplex.runtime.status")).toBe(true); + expect(full.methods.has("simplex.requests.accept")).toBe(true); + expect(full.methods.has("simplex.groups.link.create")).toBe(true); + expect(full.methods.has("simplex.connect")).toBe(true); expect(full.methodScopes).toEqual( new Map([ ["simplex.invite.create", "operator.write"], ["simplex.invite.list", "operator.read"], ["simplex.invite.revoke", "operator.admin"], + ["simplex.runtime.status", "operator.read"], + ["simplex.runtime.doctor", "operator.read"], + ["simplex.requests.list", "operator.read"], + ["simplex.requests.accept", "operator.admin"], + ["simplex.requests.reject", "operator.admin"], + ["simplex.groups.create", "operator.admin"], + ["simplex.groups.link.create", "operator.admin"], + ["simplex.groups.link.list", "operator.read"], + ["simplex.groups.link.revoke", "operator.admin"], + ["simplex.connect.plan", "operator.read"], + ["simplex.connect", "operator.admin"], ]) ); expect(setupOnly.methods.size).toBe(0); @@ -330,11 +391,11 @@ describe("simplex channel config and allowlist adapters", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", allowFrom: ["@base"], accounts: { ops: { - connection: { wsUrl: "ws://127.0.0.1:6225" }, + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex-ops", allowFrom: ["@ops"], }, }, @@ -366,7 +427,7 @@ describe("simplex channel config and allowlist adapters", () => { cfg, accountId: "default", }); - expect(deletedDefault?.channels?.["openclaw-simplex"]?.connection).toBeUndefined(); + expect(deletedDefault?.channels?.["openclaw-simplex"]?.dbFilePrefix).toBeUndefined(); expect(deletedDefault?.channels?.["openclaw-simplex"]?.allowFrom).toBeUndefined(); expect(deletedDefault?.channels?.["openclaw-simplex"]?.accounts?.ops).toBeDefined(); }); @@ -498,10 +559,6 @@ describe("simplex invite gateway", () => { await handler({ params: { mode: "bad" }, respond, - context: { - startChannel: async () => {}, - getRuntimeSnapshot: () => ({ channels: {}, channelAccounts: {} }), - }, }); const firstCall = respond.mock.calls[0]; expect(firstCall).toBeDefined(); @@ -525,13 +582,6 @@ describe("simplex invite gateway", () => { await handler({ params: { mode: "connect" }, respond, - context: { - startChannel: async () => {}, - getRuntimeSnapshot: () => ({ - channels: { "openclaw-simplex": { running: false } }, - channelAccounts: {}, - }), - }, }); const firstCall = respond.mock.calls[0]; @@ -543,14 +593,13 @@ describe("simplex invite gateway", () => { expect(ok).toBe(true); expect(payload).toMatchObject({ link: "simplex://invite123", - qrDataUrl: "data:image/png;base64,mock-base64", mode: "connect", }); - expect(getLastCommand()).toBe("/c"); - expect(qrMocks.toDataURL).toHaveBeenCalledWith("simplex://invite123", expect.any(Object)); + expect((payload as { qrDataUrl?: string }).qrDataUrl).toMatch(/^data:image\/png;base64,/); + expect(getCommands()).toEqual([]); }); - it("uses address mode to build invite command", async () => { + it("uses address mode to create or return an address link", async () => { setMockResponse({ resp: { type: "ok", @@ -563,13 +612,6 @@ describe("simplex invite gateway", () => { await handler({ params: { mode: "address" }, respond, - context: { - startChannel: async () => {}, - getRuntimeSnapshot: () => ({ - channels: { "openclaw-simplex": { running: true } }, - channelAccounts: {}, - }), - }, }); const firstCall = respond.mock.calls[0]; @@ -583,7 +625,7 @@ describe("simplex invite gateway", () => { link: "simplex://address456", mode: "address", }); - expect(getLastCommand()).toBe("/ad"); + expect(getCommands()).toEqual([]); }); it("lists address links and pending hints", async () => { @@ -607,13 +649,6 @@ describe("simplex invite gateway", () => { await handler({ params: {}, respond, - context: { - startChannel: async () => {}, - getRuntimeSnapshot: () => ({ - channels: { "openclaw-simplex": { running: true } }, - channelAccounts: {}, - }), - }, }); const firstCall = respond.mock.calls[0]; @@ -626,12 +661,13 @@ describe("simplex invite gateway", () => { expect(payload).toMatchObject({ accountId: "default", addressLink: "simplex://address789", - links: ["simplex://address789", "simplex://invite999"], - addressQrDataUrl: "data:image/png;base64,mock-base64", + links: ["simplex://address789"], }); - expect((payload as { pendingHints?: string[] }).pendingHints?.length).toBeGreaterThan(0); - expect(getCommands()).toEqual(["/show_address", "/contacts"]); - expect(qrMocks.toDataURL).toHaveBeenCalledWith("simplex://address789", expect.any(Object)); + expect((payload as { addressQrDataUrl?: string }).addressQrDataUrl).toMatch( + /^data:image\/png;base64,/ + ); + expect((payload as { pendingHints?: string[] }).pendingHints).toEqual([]); + expect(getCommands()).toEqual([]); }); it("revokes address link for selected account", async () => { @@ -640,7 +676,7 @@ describe("simplex invite gateway", () => { "openclaw-simplex": { accounts: { ops: { - connection: { wsUrl: "ws://127.0.0.1:7777", mode: "external" }, + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex-ops", }, }, }, @@ -650,13 +686,6 @@ describe("simplex invite gateway", () => { await handler({ params: { accountId: "ops" }, respond, - context: { - startChannel: async () => {}, - getRuntimeSnapshot: () => ({ - channels: { "openclaw-simplex": { running: true } }, - channelAccounts: { "openclaw-simplex": { ops: { running: true } } }, - }), - }, }); const firstCall = respond.mock.calls[0]; @@ -667,10 +696,10 @@ describe("simplex invite gateway", () => { const [ok, payload] = firstCall; expect(ok).toBe(true); expect(payload).toMatchObject({ accountId: "ops" }); - expect(getLastCommand()).toBe("/delete_address"); + expect(getCommands()).toEqual([]); }); - it("uses the configured default account runtime when accountId is omitted", async () => { + it("uses the configured default account when accountId is omitted", async () => { setMockResponse({ resp: { type: "ok", @@ -683,24 +712,16 @@ describe("simplex invite gateway", () => { "openclaw-simplex": { accounts: { ops: { - connection: { wsUrl: "ws://127.0.0.1:7777", mode: "external" }, + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex-ops", }, }, }, }, }); const respond = vi.fn(); - const startChannel = vi.fn(async () => {}); await handler({ params: { mode: "address" }, respond, - context: { - startChannel, - getRuntimeSnapshot: () => ({ - channels: { "openclaw-simplex": { running: false } }, - channelAccounts: { "openclaw-simplex": { ops: { running: true } } }, - }), - }, }); const firstCall = respond.mock.calls[0]; @@ -715,6 +736,95 @@ describe("simplex invite gateway", () => { mode: "address", link: "simplex://address999", }); - expect(startChannel).not.toHaveBeenCalled(); + }); + + it("returns runtime status through the gateway", async () => { + const handler = setupHandler("simplex.runtime.status", simplexConfiguredChannel); + const respond = vi.fn(); + await handler({ params: {}, respond }); + + const firstCall = respond.mock.calls[0]; + expect(firstCall).toBeDefined(); + if (!firstCall) { + throw new Error("missing response call"); + } + const [ok, payload] = firstCall; + expect(ok).toBe(true); + expect(payload).toMatchObject({ + accountId: "default", + mode: "node", + counts: { + contacts: 1, + groups: 1, + users: 1, + }, + }); + }); + + it("creates group links with QR data", async () => { + const handler = setupHandler("simplex.groups.link.create", simplexConfiguredChannel); + const respond = vi.fn(); + await handler({ + params: { groupId: 10, role: "member" }, + respond, + }); + + const firstCall = respond.mock.calls[0]; + expect(firstCall).toBeDefined(); + if (!firstCall) { + throw new Error("missing response call"); + } + const [ok, payload] = firstCall; + expect(ok).toBe(true); + expect(payload).toMatchObject({ + accountId: "default", + groupId: 10, + role: "member", + link: "simplex://group-link", + }); + expect((payload as { qrDataUrl?: string }).qrDataUrl).toMatch(/^data:image\/png;base64,/); + }); + + it("accepts pending contact requests by id", async () => { + const handler = setupHandler("simplex.requests.accept", simplexConfiguredChannel); + const respond = vi.fn(); + await handler({ + params: { contactRequestId: 7 }, + respond, + }); + + const firstCall = respond.mock.calls[0]; + expect(firstCall).toBeDefined(); + if (!firstCall) { + throw new Error("missing response call"); + } + const [ok, payload] = firstCall; + expect(ok).toBe(true); + expect(payload).toMatchObject({ + accountId: "default", + contactRequestId: 7, + accepted: true, + }); + }); + + it("connects to SimpleX links through the operator gateway", async () => { + const handler = setupHandler("simplex.connect", simplexConfiguredChannel); + const respond = vi.fn(); + await handler({ + params: { link: "simplex://contact-link" }, + respond, + }); + + const firstCall = respond.mock.calls[0]; + expect(firstCall).toBeDefined(); + if (!firstCall) { + throw new Error("missing response call"); + } + const [ok, payload] = firstCall; + expect(ok).toBe(true); + expect(payload).toMatchObject({ + accountId: "default", + connected: true, + }); }); }); diff --git a/index.ts b/index.ts index 404cdd7..bf2aa96 100644 --- a/index.ts +++ b/index.ts @@ -10,7 +10,7 @@ import { registerSimplexToolHooks, registerSimplexTools } from "./src/tools/plug const pluginEntry: ReturnType = defineChannelPluginEntry({ id: SIMPLEX_PLUGIN_ID, name: "SimpleX", - description: "SimpleX Chat channel plugin via external WebSocket API", + description: "SimpleX Chat channel plugin via the official Node runtime", plugin: simplexPlugin, setRuntime: setSimplexRuntime, registerCliMetadata: registerSimplexCliMetadata, diff --git a/openclaw-docs.png b/openclaw-docs.png deleted file mode 100644 index 3c99ff4..0000000 Binary files a/openclaw-docs.png and /dev/null differ diff --git a/openclaw.plugin.json b/openclaw.plugin.json index 668d5b4..67d68a9 100644 --- a/openclaw.plugin.json +++ b/openclaw.plugin.json @@ -3,6 +3,7 @@ "kind": "channel", "channels": ["openclaw-simplex"], "activation": { + "onStartup": false, "onChannels": ["openclaw-simplex"], "onCapabilities": ["channel", "tool"] }, @@ -18,7 +19,7 @@ ] }, "name": "SimpleX", - "description": "SimpleX Chat channel plugin via external WebSocket API", + "description": "SimpleX channel plugin for OpenClaw using the official Node runtime", "configSchema": { "type": "object", "additionalProperties": false, @@ -36,6 +37,27 @@ "enabled": { "type": "boolean" }, + "dbFilePrefix": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "fullName": { + "type": "string" + }, + "migrationConfirmation": { + "type": "string", + "enum": ["yesUp", "yesUpDown", "console", "error"] + }, + "autoAcceptFiles": { + "type": "boolean" + }, + "connectTimeoutMs": { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, "markdown": { "type": "object", "properties": { @@ -170,36 +192,6 @@ "additionalProperties": false } }, - "connection": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "const": "external" - }, - "wsUrl": { - "type": "string", - "format": "uri" - }, - "wsHost": { - "type": "string" - }, - "wsPort": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - "autoAcceptFiles": { - "type": "boolean" - }, - "connectTimeoutMs": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - } - }, - "additionalProperties": false - }, "accounts": { "type": "object", "properties": {}, @@ -212,6 +204,27 @@ "enabled": { "type": "boolean" }, + "dbFilePrefix": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "fullName": { + "type": "string" + }, + "migrationConfirmation": { + "type": "string", + "enum": ["yesUp", "yesUpDown", "console", "error"] + }, + "autoAcceptFiles": { + "type": "boolean" + }, + "connectTimeoutMs": { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991 + }, "markdown": { "type": "object", "properties": { @@ -345,36 +358,6 @@ }, "additionalProperties": false } - }, - "connection": { - "type": "object", - "properties": { - "mode": { - "type": "string", - "const": "external" - }, - "wsUrl": { - "type": "string", - "format": "uri" - }, - "wsHost": { - "type": "string" - }, - "wsPort": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - }, - "autoAcceptFiles": { - "type": "boolean" - }, - "connectTimeoutMs": { - "type": "integer", - "exclusiveMinimum": 0, - "maximum": 9007199254740991 - } - }, - "additionalProperties": false } }, "additionalProperties": false @@ -389,7 +372,7 @@ "uiHints": { "": { "label": "SimpleX", - "help": "Connect OpenClaw to a separately running simplex-chat WebSocket runtime. Reachability starts from SimpleX invite or address links, while OpenClaw still applies pairing, allowlists, and group policy." + "help": "Connect OpenClaw to SimpleX through the official Node runtime. Reachability starts from SimpleX invite or address links, while OpenClaw still applies pairing, allowlists, and group policy." }, "defaultAccount": { "label": "Default Account", @@ -416,6 +399,74 @@ "label": "Enabled", "help": "Disable an account without deleting its SimpleX configuration." }, + "dbFilePrefix": { + "label": "SimpleX DB File Prefix", + "help": "SQLite database file prefix for the SimpleX Node runtime. Defaults to the SimpleX terminal CLI prefix: ~/.simplex/simplex_v1 on Linux/macOS or %APPDATA%/simplex/simplex_v1 on Windows.", + "placeholder": "~/.simplex/simplex_v1", + "tags": ["runtime", "storage"] + }, + "accounts.*.dbFilePrefix": { + "label": "SimpleX DB File Prefix", + "help": "SQLite database file prefix for the SimpleX Node runtime. Defaults to the SimpleX terminal CLI prefix: ~/.simplex/simplex_v1 on Linux/macOS or %APPDATA%/simplex/simplex_v1 on Windows.", + "placeholder": "~/.simplex/simplex_v1", + "tags": ["runtime", "storage"] + }, + "displayName": { + "label": "SimpleX Profile Name", + "help": "Display name used when the Node runtime creates a SimpleX profile for this database.", + "advanced": true + }, + "accounts.*.displayName": { + "label": "SimpleX Profile Name", + "help": "Display name used when the Node runtime creates a SimpleX profile for this database.", + "advanced": true + }, + "fullName": { + "label": "SimpleX Full Name", + "help": "Full name used when the Node runtime creates a SimpleX profile for this database.", + "advanced": true + }, + "accounts.*.fullName": { + "label": "SimpleX Full Name", + "help": "Full name used when the Node runtime creates a SimpleX profile for this database.", + "advanced": true + }, + "migrationConfirmation": { + "label": "DB Migration Mode", + "help": "SimpleX database migration confirmation mode for the Node runtime.", + "advanced": true, + "tags": ["runtime", "storage"] + }, + "accounts.*.migrationConfirmation": { + "label": "DB Migration Mode", + "help": "SimpleX database migration confirmation mode for the Node runtime.", + "advanced": true, + "tags": ["runtime", "storage"] + }, + "autoAcceptFiles": { + "label": "Auto Accept Files", + "help": "Automatically accept incoming file transfers from the SimpleX runtime.", + "advanced": true, + "tags": ["media"] + }, + "accounts.*.autoAcceptFiles": { + "label": "Auto Accept Files", + "help": "Automatically accept incoming file transfers from the SimpleX runtime.", + "advanced": true, + "tags": ["media"] + }, + "connectTimeoutMs": { + "label": "Connect Timeout (ms)", + "help": "Runtime connection/start timeout in milliseconds.", + "advanced": true, + "tags": ["transport"] + }, + "accounts.*.connectTimeoutMs": { + "label": "Connect Timeout (ms)", + "help": "Runtime connection/start timeout in milliseconds.", + "advanced": true, + "tags": ["transport"] + }, "mediaMaxMb": { "label": "Max Media Size (MB)", "help": "Optional media size cap for files sent through this SimpleX account.", @@ -428,6 +479,52 @@ "advanced": true, "tags": ["media"] }, + "actions": { + "label": "Actions", + "help": "Optional per-account action toggles for SimpleX message features.", + "advanced": true + }, + "accounts.*.actions": { + "label": "Actions", + "help": "Optional per-account action toggles for SimpleX message features.", + "advanced": true + }, + "actions.reactions": { + "label": "Enable Reactions", + "help": "Allow the agent to add or remove emoji reactions through the SimpleX runtime.", + "advanced": true, + "tags": ["actions"] + }, + "accounts.*.actions.reactions": { + "label": "Enable Reactions", + "help": "Allow the agent to add or remove emoji reactions through the SimpleX runtime.", + "advanced": true, + "tags": ["actions"] + }, + "actions.polls": { + "label": "Enable Polls", + "help": "Allow the agent to send OpenClaw poll prompts into SimpleX chats.", + "advanced": true, + "tags": ["actions"] + }, + "accounts.*.actions.polls": { + "label": "Enable Polls", + "help": "Allow the agent to send OpenClaw poll prompts into SimpleX chats.", + "advanced": true, + "tags": ["actions"] + }, + "reactionLevel": { + "label": "Reaction Level", + "help": "Controls agent reaction behavior. Use \"minimal\" for restrained reactions, \"extensive\" for more expressive use, \"ack\" for non-agent acknowledgements only, and \"off\" to disable reactions entirely.", + "advanced": true, + "tags": ["actions"] + }, + "accounts.*.reactionLevel": { + "label": "Reaction Level", + "help": "Controls agent reaction behavior. Use \"minimal\" for restrained reactions, \"extensive\" for more expressive use, \"ack\" for non-agent acknowledgements only, and \"off\" to disable reactions entirely.", + "advanced": true, + "tags": ["actions"] + }, "dmPolicy": { "label": "DM Policy", "help": "Direct-message access policy. \"pairing\" is the safest default; \"open\" should stay paired with a deliberate allowFrom policy.", @@ -557,138 +654,10 @@ "label": "Tool Policy", "help": "Optional per-group tool policy override for this SimpleX group.", "advanced": true - }, - "connection": { - "label": "Connection", - "help": "Transport settings for the external simplex-chat WebSocket runtime." - }, - "accounts.*.connection": { - "label": "Connection", - "help": "Transport settings for the external simplex-chat WebSocket runtime." - }, - "connection.mode": { - "label": "Connection Mode", - "help": "SimpleX currently supports only the external runtime mode in this plugin.", - "advanced": true - }, - "accounts.*.connection.mode": { - "label": "Connection Mode", - "help": "SimpleX currently supports only the external runtime mode in this plugin.", - "advanced": true - }, - "connection.wsUrl": { - "label": "WebSocket URL", - "help": "WebSocket URL for the running simplex-chat API, for example ws://127.0.0.1:5225.", - "placeholder": "ws://127.0.0.1:5225", - "tags": ["transport"] - }, - "accounts.*.connection.wsUrl": { - "label": "WebSocket URL", - "help": "WebSocket URL for the running simplex-chat API, for example ws://127.0.0.1:5225.", - "placeholder": "ws://127.0.0.1:5225", - "tags": ["transport"] - }, - "connection.wsHost": { - "label": "WebSocket Host", - "help": "Host override used when wsUrl is not set explicitly.", - "placeholder": "127.0.0.1", - "advanced": true, - "tags": ["transport"] - }, - "accounts.*.connection.wsHost": { - "label": "WebSocket Host", - "help": "Host override used when wsUrl is not set explicitly.", - "placeholder": "127.0.0.1", - "advanced": true, - "tags": ["transport"] - }, - "connection.wsPort": { - "label": "WebSocket Port", - "help": "Port override used when wsUrl is not set explicitly.", - "placeholder": "5225", - "advanced": true, - "tags": ["transport"] - }, - "accounts.*.connection.wsPort": { - "label": "WebSocket Port", - "help": "Port override used when wsUrl is not set explicitly.", - "placeholder": "5225", - "advanced": true, - "tags": ["transport"] - }, - "connection.autoAcceptFiles": { - "label": "Auto Accept Files", - "help": "Automatically accept incoming file transfers from the SimpleX runtime.", - "advanced": true, - "tags": ["media"] - }, - "accounts.*.connection.autoAcceptFiles": { - "label": "Auto Accept Files", - "help": "Automatically accept incoming file transfers from the SimpleX runtime.", - "advanced": true, - "tags": ["media"] - }, - "connection.connectTimeoutMs": { - "label": "Connect Timeout (ms)", - "help": "WebSocket connection timeout in milliseconds.", - "advanced": true, - "tags": ["transport"] - }, - "accounts.*.connection.connectTimeoutMs": { - "label": "Connect Timeout (ms)", - "help": "WebSocket connection timeout in milliseconds.", - "advanced": true, - "tags": ["transport"] - }, - "actions": { - "label": "Actions", - "help": "Optional per-account action toggles for SimpleX message features.", - "advanced": true - }, - "accounts.*.actions": { - "label": "Actions", - "help": "Optional per-account action toggles for SimpleX message features.", - "advanced": true - }, - "actions.reactions": { - "label": "Enable Reactions", - "help": "Allow the agent to add or remove emoji reactions through the SimpleX runtime.", - "advanced": true, - "tags": ["actions"] - }, - "accounts.*.actions.reactions": { - "label": "Enable Reactions", - "help": "Allow the agent to add or remove emoji reactions through the SimpleX runtime.", - "advanced": true, - "tags": ["actions"] - }, - "actions.polls": { - "label": "Enable Polls", - "help": "Allow the agent to send OpenClaw poll prompts into SimpleX chats.", - "advanced": true, - "tags": ["actions"] - }, - "accounts.*.actions.polls": { - "label": "Enable Polls", - "help": "Allow the agent to send OpenClaw poll prompts into SimpleX chats.", - "advanced": true, - "tags": ["actions"] - }, - "reactionLevel": { - "label": "Reaction Level", - "help": "Controls agent reaction behavior. Use \"minimal\" for restrained reactions, \"extensive\" for more expressive use, \"ack\" for non-agent acknowledgements only, and \"off\" to disable reactions entirely.", - "advanced": true, - "tags": ["actions"] - }, - "accounts.*.reactionLevel": { - "label": "Reaction Level", - "help": "Controls agent reaction behavior. Use \"minimal\" for restrained reactions, \"extensive\" for more expressive use, \"ack\" for non-agent acknowledgements only, and \"off\" to disable reactions entirely.", - "advanced": true, - "tags": ["actions"] } }, "label": "SimpleX", - "description": "SimpleX Chat over an external WebSocket runtime." + "description": "SimpleX Chat through the official Node runtime." } } } diff --git a/package.json b/package.json index e7f7f22..28455b9 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@dangoldbj/openclaw-simplex", - "version": "1.5.0", - "description": "SimpleX channel plugin for OpenClaw", + "version": "2.0.0", + "description": "SimpleX channel plugin for OpenClaw using the official Node runtime", "homepage": "https://openclaw-simplex.mintlify.app/", "repository": { "type": "git", @@ -10,7 +10,7 @@ "bugs": { "url": "https://github.com/dangoldbj/openclaw-simplex/issues" }, - "license": "MIT", + "license": "AGPL-3.0-or-later", "type": "module", "packageManager": "pnpm@10.17.1", "publishConfig": { @@ -43,30 +43,27 @@ "manifest:sync": "pnpm run build && node scripts/write-plugin-manifest.mjs && biome format --write openclaw.plugin.json", "typecheck": "tsc --noEmit", "test": "vitest run", - "prepublishOnly": "pnpm run test && pnpm run typecheck && pnpm run build" + "prepublishOnly": "pnpm run check && pnpm run test && pnpm run typecheck && pnpm run build" }, "engines": { "node": ">=22" }, "dependencies": { "@sinclair/typebox": "^0.34.49", - "qrcode": "^1.5.4", - "ws": "^8.20.0", + "simplex-chat": "^6.5.0", "zod": "^4.3.6" }, "peerDependencies": { - "openclaw": ">=2026.4.23" + "openclaw": ">=2026.4.29" }, "devDependencies": { - "@biomejs/biome": "^2.4.10", - "@mintlify/cli": "^4.0.1090", - "@types/node": "^25.5.2", - "@types/qrcode": "^1.5.5", - "@types/ws": "^8.18.1", - "openclaw": "^2026.4.23", - "tsup": "^8.5.0", - "typescript": "^5.9.3", - "vitest": "^4.1.2" + "@biomejs/biome": "^2.4.13", + "@mintlify/cli": "^4.0.1146", + "@types/node": "^25.6.0", + "openclaw": "^2026.4.29", + "tsup": "^8.5.1", + "typescript": "^6.0.3", + "vitest": "^4.1.5" }, "openclaw": { "extensions": [ @@ -75,11 +72,11 @@ "channel": { "id": "openclaw-simplex", "label": "SimpleX", - "selectionLabel": "SimpleX (WebSocket)", + "selectionLabel": "SimpleX", "detailLabel": "SimpleX Chat", "docsPath": "/channels/openclaw-simplex", "docsLabel": "openclaw-simplex", - "blurb": "SimpleX Chat over an external WebSocket runtime.", + "blurb": "SimpleX Chat through the official Node runtime.", "aliases": [ "simplex" ], @@ -87,7 +84,7 @@ "systemImage": "link.badge.plus", "selectionExtras": [ "Invite-based reachability", - "External WebSocket runtime" + "Official Node runtime" ], "markdownCapable": true, "exposure": { @@ -100,7 +97,7 @@ "install": { "npmSpec": "@dangoldbj/openclaw-simplex", "defaultChoice": "npm", - "minHostVersion": ">=2026.4.23" + "minHostVersion": ">=2026.4.29" } } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7822b7d..f0eddc6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,48 +11,39 @@ importers: '@sinclair/typebox': specifier: ^0.34.49 version: 0.34.49 - qrcode: - specifier: ^1.5.4 - version: 1.5.4 - ws: - specifier: ^8.20.0 - version: 8.20.0 + simplex-chat: + specifier: ^6.5.0 + version: 6.5.0 zod: specifier: ^4.3.6 version: 4.3.6 devDependencies: '@biomejs/biome': - specifier: ^2.4.10 - version: 2.4.10 + specifier: ^2.4.13 + version: 2.4.13 '@mintlify/cli': - specifier: ^4.0.1090 - version: 4.0.1090(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/node@25.5.2)(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@5.9.3)(yaml@2.8.3) + specifier: ^4.0.1146 + version: 4.0.1146(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/node@25.6.0)(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@6.0.3)(yaml@2.8.3) '@types/node': - specifier: ^25.5.2 - version: 25.5.2 - '@types/qrcode': - specifier: ^1.5.5 - version: 1.5.6 - '@types/ws': - specifier: ^8.18.1 - version: 8.18.1 + specifier: ^25.6.0 + version: 25.6.0 openclaw: - specifier: ^2026.4.23 - version: 2026.4.23(@napi-rs/canvas@0.1.97) + specifier: ^2026.4.29 + version: 2026.4.29 tsup: - specifier: ^8.5.0 - version: 8.5.1(jiti@1.21.7)(postcss@8.5.6)(typescript@5.9.3)(yaml@2.8.3) + specifier: ^8.5.1 + version: 8.5.1(jiti@1.21.7)(postcss@8.5.6)(typescript@6.0.3)(yaml@2.8.3) typescript: - specifier: ^5.9.3 - version: 5.9.3 + specifier: ^6.0.3 + version: 6.0.3 vitest: - specifier: ^4.1.2 - version: 4.1.2(@types/node@25.5.2)(vite@7.3.1(@types/node@25.5.2)(jiti@1.21.7)(yaml@2.8.3)) + specifier: ^4.1.5 + version: 4.1.5(@types/node@25.6.0)(vite@7.3.1(@types/node@25.6.0)(jiti@1.21.7)(yaml@2.8.3)) packages: - '@agentclientprotocol/sdk@0.19.0': - resolution: {integrity: sha512-U9I8ws9WTOk6jCBAWpXefGSDgVXn14/kV6HFzwWGcstQ02mOQgClMAROHmoIn9GqZbDBDEOkdIbP4P4TEMQdug==} + '@agentclientprotocol/sdk@0.21.0': + resolution: {integrity: sha512-ONj+Q8qOdNQp5XbH5jnMwzT9IKZJsSN0p0lkceS4GtUtNOPVLpNzSS8gqQdGMKfBvA0ESbkL8BTaSN1Rc9miEw==} peerDependencies: zod: ^3.25.0 || ^4.0.0 @@ -73,21 +64,12 @@ packages: zod: optional: true - '@anthropic-ai/vertex-sdk@0.16.0': - resolution: {integrity: sha512-ntxemtRkwPsjVzGQJsmBPRW38tfas6VuVlD1v6pHffDJKLPtCdaiN9KUQeraJ/F34tjxEWlsaCnl3t/orJm1Xw==} - '@ark/schema@0.55.0': resolution: {integrity: sha512-IlSIc0FmLKTDGr4I/FzNHauMn0MADA6bCjT1wauu4k6MyxhC1R9gz0olNpIRvK7lGGDwtc/VO0RUDNvVQW5WFg==} - '@ark/schema@0.56.0': - resolution: {integrity: sha512-ECg3hox/6Z/nLajxXqNhgPtNdHWC9zNsDyskwO28WinoFEnWow4IsERNz9AnXRhTZJnYIlAJ4uGn3nlLk65vZA==} - '@ark/util@0.55.0': resolution: {integrity: sha512-aWFNK7aqSvqFtVsl1xmbTjGbg91uqtJV7Za76YGNEwIO4qLjMfyY8flmmbhooYMuqPCO2jyxu8hve943D+w3bA==} - '@ark/util@0.56.0': - resolution: {integrity: sha512-BghfRC8b9pNs3vBoDJhcta0/c1J1rsoS1+HgVUreMFPdhz/CRAKReAu57YEllNaSy98rWAdY1gE+gFup7OXpgA==} - '@asyncapi/parser@3.4.0': resolution: {integrity: sha512-Sxn74oHiZSU6+cVeZy62iPZMFMvKp4jupMFHelSICCMw1qELmUHPvuZSr+ZHDmNGgHcEpzJM5HN02kR7T4g+PQ==} @@ -111,44 +93,44 @@ packages: '@aws-crypto/util@5.2.0': resolution: {integrity: sha512-4RkU9EsI6ZpBve5fseQlGNUWKMa1RLPQ1dnjnQoe07ldfIzcsGb5hC5W0Dm7u423KWzawlrpbjXBrXCEv9zazQ==} - '@aws-sdk/client-bedrock-runtime@3.1035.0': - resolution: {integrity: sha512-XELIQk+znh53J2Bj0EmOftgcKRLw3tvI/P4WHLgSbSBWPh+wg0SvHu+bgIlzMHARbOC9auA0lsH+Eb9JwF1yjA==} + '@aws-sdk/client-bedrock-runtime@3.1040.0': + resolution: {integrity: sha512-tFCqtci1gVGIRwgK3tmv2DV2EawXjBIQgwM/7KaeL4wHUMhNMUA+POUw6vGowtQb51ZaSDjK3KzI3MaQskOyuw==} engines: {node: '>=20.0.0'} - '@aws-sdk/core@3.974.4': - resolution: {integrity: sha512-EbVgyzQ83/Lf6oh1O4vYY47tuYw3Aosthh865LNU77KyotKz+uvEBNmsl/bSVS/vG+IU39mCqcOHrnhmhF4lug==} + '@aws-sdk/core@3.974.7': + resolution: {integrity: sha512-YhRC90ofz5oolTJZlA8voU/oUrCB2azi8Usx51k8hhB5LpWbYQMMXKUqSqkoL0Cru+RQJgWTHpAfEDDIwfUhJw==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-env@3.972.30': - resolution: {integrity: sha512-dHpeqa29a0cBYq/h59IC2EK3AphLY96nKy4F35kBtiz9GuKDc32UYRTgjZaF8uuJCnqgw9omUZKR+9myyDHC2A==} + '@aws-sdk/credential-provider-env@3.972.33': + resolution: {integrity: sha512-bJV7eViSJV6GSuuN+VIdNVPdwPsNSf75BiC2v5alPrjR/OCcqgKwSZInKbDFz9mNeizldsyf67jt6YSIiv53Cw==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-http@3.972.32': - resolution: {integrity: sha512-A+ZTT//Mswkf9DFEM6XlngwOtYdD8X4CUcoZ2wdpgI8cCs9mcGeuhgTwbGJvealub/MeONOaUr3FbRPMKmTDjg==} + '@aws-sdk/credential-provider-http@3.972.35': + resolution: {integrity: sha512-x/BQGEIdq0oI+4WxLjKmnQvT7CnF9r8ezdGt7wXwxb7ckHXQz0Zmgxt8v3Ne0JaT3R5YefmuybHX6E8EnsDXyA==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-ini@3.972.34': - resolution: {integrity: sha512-MoRc7tLnx3JpFkV2R826enEfBUVN8o9Cc7y3hnbMwiWzL/VJhgfxRQzHkEL9vWorMWP7tibltsRcLoid9fsVdw==} + '@aws-sdk/credential-provider-ini@3.972.37': + resolution: {integrity: sha512-eUTpmWfd/BKsq9medhCRcu+GRAhFP2Zrn7/2jKDHHOOjCkhrMoTp/t4cEthqFoG7gE0VGp5wUxrXTdvBCmSmJg==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-login@3.972.34': - resolution: {integrity: sha512-XVSklkRRQ/CQDmv3VVFdZRl5hTFgncFhZrLyi0Ai4LZk5o3jpY5HIfuTK7ad7tixPKa+iQmL9+vg9qNyYZB+nw==} + '@aws-sdk/credential-provider-login@3.972.37': + resolution: {integrity: sha512-Ty68y8ISSC+g5Q3D0K8uAaoINwvfaOslnNpsF/LgVUxyosYXHawcK2yV4HLXDVugiTTYLQfJfcw0ce5meAGkKw==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-node@3.972.35': - resolution: {integrity: sha512-nVrY7AdGfzYgAa/jd9m06p3ES7QQDaB7zN9c+vXnVXxBRkAs9MjRDPB5AKogWuC6phddltfvHGFqLDJmyU9u/A==} + '@aws-sdk/credential-provider-node@3.972.38': + resolution: {integrity: sha512-BQ9XYnBDVxR2HuV5huXYQYF/PZMTsY+EnwfGnCU2cA8Zw63XpkOtPY8WqiMIZMQCrKPQQEiFURS/o9CIolRLqg==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-process@3.972.30': - resolution: {integrity: sha512-McJPomNTSEo+C6UA3Zq6pFrcyTUaVsoPPBOvbOHAoIFPc8Z2CMLndqFJOnB+9bVFiBTWQLutlVGmrocBbvv4MQ==} + '@aws-sdk/credential-provider-process@3.972.33': + resolution: {integrity: sha512-yfjGksI9WQbdMObb0VeLXqzTLI+a0qXLJT9gCDiv0+X/xjPpI3mTz6a5FibrhpuEKIe0gSgvs3MaoFZy5cx4WA==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-sso@3.972.34': - resolution: {integrity: sha512-WngYb2K+/yhkDOmDfAOjoCa9Ja3he0DZiAraboKwgWoVRkajDIcDYBCVbUTxtTUldvQoe7VvHLTrBNxvftN1aQ==} + '@aws-sdk/credential-provider-sso@3.972.37': + resolution: {integrity: sha512-fpwE+20ntpp3i9Xb9vUuQfXLDKYHH+5I2V+ZG96SX1nBzrruhy10RXDgmN7t1etOz3c55stlA3TeQASUA451NQ==} engines: {node: '>=20.0.0'} - '@aws-sdk/credential-provider-web-identity@3.972.34': - resolution: {integrity: sha512-5KLUH+XmSNRj6amJiJSrPsCxU5l/PYDfxyqPa1MxWhHoQC3sxvGPrSib3IE+HQlfRA4e2kO0bnJy7HJdjvpuuA==} + '@aws-sdk/credential-provider-web-identity@3.972.37': + resolution: {integrity: sha512-aryawqyebf+3WhAFNHfF62rekFpYtVcVN7dQ89qnAWsa4n5hJst8qBG6gXC24WHtW7Nnhkf9ScYnjwo0Brn3bw==} engines: {node: '>=20.0.0'} '@aws-sdk/eventstream-handler-node@3.972.14': @@ -171,32 +153,36 @@ packages: resolution: {integrity: sha512-+zz6f79Kj9V5qFK2P+D8Ehjnw4AhphAlCAsPjUqEcInA9umtSSKMrHbSagEeOIsDNuvVrH98bjRHcyQukTrhaQ==} engines: {node: '>=20.0.0'} - '@aws-sdk/middleware-sdk-s3@3.972.33': - resolution: {integrity: sha512-n8Eh/+kq3u/EodLr8n6sQupu03QGjf122RHXCTGLaHSkavz/2beSKpRlq2oDgfmJZNkAkWF113xbyaUmyOd+YA==} + '@aws-sdk/middleware-sdk-s3@3.972.36': + resolution: {integrity: sha512-YhPix+0x/MdQrb1Ug1GDKeS5fqylIy+naz800asX8II4jqfTk2KY2KhmmYCwZcky8YWtRQQwWCGdoqeAnip8Uw==} engines: {node: '>=20.0.0'} - '@aws-sdk/middleware-user-agent@3.972.34': - resolution: {integrity: sha512-jrmJHyYlTQocR7H4VhvSFhaoedMb2rmlOTvFWD6tNBQ/EVQhTsrNfQUYFuPiOc2wUGxbm5LgCHtnvVmCPgODHw==} + '@aws-sdk/middleware-user-agent@3.972.37': + resolution: {integrity: sha512-N1oNpdiLoVAWYD3WFBnUi3LlfoDA06ZHo4ozyjbsJNLvILzvt//0CnR8N+CZ0NWeYgVB/5V59ivixHCWCx2ALw==} engines: {node: '>=20.0.0'} '@aws-sdk/middleware-websocket@3.972.16': resolution: {integrity: sha512-86+S9oCyRVGzoMRpQhxkArp7kD2K75GPmaNevd9B6EyNhWoNvnCZZ3WbgN4j7ZT+jvtvBCGZvI2XHsWZJ+BRIg==} engines: {node: '>= 14.0.0'} - '@aws-sdk/nested-clients@3.997.2': - resolution: {integrity: sha512-uGGQO08YetrqfInOKG5atRMrCDRQWRuZ9gGfKY6svPmuE4K7ac+XcbCkpWpjcA7yCYsBaKB/Nly4XKgPXUO1PA==} + '@aws-sdk/nested-clients@3.997.5': + resolution: {integrity: sha512-jGFr6DxtcMTmzOkG/a0jCZYv4BBDmeNYVeO+/memSoDkYCJu4Y58xviYmzwJfYyIVSts+X/BVjJm1uGBnwHEMg==} engines: {node: '>=20.0.0'} '@aws-sdk/region-config-resolver@3.972.13': resolution: {integrity: sha512-CvJ2ZIjK/jVD/lbOpowBVElJyC1YxLTIJ13yM0AEo0t2v7swOzGjSA6lJGH+DwZXQhcjUjoYwc8bVYCX5MDr1A==} engines: {node: '>=20.0.0'} - '@aws-sdk/signature-v4-multi-region@3.996.21': - resolution: {integrity: sha512-3EpT+C0QdmTMB5aVeJ5odWSLt9vg2oGzUXl1xvUazKGlkr9OBYnegNWqhhjGgZdv8RmSi5eS8nqqB+euNP2aqA==} + '@aws-sdk/signature-v4-multi-region@3.996.24': + resolution: {integrity: sha512-amP7tLikppN940wbBFISYqiuzVmpzMS9U3mcgtmVLjX4fdWI/SNCvrXv6ZxfVzTT4cT0rPKOLhFah2xLwzREWw==} engines: {node: '>=20.0.0'} - '@aws-sdk/token-providers@3.1035.0': - resolution: {integrity: sha512-E6IO3Cn+OzBe6Sb5pnubd5Y8qSUMAsVKkD5QSwFfIx5fV1g5SkYwUDRDyPlm90RuIVcCo28wpMJU6W8wXH46Aw==} + '@aws-sdk/token-providers@3.1039.0': + resolution: {integrity: sha512-NMSFL2HwkAOoCeLCQiqoOq5pT3vVbSjww2QZTuYgYknVwhhv125PSDzZIcL5EYnlxuPWjEOdauZK+FspkZDVdw==} + engines: {node: '>=20.0.0'} + + '@aws-sdk/token-providers@3.1040.0': + resolution: {integrity: sha512-0KTpz2KqASQwzLOywV1bS2TX6Su0bARkATgpSu236BDM/D/6cMQ2EPiFwoRYwwvXsWSDn8KkKp9NV2ZWWA53Xw==} engines: {node: '>=20.0.0'} '@aws-sdk/types@3.973.8': @@ -215,15 +201,15 @@ packages: resolution: {integrity: sha512-DEKiHNJVtNxdyTeQspzY+15Po/kHm6sF0Cs4HV9Q2+lplB63+DrvdeiSoOSdWEWAoO2RcY1veoXVDz2tWxWCgQ==} engines: {node: '>=20.0.0'} - '@aws-sdk/util-locate-window@3.965.4': - resolution: {integrity: sha512-H1onv5SkgPBK2P6JR2MjGgbOnttoNzSPIRoeZTNPZYyaplwGg50zS3amXvXqF0/qfXpWEC9rLWU564QTB9bSog==} + '@aws-sdk/util-locate-window@3.965.5': + resolution: {integrity: sha512-WhlJNNINQB+9qtLtZJcpQdgZw3SCDCpXdUJP7cToGwHbCWCnRckGlc6Bx/OhWwIYFNAn+FIydY8SZ0QmVu3xTQ==} engines: {node: '>=20.0.0'} '@aws-sdk/util-user-agent-browser@3.972.10': resolution: {integrity: sha512-FAzqXvfEssGdSIz8ejatan0bOdx1qefBWKF/gWmVBXIP1HkS7v/wjjaqrAGGKvyihrXTXW00/2/1nTJtxpXz7g==} - '@aws-sdk/util-user-agent-node@3.973.20': - resolution: {integrity: sha512-owEqyKr0z5hWwk+uHwudwNhyFMZ9f9eSWr/k/XD6yeDCI7hHyc56s4UOY1iBQmoramTbdAY4UCuLLEuKmjVXrg==} + '@aws-sdk/util-user-agent-node@3.973.23': + resolution: {integrity: sha512-gGwq8L2Euw0aNG6Ey4EktiAo3fSCVoDy1CaBIthd+oeaKHPXUrNaApMewQ6La5Hv0lcznOtECZaNvYyc5LXXfA==} engines: {node: '>=20.0.0'} peerDependencies: aws-crt: '>=1.0.0' @@ -231,12 +217,12 @@ packages: aws-crt: optional: true - '@aws-sdk/xml-builder@3.972.18': - resolution: {integrity: sha512-BMDNVG1ETXRhl1tnisQiYBef3RShJ1kfZA7x7afivTFMLirfHNTb6U71K569HNXhSXbQZsweHvSDZ6euBw8hPA==} + '@aws-sdk/xml-builder@3.972.22': + resolution: {integrity: sha512-PMYKKtJd70IsSG0yHrdAbxBr+ZWBKLvzFZfD3/urxgf6hXVMzuU5M+3MJ5G67RpOmLBu1fAUN65SbWuKUCOlAA==} engines: {node: '>=20.0.0'} - '@aws/lambda-invoke-store@0.2.3': - resolution: {integrity: sha512-oLvsaPMTBejkkmHhjf09xTgk71mOqyr/409NKhRIL08If7AhVfUsJhVsx386uJaqNd42v9kWamQ9lFbkoC2dYw==} + '@aws/lambda-invoke-store@0.2.4': + resolution: {integrity: sha512-iY8yvjE0y651BixKNPgmv1WrQc+GZ142sb0z4gYnChDDY2YqI4P/jsSopBWrKfAt7LOJAkOXt7rC/hms+WclQQ==} engines: {node: '>=18.0.0'} '@babel/code-frame@7.29.0': @@ -247,230 +233,232 @@ packages: resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} engines: {node: '>=6.9.0'} - '@babel/runtime@7.28.6': - resolution: {integrity: sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==} + '@babel/runtime@7.29.2': + resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} engines: {node: '>=6.9.0'} - '@biomejs/biome@2.4.10': - resolution: {integrity: sha512-xxA3AphFQ1geij4JTHXv4EeSTda1IFn22ye9LdyVPoJU19fNVl0uzfEuhsfQ4Yue/0FaLs2/ccVi4UDiE7R30w==} + '@biomejs/biome@2.4.13': + resolution: {integrity: sha512-gLXOwkOBBg0tr7bDsqlkIh4uFeKuMjxvqsrb1Tukww1iDmHcfr4Uu8MoQxp0Rcte+69+osRNWXwHsu/zxT6XqA==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@2.4.10': - resolution: {integrity: sha512-vuzzI1cWqDVzOMIkYyHbKqp+AkQq4K7k+UCXWpkYcY/HDn1UxdsbsfgtVpa40shem8Kax4TLDLlx8kMAecgqiw==} + '@biomejs/cli-darwin-arm64@2.4.13': + resolution: {integrity: sha512-2KImO1jhNFBa2oWConyr0x6flxbQpGKv6902uGXpYM62Xyem8U80j441SyUJ8KyngsmKbQjeIv1q2CQfDkNnYg==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@2.4.10': - resolution: {integrity: sha512-14fzASRo+BPotwp7nWULy2W5xeUyFnTaq1V13Etrrxkrih+ez/2QfgFm5Ehtf5vSjtgx/IJycMMpn5kPd5ZNaA==} + '@biomejs/cli-darwin-x64@2.4.13': + resolution: {integrity: sha512-BKrJklbaFN4p1Ts4kPBczo+PkbsHQg57kmJ+vON9u2t6uN5okYHaSr7h/MutPCWQgg2lglaWoSmm+zhYW+oOkg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@2.4.10': - resolution: {integrity: sha512-WrJY6UuiSD/Dh+nwK2qOTu8kdMDlLV3dLMmychIghHPAysWFq1/DGC1pVZx8POE3ZkzKR3PUUnVrtZfMfaJjyQ==} + '@biomejs/cli-linux-arm64-musl@2.4.13': + resolution: {integrity: sha512-U5MsuBQW25dXaYtqWWSPM3P96H6Y+fHuja3TQpMNnylocHW0tEbtFTDlUj6oM+YJLntvEkQy4grBvQNUD4+RCg==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@2.4.10': - resolution: {integrity: sha512-7MH1CMW5uuxQ/s7FLST63qF8B3Hgu2HRdZ7tA1X1+mk+St4JOuIrqdhIBnnyqeyWJNI+Bww7Es5QZ0wIc1Cmkw==} + '@biomejs/cli-linux-arm64@2.4.13': + resolution: {integrity: sha512-NzkUDSqfvMBrPplKgVr3aXLHZ2NEELvvF4vZxXulEylKWIGqlvNEcwUcj9OLrn75TD3lJ/GIqCVlBwd1MZCuYQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@2.4.10': - resolution: {integrity: sha512-kDTi3pI6PBN6CiczsWYOyP2zk0IJI08EWEQyDMQWW221rPaaEz6FvjLhnU07KMzLv8q3qSuoB93ua6inSQ55Tw==} + '@biomejs/cli-linux-x64-musl@2.4.13': + resolution: {integrity: sha512-Z601MienRgTBDza/+u2CH3RSrWoXo9rtr8NK6A4KJzqGgfxx+H3VlyLgTJ4sRo40T3pIsqpTmiOQEvYzQvBRvQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@2.4.10': - resolution: {integrity: sha512-tZLvEEi2u9Xu1zAqRjTcpIDGVtldigVvzug2fTuPG0ME/g8/mXpRPcNgLB22bGn6FvLJpHHnqLnwliOu8xjYrg==} + '@biomejs/cli-linux-x64@2.4.13': + resolution: {integrity: sha512-Az3ZZedYRBo9EQzNnD9SxFcR1G5QsGo6VEc2hIyVPZ1rdKwee/7E9oeBBZFpE8Z44ekxsDQBqbiWGW5ShOhUSQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@2.4.10': - resolution: {integrity: sha512-umwQU6qPzH+ISTf/eHyJ/QoQnJs3V9Vpjz2OjZXe9MVBZ7prgGafMy7yYeRGnlmDAn87AKTF3Q6weLoMGpeqdQ==} + '@biomejs/cli-win32-arm64@2.4.13': + resolution: {integrity: sha512-Px9PS2B5/Q183bUwy/5VHqp3J2lzdOCeVGzMpphYfl8oSa7VDCqenBdqWpy6DCy/en4Rbf/Y1RieZF6dJPcc9A==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@2.4.10': - resolution: {integrity: sha512-aW/JU5GuyH4uxMrNYpoC2kjaHlyJGLgIa3XkhPEZI0uKhZhJZU8BuEyJmvgzSPQNGozBwWjC972RaNdcJ9KyJg==} + '@biomejs/cli-win32-x64@2.4.13': + resolution: {integrity: sha512-tTcMkXyBrmHi9BfrD2VNHs/5rYIUKETqsBlYOvSAABwBkJhSDVb5e7wPukftsQbO3WzQkXe6kaztC6WtUOXSoQ==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] - '@borewit/text-codec@0.2.1': - resolution: {integrity: sha512-k7vvKPbf7J2fZ5klGRD9AeKfUvojuZIQ3BT5u7Jfv+puwXkUBUT5PVyMDfJZpy30CBDXGMgw7fguK/lpOMBvgw==} + '@borewit/text-codec@0.2.2': + resolution: {integrity: sha512-DDaRehssg1aNrH4+2hnj1B7vnUGEjU6OIlyRdkMd0aUdIUvKXrJfXsy8LVtXAy7DRvYVluWbMspsRhz2lcW0mQ==} '@canvas/image-data@1.1.0': resolution: {integrity: sha512-QdObRRjRbcXGmM1tmJ+MrHcaz1MftF2+W7YI+MsphnsCrmtyfS0d5qJbk0MeSbUeyM/jCb0hmnkXPsy026L7dA==} - '@clack/core@1.2.0': - resolution: {integrity: sha512-qfxof/3T3t9DPU/Rj3OmcFyZInceqj/NVtO9rwIuJqCUgh32gwPjpFQQp/ben07qKlhpwq7GzfWpST4qdJ5Drg==} + '@clack/core@1.3.0': + resolution: {integrity: sha512-xJPHpAmEQUBrXSLx0gF+q5K/IyihXpsHZcha+jB+tyahsKRK3Dxo4D0coZDewHo12NhiuzC3dTtMPbm53GEAAA==} + engines: {node: '>= 20.12.0'} - '@clack/prompts@1.2.0': - resolution: {integrity: sha512-4jmztR9fMqPMjz6H/UZXj0zEmE43ha1euENwkckKKel4XpSfokExPo5AiVStdHSAlHekz4d0CA/r45Ok1E4D3w==} + '@clack/prompts@1.3.0': + resolution: {integrity: sha512-GgcWwRCs/xPtaqlMy8qRhPnZf9vlWcWZNHAitnVQ3yk7JmSralSiq5q07yaffYE8SogtDm7zFeKccx1QNVARpw==} + engines: {node: '>= 20.12.0'} - '@emnapi/runtime@1.8.1': - resolution: {integrity: sha512-mehfKSMWjjNol8659Z8KxEMrdSJDDot5SXMq00dM8BN4o+CLNXQ0xH2V7EchNHV4RmbZLmmPdEaXZc5H2FXmDg==} + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} - '@esbuild/aix-ppc64@0.27.3': - resolution: {integrity: sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==} + '@esbuild/aix-ppc64@0.27.7': + resolution: {integrity: sha512-EKX3Qwmhz1eMdEJokhALr0YiD0lhQNwDqkPYyPhiSwKrh7/4KRjQc04sZ8db+5DVVnZ1LmbNDI1uAMPEUBnQPg==} engines: {node: '>=18'} cpu: [ppc64] os: [aix] - '@esbuild/android-arm64@0.27.3': - resolution: {integrity: sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==} + '@esbuild/android-arm64@0.27.7': + resolution: {integrity: sha512-62dPZHpIXzvChfvfLJow3q5dDtiNMkwiRzPylSCfriLvZeq0a1bWChrGx/BbUbPwOrsWKMn8idSllklzBy+dgQ==} engines: {node: '>=18'} cpu: [arm64] os: [android] - '@esbuild/android-arm@0.27.3': - resolution: {integrity: sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==} + '@esbuild/android-arm@0.27.7': + resolution: {integrity: sha512-jbPXvB4Yj2yBV7HUfE2KHe4GJX51QplCN1pGbYjvsyCZbQmies29EoJbkEc+vYuU5o45AfQn37vZlyXy4YJ8RQ==} engines: {node: '>=18'} cpu: [arm] os: [android] - '@esbuild/android-x64@0.27.3': - resolution: {integrity: sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==} + '@esbuild/android-x64@0.27.7': + resolution: {integrity: sha512-x5VpMODneVDb70PYV2VQOmIUUiBtY3D3mPBG8NxVk5CogneYhkR7MmM3yR/uMdITLrC1ml/NV1rj4bMJuy9MCg==} engines: {node: '>=18'} cpu: [x64] os: [android] - '@esbuild/darwin-arm64@0.27.3': - resolution: {integrity: sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==} + '@esbuild/darwin-arm64@0.27.7': + resolution: {integrity: sha512-5lckdqeuBPlKUwvoCXIgI2D9/ABmPq3Rdp7IfL70393YgaASt7tbju3Ac+ePVi3KDH6N2RqePfHnXkaDtY9fkw==} engines: {node: '>=18'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-x64@0.27.3': - resolution: {integrity: sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==} + '@esbuild/darwin-x64@0.27.7': + resolution: {integrity: sha512-rYnXrKcXuT7Z+WL5K980jVFdvVKhCHhUwid+dDYQpH+qu+TefcomiMAJpIiC2EM3Rjtq0sO3StMV/+3w3MyyqQ==} engines: {node: '>=18'} cpu: [x64] os: [darwin] - '@esbuild/freebsd-arm64@0.27.3': - resolution: {integrity: sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==} + '@esbuild/freebsd-arm64@0.27.7': + resolution: {integrity: sha512-B48PqeCsEgOtzME2GbNM2roU29AMTuOIN91dsMO30t+Ydis3z/3Ngoj5hhnsOSSwNzS+6JppqWsuhTp6E82l2w==} engines: {node: '>=18'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-x64@0.27.3': - resolution: {integrity: sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==} + '@esbuild/freebsd-x64@0.27.7': + resolution: {integrity: sha512-jOBDK5XEjA4m5IJK3bpAQF9/Lelu/Z9ZcdhTRLf4cajlB+8VEhFFRjWgfy3M1O4rO2GQ/b2dLwCUGpiF/eATNQ==} engines: {node: '>=18'} cpu: [x64] os: [freebsd] - '@esbuild/linux-arm64@0.27.3': - resolution: {integrity: sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==} + '@esbuild/linux-arm64@0.27.7': + resolution: {integrity: sha512-RZPHBoxXuNnPQO9rvjh5jdkRmVizktkT7TCDkDmQ0W2SwHInKCAV95GRuvdSvA7w4VMwfCjUiPwDi0ZO6Nfe9A==} engines: {node: '>=18'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm@0.27.3': - resolution: {integrity: sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==} + '@esbuild/linux-arm@0.27.7': + resolution: {integrity: sha512-RkT/YXYBTSULo3+af8Ib0ykH8u2MBh57o7q/DAs3lTJlyVQkgQvlrPTnjIzzRPQyavxtPtfg0EopvDyIt0j1rA==} engines: {node: '>=18'} cpu: [arm] os: [linux] - '@esbuild/linux-ia32@0.27.3': - resolution: {integrity: sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==} + '@esbuild/linux-ia32@0.27.7': + resolution: {integrity: sha512-GA48aKNkyQDbd3KtkplYWT102C5sn/EZTY4XROkxONgruHPU72l+gW+FfF8tf2cFjeHaRbWpOYa/uRBz/Xq1Pg==} engines: {node: '>=18'} cpu: [ia32] os: [linux] - '@esbuild/linux-loong64@0.27.3': - resolution: {integrity: sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==} + '@esbuild/linux-loong64@0.27.7': + resolution: {integrity: sha512-a4POruNM2oWsD4WKvBSEKGIiWQF8fZOAsycHOt6JBpZ+JN2n2JH9WAv56SOyu9X5IqAjqSIPTaJkqN8F7XOQ5Q==} engines: {node: '>=18'} cpu: [loong64] os: [linux] - '@esbuild/linux-mips64el@0.27.3': - resolution: {integrity: sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==} + '@esbuild/linux-mips64el@0.27.7': + resolution: {integrity: sha512-KabT5I6StirGfIz0FMgl1I+R1H73Gp0ofL9A3nG3i/cYFJzKHhouBV5VWK1CSgKvVaG4q1RNpCTR2LuTVB3fIw==} engines: {node: '>=18'} cpu: [mips64el] os: [linux] - '@esbuild/linux-ppc64@0.27.3': - resolution: {integrity: sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==} + '@esbuild/linux-ppc64@0.27.7': + resolution: {integrity: sha512-gRsL4x6wsGHGRqhtI+ifpN/vpOFTQtnbsupUF5R5YTAg+y/lKelYR1hXbnBdzDjGbMYjVJLJTd2OFmMewAgwlQ==} engines: {node: '>=18'} cpu: [ppc64] os: [linux] - '@esbuild/linux-riscv64@0.27.3': - resolution: {integrity: sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==} + '@esbuild/linux-riscv64@0.27.7': + resolution: {integrity: sha512-hL25LbxO1QOngGzu2U5xeXtxXcW+/GvMN3ejANqXkxZ/opySAZMrc+9LY/WyjAan41unrR3YrmtTsUpwT66InQ==} engines: {node: '>=18'} cpu: [riscv64] os: [linux] - '@esbuild/linux-s390x@0.27.3': - resolution: {integrity: sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==} + '@esbuild/linux-s390x@0.27.7': + resolution: {integrity: sha512-2k8go8Ycu1Kb46vEelhu1vqEP+UeRVj2zY1pSuPdgvbd5ykAw82Lrro28vXUrRmzEsUV0NzCf54yARIK8r0fdw==} engines: {node: '>=18'} cpu: [s390x] os: [linux] - '@esbuild/linux-x64@0.27.3': - resolution: {integrity: sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==} + '@esbuild/linux-x64@0.27.7': + resolution: {integrity: sha512-hzznmADPt+OmsYzw1EE33ccA+HPdIqiCRq7cQeL1Jlq2gb1+OyWBkMCrYGBJ+sxVzve2ZJEVeePbLM2iEIZSxA==} engines: {node: '>=18'} cpu: [x64] os: [linux] - '@esbuild/netbsd-arm64@0.27.3': - resolution: {integrity: sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==} + '@esbuild/netbsd-arm64@0.27.7': + resolution: {integrity: sha512-b6pqtrQdigZBwZxAn1UpazEisvwaIDvdbMbmrly7cDTMFnw/+3lVxxCTGOrkPVnsYIosJJXAsILG9XcQS+Yu6w==} engines: {node: '>=18'} cpu: [arm64] os: [netbsd] - '@esbuild/netbsd-x64@0.27.3': - resolution: {integrity: sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==} + '@esbuild/netbsd-x64@0.27.7': + resolution: {integrity: sha512-OfatkLojr6U+WN5EDYuoQhtM+1xco+/6FSzJJnuWiUw5eVcicbyK3dq5EeV/QHT1uy6GoDhGbFpprUiHUYggrw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] - '@esbuild/openbsd-arm64@0.27.3': - resolution: {integrity: sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==} + '@esbuild/openbsd-arm64@0.27.7': + resolution: {integrity: sha512-AFuojMQTxAz75Fo8idVcqoQWEHIXFRbOc1TrVcFSgCZtQfSdc1RXgB3tjOn/krRHENUB4j00bfGjyl2mJrU37A==} engines: {node: '>=18'} cpu: [arm64] os: [openbsd] - '@esbuild/openbsd-x64@0.27.3': - resolution: {integrity: sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==} + '@esbuild/openbsd-x64@0.27.7': + resolution: {integrity: sha512-+A1NJmfM8WNDv5CLVQYJ5PshuRm/4cI6WMZRg1by1GwPIQPCTs1GLEUHwiiQGT5zDdyLiRM/l1G0Pv54gvtKIg==} engines: {node: '>=18'} cpu: [x64] os: [openbsd] - '@esbuild/openharmony-arm64@0.27.3': - resolution: {integrity: sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==} + '@esbuild/openharmony-arm64@0.27.7': + resolution: {integrity: sha512-+KrvYb/C8zA9CU/g0sR6w2RBw7IGc5J2BPnc3dYc5VJxHCSF1yNMxTV5LQ7GuKteQXZtspjFbiuW5/dOj7H4Yw==} engines: {node: '>=18'} cpu: [arm64] os: [openharmony] - '@esbuild/sunos-x64@0.27.3': - resolution: {integrity: sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==} + '@esbuild/sunos-x64@0.27.7': + resolution: {integrity: sha512-ikktIhFBzQNt/QDyOL580ti9+5mL/YZeUPKU2ivGtGjdTYoqz6jObj6nOMfhASpS4GU4Q/Clh1QtxWAvcYKamA==} engines: {node: '>=18'} cpu: [x64] os: [sunos] - '@esbuild/win32-arm64@0.27.3': - resolution: {integrity: sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==} + '@esbuild/win32-arm64@0.27.7': + resolution: {integrity: sha512-7yRhbHvPqSpRUV7Q20VuDwbjW5kIMwTHpptuUzV+AA46kiPze5Z7qgt6CLCK3pWFrHeNfDd1VKgyP4O+ng17CA==} engines: {node: '>=18'} cpu: [arm64] os: [win32] - '@esbuild/win32-ia32@0.27.3': - resolution: {integrity: sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==} + '@esbuild/win32-ia32@0.27.7': + resolution: {integrity: sha512-SmwKXe6VHIyZYbBLJrhOoCJRB/Z1tckzmgTLfFYOfpMAx63BJEaL9ExI8x7v0oAO3Zh6D/Oi1gVxEYr5oUCFhw==} engines: {node: '>=18'} cpu: [ia32] os: [win32] - '@esbuild/win32-x64@0.27.3': - resolution: {integrity: sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==} + '@esbuild/win32-x64@0.27.7': + resolution: {integrity: sha512-56hiAJPhwQ1R4i+21FVF7V8kSD5zZTdHcVuRFMW0hn753vVfQN8xlx4uOPT4xoGH0Z/oVATuR82AiqSTDIpaHg==} engines: {node: '>=18'} cpu: [x64] os: [win32] @@ -490,8 +478,8 @@ packages: '@floating-ui/utils@0.2.11': resolution: {integrity: sha512-RiB/yIh78pcIxl6lLMG0CgBXAZ2Y0eVHqMPYugu+9U0AeT6YBeiJpf7lbdJNIugFP5SIjwNRgo4DhR1Qxi26Gg==} - '@google/genai@1.49.0': - resolution: {integrity: sha512-hO69Zl0H3x+L0KL4stl1pLYgnqnwHoLqtKy6MRlNnW8TAxjqMdOUVafomKd4z1BePkzoxJWbYILny9a2Zk43VQ==} + '@google/genai@1.51.0': + resolution: {integrity: sha512-vTZZF3CSimN7cn2zsLpW2p5WF0eZa5Gz69ITMPCNHpPrDlAstOfGifSfi0p/s9Z9400f7xJRkgvkQNrcM7pJ6w==} engines: {node: '>=20.0.0'} peerDependencies: '@modelcontextprotocol/sdk': ^1.25.2 @@ -499,258 +487,117 @@ packages: '@modelcontextprotocol/sdk': optional: true - '@homebridge/ciao@1.3.6': - resolution: {integrity: sha512-2F9N/15Q/GnoBXimr8PFg7fb1QrAQBvuZpaW2kseWOOy14Lzc3yZB1mT9N1Ju/4hlkboU33uHxtOxZkvkPoE/w==} - hasBin: true - - '@hono/node-server@1.19.13': - resolution: {integrity: sha512-TsQLe4i2gvoTtrHje625ngThGBySOgSK3Xo2XRYOdqGN1teR8+I7vchQC46uLJi8OF62YTYA3AhSpumtkhsaKQ==} + '@hono/node-server@1.19.14': + resolution: {integrity: sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 - '@img/colour@1.1.0': - resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} - engines: {node: '>=18'} - '@img/sharp-darwin-arm64@0.33.5': resolution: {integrity: sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [darwin] - '@img/sharp-darwin-arm64@0.34.5': - resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [darwin] - '@img/sharp-darwin-x64@0.33.5': resolution: {integrity: sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [darwin] - '@img/sharp-darwin-x64@0.34.5': - resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.0.4': resolution: {integrity: sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==} cpu: [arm64] os: [darwin] - '@img/sharp-libvips-darwin-arm64@1.2.4': - resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==} - cpu: [arm64] - os: [darwin] - '@img/sharp-libvips-darwin-x64@1.0.4': resolution: {integrity: sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==} cpu: [x64] os: [darwin] - '@img/sharp-libvips-darwin-x64@1.2.4': - resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==} - cpu: [x64] - os: [darwin] - '@img/sharp-libvips-linux-arm64@1.0.4': resolution: {integrity: sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linux-arm64@1.2.4': - resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} - cpu: [arm64] - os: [linux] - '@img/sharp-libvips-linux-arm@1.0.5': resolution: {integrity: sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==} cpu: [arm] os: [linux] - '@img/sharp-libvips-linux-arm@1.2.4': - resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} - cpu: [arm] - os: [linux] - - '@img/sharp-libvips-linux-ppc64@1.2.4': - resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} - cpu: [ppc64] - os: [linux] - - '@img/sharp-libvips-linux-riscv64@1.2.4': - resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} - cpu: [riscv64] - os: [linux] - '@img/sharp-libvips-linux-s390x@1.0.4': resolution: {integrity: sha512-u7Wz6ntiSSgGSGcjZ55im6uvTrOxSIS8/dgoVMoiGE9I6JAfU50yH5BoDlYA1tcuGS7g/QNtetJnxA6QEsCVTA==} cpu: [s390x] os: [linux] - '@img/sharp-libvips-linux-s390x@1.2.4': - resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} - cpu: [s390x] - os: [linux] - '@img/sharp-libvips-linux-x64@1.0.4': resolution: {integrity: sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==} cpu: [x64] os: [linux] - '@img/sharp-libvips-linux-x64@1.2.4': - resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} - cpu: [x64] - os: [linux] - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': resolution: {integrity: sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==} cpu: [arm64] os: [linux] - '@img/sharp-libvips-linuxmusl-arm64@1.2.4': - resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} - cpu: [arm64] - os: [linux] - '@img/sharp-libvips-linuxmusl-x64@1.0.4': resolution: {integrity: sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==} cpu: [x64] os: [linux] - '@img/sharp-libvips-linuxmusl-x64@1.2.4': - resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} - cpu: [x64] - os: [linux] - '@img/sharp-linux-arm64@0.33.5': resolution: {integrity: sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - '@img/sharp-linux-arm64@0.34.5': - resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - '@img/sharp-linux-arm@0.33.5': resolution: {integrity: sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm] os: [linux] - '@img/sharp-linux-arm@0.34.5': - resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm] - os: [linux] - - '@img/sharp-linux-ppc64@0.34.5': - resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [ppc64] - os: [linux] - - '@img/sharp-linux-riscv64@0.34.5': - resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [riscv64] - os: [linux] - '@img/sharp-linux-s390x@0.33.5': resolution: {integrity: sha512-y/5PCd+mP4CA/sPDKl2961b+C9d+vPAveS33s6Z3zfASk2j5upL6fXVPZi7ztePZ5CuH+1kW8JtvxgbuXHRa4Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [s390x] os: [linux] - '@img/sharp-linux-s390x@0.34.5': - resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [s390x] - os: [linux] - '@img/sharp-linux-x64@0.33.5': resolution: {integrity: sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - '@img/sharp-linux-x64@0.34.5': - resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - '@img/sharp-linuxmusl-arm64@0.33.5': resolution: {integrity: sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [linux] - '@img/sharp-linuxmusl-arm64@0.34.5': - resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [linux] - '@img/sharp-linuxmusl-x64@0.33.5': resolution: {integrity: sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [linux] - '@img/sharp-linuxmusl-x64@0.34.5': - resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [linux] - '@img/sharp-wasm32@0.33.5': resolution: {integrity: sha512-ykUW4LVGaMcU9lu9thv85CbRMAwfeadCJHRsg2GmeRa/cJxsVY9Rbd57JcMxBkKHag5U/x7TSBpScF4U8ElVzg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [wasm32] - '@img/sharp-wasm32@0.34.5': - resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [wasm32] - - '@img/sharp-win32-arm64@0.34.5': - resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [arm64] - os: [win32] - '@img/sharp-win32-ia32@0.33.5': resolution: {integrity: sha512-T36PblLaTwuVJ/zw/LaH0PdZkRz5rd3SmMHX8GSmR7vtNSP5Z6bQkExdSK7xGWyxLw4sUknBuugTelgw2faBbQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [ia32] os: [win32] - '@img/sharp-win32-ia32@0.34.5': - resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [ia32] - os: [win32] - '@img/sharp-win32-x64@0.33.5': resolution: {integrity: sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [win32] - '@img/sharp-win32-x64@0.34.5': - resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [x64] - os: [win32] - '@inquirer/ansi@1.0.2': resolution: {integrity: sha512-S8qNSZiYzFd0wAcyG5AXCvUHC5Sr7xpZ9wZ2py9XR88jUz8wooStVx5M6dRzczbBWjic9NP7+rY0Xi7qqK/aMQ==} engines: {node: '>=18'} @@ -1015,30 +862,30 @@ packages: cpu: [x64] os: [win32] - '@mariozechner/clipboard@0.3.2': - resolution: {integrity: sha512-IHQpksNjo7EAtGuHFU+tbWDp5LarH3HU/8WiB9O70ZEoBPHOg0/6afwSLK0QyNMMmx4Bpi/zl6+DcBXe95nWYA==} + '@mariozechner/clipboard@0.3.5': + resolution: {integrity: sha512-D3F+UrU9CR7roJt0zDLp6Oc+4/KlLDIrN4frH+6V90SJNW2KKUec1oCQIPaaDjCqeOsQyX9dyqYbImIQIM45PA==} engines: {node: '>= 10'} '@mariozechner/jiti@2.6.5': resolution: {integrity: sha512-faGUlTcXka5l7rv0lP3K3vGW/ejRuOS24RR2aSFWREUQqzjgdsuWNo/IiPqL3kWRGt6Ahl2+qcDAwtdeWeuGUw==} hasBin: true - '@mariozechner/pi-agent-core@0.70.0': - resolution: {integrity: sha512-ZwfM5QPvSwza/apZhPIXjrI/blJBFqbVpK30ma4zNwH8VAyseKlzGDExCx/k+81Xydg60sQuG2BQVkYGmofuSg==} + '@mariozechner/pi-agent-core@0.70.6': + resolution: {integrity: sha512-PovJZJqhY4ajgTJRUcLzfWKnlQuJHxHW3T030CafR9LYeLmOHi/HGS8DbCdRgSJNbnoIG+kl67/7++9DKZ2+sg==} engines: {node: '>=20.0.0'} - '@mariozechner/pi-ai@0.70.0': - resolution: {integrity: sha512-lVT9bb0eFkNr5YXvZ5r00TNA5r110fOO8uJV9VLCQ5GdtunWIjcptWitzIjjl2MF0/NDs7Kb2EwZctXQWWP7eA==} + '@mariozechner/pi-ai@0.70.6': + resolution: {integrity: sha512-LVAadu0Y+hb7Bj7EDiLsx6AuGxHlxDq0euLzyqX698i9qt0BW6a+oQSUIZQz4rJwExF18OvyL7ygJ5781ojrIQ==} engines: {node: '>=20.0.0'} hasBin: true - '@mariozechner/pi-coding-agent@0.70.0': - resolution: {integrity: sha512-Sw5odG9BYIcRItb/o4Gmq0nSIgoWfx61Isjk3Gk4KqocxHZAOwZZYQ4mgb4GCsevqOMmAzX/H6PC52/TiN76fw==} + '@mariozechner/pi-coding-agent@0.70.6': + resolution: {integrity: sha512-S4hUZghBeHPqsL6+DNg/TbGLziSh5+/mEHPVlYq5y6ImirWXhISLdLCnyZUW83OblKWihmG7unhJXiHQTH82mQ==} engines: {node: '>=20.6.0'} hasBin: true - '@mariozechner/pi-tui@0.70.0': - resolution: {integrity: sha512-x/CwIMP8v9KNrmgEFA0+AWIwSWeNAitEI4eVQtQ6q2a0PpE+vx1+j2oc+iDPe7E1YqrMHXaNlHJVCaVAv/UYrg==} + '@mariozechner/pi-tui@0.70.6': + resolution: {integrity: sha512-orBJEwMdpBC38AXfdVBKT5ZvqNTcKg6g3NdoF5a9aNQzDI/dOTu1UNYFYyEOTFRiTxSR1nw8eovbCcaSyekWfw==} engines: {node: '>=20.0.0'} '@mdx-js/mdx@3.1.1': @@ -1050,19 +897,19 @@ packages: '@types/react': '>=16' react: '>=16' - '@mintlify/cli@4.0.1090': - resolution: {integrity: sha512-SDA+KrZcMBoatfXujr+JeDEJkJ4kMpFKeeWPnC/vFJ4ojrGXfD0hWdSIdJ5MjLKfs2QtLqbvQErp7yBrj5r/QA==} + '@mintlify/cli@4.0.1146': + resolution: {integrity: sha512-G6nSUeHx3Q1lS7mwhWOUY3YOupPEgyo4UkUbc9Acg1cS9b8IhlQWX2PQnIek50TXVIY1I6qsOen+RLLdKCwhUQ==} engines: {node: '>=18.0.0'} hasBin: true '@mintlify/common@1.0.661': resolution: {integrity: sha512-/Hdiblzaomp+AWStQ4smhVMgesQhffzQjC9aYBnmLReNdh2Js+ccQFUaWL3TNIxwiS2esaZvsHSV/D+zyRS3hg==} - '@mintlify/common@1.0.835': - resolution: {integrity: sha512-JP73YjY85KmFyvh2xEkAzjoFVYXo6QdoXF1RtdDEZdOGph3hw06MxukiuvRDaXJbfpXVyLBWCkUuaUWVbcyqkA==} + '@mintlify/common@1.0.876': + resolution: {integrity: sha512-E9NN+0lyudwJ+m2oPXT+ZwX1M73m5B9zBpqFj81cZng6MVezMYo+yvNCtLVS6HV/THHos3vJKshNEXqoS9Cuzg==} - '@mintlify/link-rot@3.0.1010': - resolution: {integrity: sha512-XtIuDv/KTmRrMUNxlxke77+k163FLgm0I+e/U8PO1mlrBpnp2yiOi/mMvH4cfQpxFjjSJ6Apl5urH2nsircHKA==} + '@mintlify/link-rot@3.0.1054': + resolution: {integrity: sha512-xo1FKxQAcfzoDCHXnq153AG1EqUQDfIDhYD+h9olkhP4ZGQyzlLx/wdH4KxQiO9jW88NNAXpEavcN+udtaJBaA==} engines: {node: '>=18.0.0'} '@mintlify/mdx@3.0.4': @@ -1076,19 +923,19 @@ packages: resolution: {integrity: sha512-LIUkfA7l7ypHAAuOW74ZJws/NwNRqlDRD/U466jarXvvSlGhJec/6J4/I+IEcBvWDnc9anLFKmnGO04jPKgAsg==} engines: {node: '>=18.0.0'} - '@mintlify/models@0.0.287': - resolution: {integrity: sha512-3i1iateUUd21zVDEXIB0BUN0vcgD9WsfaXO/jB264LQCWXVI9nJEbfEXPeXVHUHwjKAExoRre5YXtb8BpWsmlA==} + '@mintlify/models@0.0.303': + resolution: {integrity: sha512-O4Y3x4Yxui6ki4oGREwqkQ2kCC44mHE0FTYCjDvsgkwqVWRO5H35q7xaLIPyoU+Fckgn2QZ2l4YhO/wxvohnlA==} engines: {node: '>=18.0.0'} '@mintlify/openapi-parser@0.0.8': resolution: {integrity: sha512-9MBRq9lS4l4HITYCrqCL7T61MOb20q9IdU7HWhqYMNMM1jGO1nHjXasFy61yZ8V6gMZyyKQARGVoZ0ZrYN48Og==} engines: {node: '>=18'} - '@mintlify/prebuild@1.0.977': - resolution: {integrity: sha512-/lKXOZHIPe9/Nrm5ZSUiEk8tK0RecJUf6WoY6haSxnNWrCvgVGBP2N9/Q3q3akT3ZK0ISZNVfM1z9K5L3dffKg==} + '@mintlify/prebuild@1.0.1019': + resolution: {integrity: sha512-XoabyWMyJtndqgj7uljPE+7cfw6mlxOk5kZoypGahcad2iDe5KdSInvM4G0kPev+ebHA1llnd0wmdAMDy/nm4Q==} - '@mintlify/previewing@4.0.1038': - resolution: {integrity: sha512-TzxrVZN96dpCSYeJ9JDklawL+schE0/Rdef3WmNSoMpRkutvnjhbR2biUpEyn9/X2wV7IWN0V9BGMemP9Tvhxg==} + '@mintlify/previewing@4.0.1080': + resolution: {integrity: sha512-0W+swZVGQn/J8UoPAWwZ8UUja5iIfPtvaUS0X3Lyv7g5sjAryCpeprWRKDFM9+M42sIs4ndbSQwatKvOUI+0Iw==} engines: {node: '>=18.0.0'} '@mintlify/scraping@4.0.522': @@ -1096,16 +943,16 @@ packages: engines: {node: '>=18.0.0'} hasBin: true - '@mintlify/scraping@4.0.699': - resolution: {integrity: sha512-vcn+W57lvMK82jEZ2s6v1uGXLZC2VBlpmbZ0cyJbZFbCTytgWFTJiB7a+9B+wMFto5zk2IRiwHeWxWagqiFVfQ==} + '@mintlify/scraping@4.0.740': + resolution: {integrity: sha512-FJXQTxer4+Hp2yU1j0D0beVspW8nTTZdu98ciejXvSM5T+pVG6kJ0GviKwQ0kj8XTRjDbaznnj6zm2RDf56oHA==} engines: {node: '>=18.0.0'} hasBin: true '@mintlify/validation@0.1.555': resolution: {integrity: sha512-11QVUReL4N5u8wSCgZt4RN7PA0jYQoMEBZ5IrUp5pgb5ZJBOoGV/vPsQrxPPa1cxsUDAuToNhtGxRQtOav/w8w==} - '@mintlify/validation@0.1.653': - resolution: {integrity: sha512-TK9dntGkxRQlnaFmsUSt7znd1QjGlS0nvEZymZfJICYxCaQbEkENEtKeex0gU8ot3XVJtImQhORelvzyjtEfEQ==} + '@mintlify/validation@0.1.686': + resolution: {integrity: sha512-XmI6HB8CuCxgyCA9m8geu9a6BQO6DfDtDXteiqj55Qz+S+cwZ1TW9YDI6hGzHbVQPpzuwyUU3I8l3TxaLfYPCw==} '@mistralai/mistralai@2.2.1': resolution: {integrity: sha512-uKU8CZmL2RzYKmplsU01hii4p3pe4HqJefpWNRWXm1Tcm0Sm4xXfwSLIy4k7ZCPlbETCGcp69E7hZs+WOJ5itQ==} @@ -1120,79 +967,8 @@ packages: '@cfworker/json-schema': optional: true - '@mozilla/readability@0.6.0': - resolution: {integrity: sha512-juG5VWh4qAivzTAeMzvY9xs9HY5rAcr2E4I7tiSSCokRFi7XIZCAu92ZkSTsIj1OPceCifL3cpfteP3pDT9/QQ==} - engines: {node: '>=14.0.0'} - - '@napi-rs/canvas-android-arm64@0.1.97': - resolution: {integrity: sha512-V1c/WVw+NzH8vk7ZK/O8/nyBSCQimU8sfMsB/9qeSvdkGKNU7+mxy/bIF0gTgeBFmHpj30S4E9WHMSrxXGQuVQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [android] - - '@napi-rs/canvas-darwin-arm64@0.1.97': - resolution: {integrity: sha512-ok+SCEF4YejcxuJ9Rm+WWunHHpf2HmiPxfz6z1a/NFQECGXtsY7A4B8XocK1LmT1D7P174MzwPF9Wy3AUAwEPw==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - - '@napi-rs/canvas-darwin-x64@0.1.97': - resolution: {integrity: sha512-PUP6e6/UGlclUvAQNnuXCcnkpdUou6VYZfQOQxExLp86epOylmiwLkqXIvpFmjoTEDmPmXrI+coL/9EFU1gKPA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - - '@napi-rs/canvas-linux-arm-gnueabihf@0.1.97': - resolution: {integrity: sha512-XyXH2L/cic8eTNtbrXCcvqHtMX/nEOxN18+7rMrAM2XtLYC/EB5s0wnO1FsLMWmK+04ZSLN9FBGipo7kpIkcOw==} - engines: {node: '>= 10'} - cpu: [arm] - os: [linux] - - '@napi-rs/canvas-linux-arm64-gnu@0.1.97': - resolution: {integrity: sha512-Kuq/M3djq0K8ktgz6nPlK7Ne5d4uWeDxPpyKWOjWDK2RIOhHVtLtyLiJw2fuldw7Vn4mhw05EZXCEr4Q76rs9w==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@napi-rs/canvas-linux-arm64-musl@0.1.97': - resolution: {integrity: sha512-kKmSkQVnWeqg7qdsiXvYxKhAFuHz3tkBjW/zyQv5YKUPhotpaVhpBGv5LqCngzyuRV85SXoe+OFj+Tv0a0QXkQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - - '@napi-rs/canvas-linux-riscv64-gnu@0.1.97': - resolution: {integrity: sha512-Jc7I3A51jnEOIAXeLsN/M/+Z28LUeakcsXs07FLq9prXc0eYOtVwsDEv913Gr+06IRo34gJJVgT0TXvmz+N2VA==} - engines: {node: '>= 10'} - cpu: [riscv64] - os: [linux] - - '@napi-rs/canvas-linux-x64-gnu@0.1.97': - resolution: {integrity: sha512-iDUBe7AilfuBSRbSa8/IGX38Mf+iCSBqoVKLSQ5XaY2JLOaqz1TVyPFEyIck7wT6mRQhQt5sN6ogfjIDfi74tg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@napi-rs/canvas-linux-x64-musl@0.1.97': - resolution: {integrity: sha512-AKLFd/v0Z5fvgqBDqhvqtAdx+fHMJ5t9JcUNKq4FIZ5WH+iegGm8HPdj00NFlCSnm83Fp3Ln8I2f7uq1aIiWaA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - - '@napi-rs/canvas-win32-arm64-msvc@0.1.97': - resolution: {integrity: sha512-u883Yr6A6fO7Vpsy9YE4FVCIxzzo5sO+7pIUjjoDLjS3vQaNMkVzx5bdIpEL+ob+gU88WDK4VcxYMZ6nmnoX9A==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - - '@napi-rs/canvas-win32-x64-msvc@0.1.97': - resolution: {integrity: sha512-sWtD2EE3fV0IzN+iiQUqr/Q1SwqWhs2O1FKItFlxtdDkikpEj5g7DKQpY3x55H/MAOnL8iomnlk3mcEeGiUMoQ==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - - '@napi-rs/canvas@0.1.97': - resolution: {integrity: sha512-8cFniXvrIEnVwuNSRCW9wirRZbHvrD3JVujdS2P5n5xiJZNZMOZcfOvJ1pb66c7jXMKHHglJEDVJGbm8XWFcXQ==} - engines: {node: '>= 10'} + '@nodable/entities@2.1.0': + resolution: {integrity: sha512-nyT7T3nbMyBI/lvr6L5TyWbFJAI9FTgVRakNoBqCD+PmID8DzFrrNdLLtHMwMszOtqZa8PAOV24ZqDnQrhQINA==} '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -1218,8 +994,8 @@ packages: '@protobufjs/base64@1.1.2': resolution: {integrity: sha512-AZkcAA5vnN/v4PDqKyMR5lx7hZttPDgClv83E//FMNhR2TMcLUhfRUBHCmSl0oi9zMgDDqRUJkSxO3wm85+XLg==} - '@protobufjs/codegen@2.0.4': - resolution: {integrity: sha512-YyFaikqM5sH0ziFZCN3xDC7zeGaB/d0IUb9CATugHWbd1FRFwWwt4ld4OYMPWu5a3Xe01mGAULCdqhMlPl29Jg==} + '@protobufjs/codegen@2.0.5': + resolution: {integrity: sha512-zgXFLzW3Ap33e6d0Wlj4MGIm6Ce8O89n/apUaGNB/jx+hw+ruWEp7EwGUshdLKVRCxZW12fp9r40E1mQrf/34g==} '@protobufjs/eventemitter@1.1.0': resolution: {integrity: sha512-j9ednRT81vYJ9OfVuXG6ERSTdEL1xVsNgqpkxMsbIabzSo3goCjDIveeGv5d03om39ML71RdmrGNjG5SReBP/Q==} @@ -1230,8 +1006,8 @@ packages: '@protobufjs/float@1.0.2': resolution: {integrity: sha512-Ddb+kVXlXst9d+R9PfTIxh1EdNkgoRe5tOX6t01f1lYWOvJnSPDBlG241QLzcyPdoNTsblLUdujGSE4RzrTZGQ==} - '@protobufjs/inquire@1.1.0': - resolution: {integrity: sha512-kdSefcPdruJiFMVSbn801t4vFK7KB/5gd2fYvrxhuJYg8ILrmn9SKSX2tZdV6V+ksulWqS7aXjBcRXl3wHoD9Q==} + '@protobufjs/inquire@1.1.1': + resolution: {integrity: sha512-mnzgDV26ueAvk7rsbt9L7bE0SuAoqyuys/sMMrmVcN5x9VsxpcG3rqAUSgDyLp0UZlmNfIbQ4fHfCtreVBk8Ew==} '@protobufjs/path@1.1.2': resolution: {integrity: sha512-6JOcJ5Tm08dOHAbdR3GrvP+yUUfkjG5ePsHYczMFLq3ZmMkAD98cDgcT2iA1lJ9NVwFd4tH/iSSoe44YWkltEA==} @@ -1239,8 +1015,8 @@ packages: '@protobufjs/pool@1.1.0': resolution: {integrity: sha512-0kELaGSIDBKvcgS4zkjz1PeddatrjYcmMWOlAuAPwAeccUrPHdUqo/J6LiymHHEiJT5NrF1UVwxY14f+fy4WQw==} - '@protobufjs/utf8@1.1.0': - resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} + '@protobufjs/utf8@1.1.1': + resolution: {integrity: sha512-oOAWABowe8EAbMyWKM0tYDKi8Yaox52D+HWZhAIJqQXbqe0xI/GV7FhLWqlEKreMkfDjshR5FKgi3mnle0h6Eg==} '@puppeteer/browsers@2.3.0': resolution: {integrity: sha512-ioXoq9gPxkss4MYhD+SFaU9p1IHFUX0ILAWFPyjGaBdjLsYAlZw6j1iLA0N/m12uVHLFDfSYNF7EQccjinIMDA==} @@ -1465,128 +1241,128 @@ packages: '@radix-ui/rect@1.1.1': resolution: {integrity: sha512-HPwpGIzkl28mWyZqG52jiqDJ12waP11Pa1lGoiyUkIEuMLBP0oeK/C89esbXrxsky5we7dfd8U58nm0SgAWpVw==} - '@rollup/rollup-android-arm-eabi@4.59.0': - resolution: {integrity: sha512-upnNBkA6ZH2VKGcBj9Fyl9IGNPULcjXRlg0LLeaioQWueH30p6IXtJEbKAgvyv+mJaMxSm1l6xwDXYjpEMiLMg==} + '@rollup/rollup-android-arm-eabi@4.60.2': + resolution: {integrity: sha512-dnlp69efPPg6Uaw2dVqzWRfAWRnYVb1XJ8CyyhIbZeaq4CA5/mLeZ1IEt9QqQxmbdvagjLIm2ZL8BxXv5lH4Yw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.59.0': - resolution: {integrity: sha512-hZ+Zxj3SySm4A/DylsDKZAeVg0mvi++0PYVceVyX7hemkw7OreKdCvW2oQ3T1FMZvCaQXqOTHb8qmBShoqk69Q==} + '@rollup/rollup-android-arm64@4.60.2': + resolution: {integrity: sha512-OqZTwDRDchGRHHm/hwLOL7uVPB9aUvI0am/eQuWMNyFHf5PSEQmyEeYYheA0EPPKUO/l0uigCp+iaTjoLjVoHg==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.59.0': - resolution: {integrity: sha512-W2Psnbh1J8ZJw0xKAd8zdNgF9HRLkdWwwdWqubSVk0pUuQkoHnv7rx4GiF9rT4t5DIZGAsConRE3AxCdJ4m8rg==} + '@rollup/rollup-darwin-arm64@4.60.2': + resolution: {integrity: sha512-UwRE7CGpvSVEQS8gUMBe1uADWjNnVgP3Iusyda1nSRwNDCsRjnGc7w6El6WLQsXmZTbLZx9cecegumcitNfpmA==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.59.0': - resolution: {integrity: sha512-ZW2KkwlS4lwTv7ZVsYDiARfFCnSGhzYPdiOU4IM2fDbL+QGlyAbjgSFuqNRbSthybLbIJ915UtZBtmuLrQAT/w==} + '@rollup/rollup-darwin-x64@4.60.2': + resolution: {integrity: sha512-gjEtURKLCC5VXm1I+2i1u9OhxFsKAQJKTVB8WvDAHF+oZlq0GTVFOlTlO1q3AlCTE/DF32c16ESvfgqR7343/g==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.59.0': - resolution: {integrity: sha512-EsKaJ5ytAu9jI3lonzn3BgG8iRBjV4LxZexygcQbpiU0wU0ATxhNVEpXKfUa0pS05gTcSDMKpn3Sx+QB9RlTTA==} + '@rollup/rollup-freebsd-arm64@4.60.2': + resolution: {integrity: sha512-Bcl6CYDeAgE70cqZaMojOi/eK63h5Me97ZqAQoh77VPjMysA/4ORQBRGo3rRy45x4MzVlU9uZxs8Uwy7ZaKnBw==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.59.0': - resolution: {integrity: sha512-d3DuZi2KzTMjImrxoHIAODUZYoUUMsuUiY4SRRcJy6NJoZ6iIqWnJu9IScV9jXysyGMVuW+KNzZvBLOcpdl3Vg==} + '@rollup/rollup-freebsd-x64@4.60.2': + resolution: {integrity: sha512-LU+TPda3mAE2QB0/Hp5VyeKJivpC6+tlOXd1VMoXV/YFMvk/MNk5iXeBfB4MQGRWyOYVJ01625vjkr0Az98OJQ==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.59.0': - resolution: {integrity: sha512-t4ONHboXi/3E0rT6OZl1pKbl2Vgxf9vJfWgmUoCEVQVxhW6Cw/c8I6hbbu7DAvgp82RKiH7TpLwxnJeKv2pbsw==} + '@rollup/rollup-linux-arm-gnueabihf@4.60.2': + resolution: {integrity: sha512-2QxQrM+KQ7DAW4o22j+XZ6RKdxjLD7BOWTP0Bv0tmjdyhXSsr2Ul1oJDQqh9Zf5qOwTuTc7Ek83mOFaKnodPjg==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm-musleabihf@4.59.0': - resolution: {integrity: sha512-CikFT7aYPA2ufMD086cVORBYGHffBo4K8MQ4uPS/ZnY54GKj36i196u8U+aDVT2LX4eSMbyHtyOh7D7Zvk2VvA==} + '@rollup/rollup-linux-arm-musleabihf@4.60.2': + resolution: {integrity: sha512-TbziEu2DVsTEOPif2mKWkMeDMLoYjx95oESa9fkQQK7r/Orta0gnkcDpzwufEcAO2BLBsD7mZkXGFqEdMRRwfw==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.59.0': - resolution: {integrity: sha512-jYgUGk5aLd1nUb1CtQ8E+t5JhLc9x5WdBKew9ZgAXg7DBk0ZHErLHdXM24rfX+bKrFe+Xp5YuJo54I5HFjGDAA==} + '@rollup/rollup-linux-arm64-gnu@4.60.2': + resolution: {integrity: sha512-bO/rVDiDUuM2YfuCUwZ1t1cP+/yqjqz+Xf2VtkdppefuOFS2OSeAfgafaHNkFn0t02hEyXngZkxtGqXcXwO8Rg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.59.0': - resolution: {integrity: sha512-peZRVEdnFWZ5Bh2KeumKG9ty7aCXzzEsHShOZEFiCQlDEepP1dpUl/SrUNXNg13UmZl+gzVDPsiCwnV1uI0RUA==} + '@rollup/rollup-linux-arm64-musl@4.60.2': + resolution: {integrity: sha512-hr26p7e93Rl0Za+JwW7EAnwAvKkehh12BU1Llm9Ykiibg4uIr2rbpxG9WCf56GuvidlTG9KiiQT/TXT1yAWxTA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-loong64-gnu@4.59.0': - resolution: {integrity: sha512-gbUSW/97f7+r4gHy3Jlup8zDG190AuodsWnNiXErp9mT90iCy9NKKU0Xwx5k8VlRAIV2uU9CsMnEFg/xXaOfXg==} + '@rollup/rollup-linux-loong64-gnu@4.60.2': + resolution: {integrity: sha512-pOjB/uSIyDt+ow3k/RcLvUAOGpysT2phDn7TTUB3n75SlIgZzM6NKAqlErPhoFU+npgY3/n+2HYIQVbF70P9/A==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-loong64-musl@4.59.0': - resolution: {integrity: sha512-yTRONe79E+o0FWFijasoTjtzG9EBedFXJMl888NBEDCDV9I2wGbFFfJQQe63OijbFCUZqxpHz1GzpbtSFikJ4Q==} + '@rollup/rollup-linux-loong64-musl@4.60.2': + resolution: {integrity: sha512-2/w+q8jszv9Ww1c+6uJT3OwqhdmGP2/4T17cu8WuwyUuuaCDDJ2ojdyYwZzCxx0GcsZBhzi3HmH+J5pZNXnd+Q==} cpu: [loong64] os: [linux] - '@rollup/rollup-linux-ppc64-gnu@4.59.0': - resolution: {integrity: sha512-sw1o3tfyk12k3OEpRddF68a1unZ5VCN7zoTNtSn2KndUE+ea3m3ROOKRCZxEpmT9nsGnogpFP9x6mnLTCaoLkA==} + '@rollup/rollup-linux-ppc64-gnu@4.60.2': + resolution: {integrity: sha512-11+aL5vKheYgczxtPVVRhdptAM2H7fcDR5Gw4/bTcteuZBlH4oP9f5s9zYO9aGZvoGeBpqXI/9TZZihZ609wKw==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-ppc64-musl@4.59.0': - resolution: {integrity: sha512-+2kLtQ4xT3AiIxkzFVFXfsmlZiG5FXYW7ZyIIvGA7Bdeuh9Z0aN4hVyXS/G1E9bTP/vqszNIN/pUKCk/BTHsKA==} + '@rollup/rollup-linux-ppc64-musl@4.60.2': + resolution: {integrity: sha512-i16fokAGK46IVZuV8LIIwMdtqhin9hfYkCh8pf8iC3QU3LpwL+1FSFGej+O7l3E/AoknL6Dclh2oTdnRMpTzFQ==} cpu: [ppc64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.59.0': - resolution: {integrity: sha512-NDYMpsXYJJaj+I7UdwIuHHNxXZ/b/N2hR15NyH3m2qAtb/hHPA4g4SuuvrdxetTdndfj9b1WOmy73kcPRoERUg==} + '@rollup/rollup-linux-riscv64-gnu@4.60.2': + resolution: {integrity: sha512-49FkKS6RGQoriDSK/6E2GkAsAuU5kETFCh7pG4yD/ylj9rKhTmO3elsnmBvRD4PgJPds5W2PkhC82aVwmUcJ7A==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-riscv64-musl@4.59.0': - resolution: {integrity: sha512-nLckB8WOqHIf1bhymk+oHxvM9D3tyPndZH8i8+35p/1YiVoVswPid2yLzgX7ZJP0KQvnkhM4H6QZ5m0LzbyIAg==} + '@rollup/rollup-linux-riscv64-musl@4.60.2': + resolution: {integrity: sha512-mjYNkHPfGpUR00DuM1ZZIgs64Hpf4bWcz9Z41+4Q+pgDx73UwWdAYyf6EG/lRFldmdHHzgrYyge5akFUW0D3mQ==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.59.0': - resolution: {integrity: sha512-oF87Ie3uAIvORFBpwnCvUzdeYUqi2wY6jRFWJAy1qus/udHFYIkplYRW+wo+GRUP4sKzYdmE1Y3+rY5Gc4ZO+w==} + '@rollup/rollup-linux-s390x-gnu@4.60.2': + resolution: {integrity: sha512-ALyvJz965BQk8E9Al/JDKKDLH2kfKFLTGMlgkAbbYtZuJt9LU8DW3ZoDMCtQpXAltZxwBHevXz5u+gf0yA0YoA==} cpu: [s390x] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.59.0': - resolution: {integrity: sha512-3AHmtQq/ppNuUspKAlvA8HtLybkDflkMuLK4DPo77DfthRb71V84/c4MlWJXixZz4uruIH4uaa07IqoAkG64fg==} + '@rollup/rollup-linux-x64-gnu@4.60.2': + resolution: {integrity: sha512-UQjrkIdWrKI626Du8lCQ6MJp/6V1LAo2bOK9OTu4mSn8GGXIkPXk/Vsp4bLHCd9Z9Iz2OTEaokUE90VweJgIYQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.59.0': - resolution: {integrity: sha512-2UdiwS/9cTAx7qIUZB/fWtToJwvt0Vbo0zmnYt7ED35KPg13Q0ym1g442THLC7VyI6JfYTP4PiSOWyoMdV2/xg==} + '@rollup/rollup-linux-x64-musl@4.60.2': + resolution: {integrity: sha512-bTsRGj6VlSdn/XD4CGyzMnzaBs9bsRxy79eTqTCBsA8TMIEky7qg48aPkvJvFe1HyzQ5oMZdg7AnVlWQSKLTnw==} cpu: [x64] os: [linux] - '@rollup/rollup-openbsd-x64@4.59.0': - resolution: {integrity: sha512-M3bLRAVk6GOwFlPTIxVBSYKUaqfLrn8l0psKinkCFxl4lQvOSz8ZrKDz2gxcBwHFpci0B6rttydI4IpS4IS/jQ==} + '@rollup/rollup-openbsd-x64@4.60.2': + resolution: {integrity: sha512-6d4Z3534xitaA1FcMWP7mQPq5zGwBmGbhphh2DwaA1aNIXUu3KTOfwrWpbwI4/Gr0uANo7NTtaykFyO2hPuFLg==} cpu: [x64] os: [openbsd] - '@rollup/rollup-openharmony-arm64@4.59.0': - resolution: {integrity: sha512-tt9KBJqaqp5i5HUZzoafHZX8b5Q2Fe7UjYERADll83O4fGqJ49O1FsL6LpdzVFQcpwvnyd0i+K/VSwu/o/nWlA==} + '@rollup/rollup-openharmony-arm64@4.60.2': + resolution: {integrity: sha512-NetAg5iO2uN7eB8zE5qrZ3CSil+7IJt4WDFLcC75Ymywq1VZVD6qJ6EvNLjZ3rEm6gB7XW5JdT60c6MN35Z85Q==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.59.0': - resolution: {integrity: sha512-V5B6mG7OrGTwnxaNUzZTDTjDS7F75PO1ae6MJYdiMu60sq0CqN5CVeVsbhPxalupvTX8gXVSU9gq+Rx1/hvu6A==} + '@rollup/rollup-win32-arm64-msvc@4.60.2': + resolution: {integrity: sha512-NCYhOotpgWZ5kdxCZsv6Iudx0wX8980Q/oW4pNFNihpBKsDbEA1zpkfxJGC0yugsUuyDZ7gL37dbzwhR0VI7pQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.59.0': - resolution: {integrity: sha512-UKFMHPuM9R0iBegwzKF4y0C4J9u8C6MEJgFuXTBerMk7EJ92GFVFYBfOZaSGLu6COf7FxpQNqhNS4c4icUPqxA==} + '@rollup/rollup-win32-ia32-msvc@4.60.2': + resolution: {integrity: sha512-RXsaOqXxfoUBQoOgvmmijVxJnW2IGB0eoMO7F8FAjaj0UTywUO/luSqimWBJn04WNgUkeNhh7fs7pESXajWmkg==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.59.0': - resolution: {integrity: sha512-laBkYlSS1n2L8fSo1thDNGrCTQMmxjYY5G0WFWjFFYZkKPjsMBsgJfGf4TLxXrF6RyhI60L8TMOjBMvXiTcxeA==} + '@rollup/rollup-win32-x64-gnu@4.60.2': + resolution: {integrity: sha512-qdAzEULD+/hzObedtmV6iBpdL5TIbKVztGiK7O3/KYSf+HIzU257+MX1EXJcyIiDbMAqmbwaufcYPvyRryeZtA==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.59.0': - resolution: {integrity: sha512-2HRCml6OztYXyJXAvdDXPKcawukWY2GpR5/nxKp4iBgiO3wcoEGkAaqctIbZcNB6KlUQBIqt8VYkNSj2397EfA==} + '@rollup/rollup-win32-x64-msvc@4.60.2': + resolution: {integrity: sha512-Nd/SgG27WoA9e+/TdK74KnHz852TLa94ovOYySo/yMPuTmpckK/jIF2jSwS3g7ELSKXK13/cVdmg1Z/DaCWKxA==} cpu: [x64] os: [win32] @@ -1622,6 +1398,9 @@ packages: '@silvia-odwyer/photon-node@0.3.4': resolution: {integrity: sha512-bnly4BKB3KDTFxrUIcgCLbaeVVS8lrAkri1pEzskpmxu9MdfGQTy8b8EgcD83ywD3RPMsIulY8xJH5Awa+t9fA==} + '@simplex-chat/types@0.5.0': + resolution: {integrity: sha512-f680CRlf+O8WfIaPb7wxVj3PB8mTIOE+HqmetCSe0NBheVAjU3ovg3+zkrWwDlavrHuCLbb7Gmeu4HyNtjDfog==} + '@sinclair/typebox@0.34.49': resolution: {integrity: sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A==} @@ -1641,8 +1420,8 @@ packages: resolution: {integrity: sha512-TzDZcAnhTyAHbXVxWZo7/tEcrIeFq20IBk8So3OLOetWpR8EwY/yEqBMBFaJMeyEiREDq4NfEl+qO3OAUD+vbQ==} engines: {node: '>=18.0.0'} - '@smithy/core@3.23.16': - resolution: {integrity: sha512-JStomOrINQA1VqNEopLsgcdgwd42au7mykKqVr30XFw89wLt9sDxJDi4djVPRwQmmzyTGy/uOvTc2ultMpFi1w==} + '@smithy/core@3.23.17': + resolution: {integrity: sha512-x7BlLbUFL8NWCGjMF9C+1N5cVCxcPa7g6Tv9B4A2luWx3be3oU8hQ96wIwxe/s7OhIzvoJH73HAUSg5JXVlEtQ==} engines: {node: '>=18.0.0'} '@smithy/credential-provider-imds@4.2.14': @@ -1693,16 +1472,16 @@ packages: resolution: {integrity: sha512-xhHq7fX4/3lv5NHxLUk3OeEvl0xZ+Ek3qIbWaCL4f9JwgDZEclPBElljaZCAItdGPQl/kSM4LPMOpy1MYgprpw==} engines: {node: '>=18.0.0'} - '@smithy/middleware-endpoint@4.4.31': - resolution: {integrity: sha512-KJPdCIN2kOE2aGmqZd7eUTr4WQwOGgtLWgUkswGJggs7rBcQYQjcZMEDa3C0DwbOiXS9L8/wDoQHkfxBYLfiLw==} + '@smithy/middleware-endpoint@4.4.32': + resolution: {integrity: sha512-ZZkgyjnJppiZbIm6Qbx92pbXYi1uzenIvGhBSCDlc7NwuAkiqSgS75j1czAD25ZLs2FjMjYy1q7gyRVWG6JA0Q==} engines: {node: '>=18.0.0'} - '@smithy/middleware-retry@4.5.4': - resolution: {integrity: sha512-/z7nIFK+ZRW3Ie/l3NEVGdy34LvmEOzBrtBAvgWZ/4PrKX0xP3kWm8pkfcwUk523SqxZhdbQP9JSXgjF77Uhpw==} + '@smithy/middleware-retry@4.5.7': + resolution: {integrity: sha512-bRt6ZImqVSeTk39Nm81K20ObIiAZ3WefY7G6+iz/0tZjs4dgRRjvRX2sgsH+zi6iDCRR/aQvQofLKxxz4rPBZg==} engines: {node: '>=18.0.0'} - '@smithy/middleware-serde@4.2.19': - resolution: {integrity: sha512-Q6y+W9h3iYVMCKWDoVge+OC1LKFqbEKaq8SIWG2X2bWJRpd/6dDLyICcNLT6PbjH3Rr6bmg/SeDB25XFOFfeEw==} + '@smithy/middleware-serde@4.2.20': + resolution: {integrity: sha512-Lx9JMO9vArPtiChE3wbEZ5akMIDQpWQtlu90lhACQmNOXcGXRbaDywMHDzuDZ2OkZzP+9wQfZi3YJT9F67zTQQ==} engines: {node: '>=18.0.0'} '@smithy/middleware-stack@4.2.14': @@ -1713,8 +1492,8 @@ packages: resolution: {integrity: sha512-S+gFjyo/weSVL0P1b9Ts8C/CwIfNCgUPikk3sl6QVsfE/uUuO+QsF+NsE/JkpvWqqyz1wg7HFdiaZuj5CoBMRg==} engines: {node: '>=18.0.0'} - '@smithy/node-http-handler@4.6.0': - resolution: {integrity: sha512-P734cAoTFtuGfWa/R3jgBnGlURt2w9bYEBwQNMKf58sRM9RShirB2mKwLsVP+jlG/wxpCu8abv8NxdUts8tdLA==} + '@smithy/node-http-handler@4.6.1': + resolution: {integrity: sha512-iB+orM4x3xrr57X3YaXazfKnntl0LHlZB1kcXSGzMV1Tt0+YwEjGlbjk/44qEGtBzXAz6yFDzkYTKSV6Pj2HUg==} engines: {node: '>=18.0.0'} '@smithy/property-provider@4.2.14': @@ -1733,8 +1512,8 @@ packages: resolution: {integrity: sha512-hr+YyqBD23GVvRxGGrcc/oOeNlK3PzT5Fu4dzrDXxzS1LpFiuL2PQQqKPs87M79aW7ziMs+nvB3qdw77SqE7Lw==} engines: {node: '>=18.0.0'} - '@smithy/service-error-classification@4.3.0': - resolution: {integrity: sha512-9jKsBYQRPR0xBLgc2415RsA5PIcP2sis4oBdN9s0D13cg1B1284mNTjx9Yc+BEERXzuPm5ObktI96OxsKh8E9A==} + '@smithy/service-error-classification@4.3.1': + resolution: {integrity: sha512-aUQuDGh760ts/8MU+APjIZhlLPKhIIfqyzZaJikLEIMrdxFvxuLYD0WxWzaYWpmLbQlXDe9p7EWM3HsBe0K6Gw==} engines: {node: '>=18.0.0'} '@smithy/shared-ini-file-loader@4.4.9': @@ -1745,8 +1524,8 @@ packages: resolution: {integrity: sha512-1D9Y/nmlVjCeSivCbhZ7hgEpmHyY1h0GvpSZt3l0xcD9JjmjVC1CHOozS6+Gh+/ldMH8JuJ6cujObQqfayAVFA==} engines: {node: '>=18.0.0'} - '@smithy/smithy-client@4.12.12': - resolution: {integrity: sha512-daO7SJn4eM6ArbmrEs+/BTbH7af8AEbSL3OMQdcRvvn8tuUcR5rU2n6DgxIV53aXMS42uwK8NgKKCh5XgqYOPQ==} + '@smithy/smithy-client@4.12.13': + resolution: {integrity: sha512-y/Pcj1V9+qG98gyu1gvftHB7rDpdh+7kIBIggs55yGm3JdtBV8GT8IFF3a1qxZ79QnaJHX9GXzvBG6tAd+czJA==} engines: {node: '>=18.0.0'} '@smithy/types@4.14.1': @@ -1781,12 +1560,12 @@ packages: resolution: {integrity: sha512-dWU03V3XUprJwaUIFVv4iOnS1FC9HnMHDfUrlNDSh4315v0cWyaIErP8KiqGVbf5z+JupoVpNM7ZB3jFiTejvQ==} engines: {node: '>=18.0.0'} - '@smithy/util-defaults-mode-browser@4.3.48': - resolution: {integrity: sha512-hxVRVPYaRDWa6YQdse1aWX1qrksmLsvNyGBKdc32q4jFzSjxYVNWfstknAfR228TnzS4tzgswXRuYIbhXBuXFQ==} + '@smithy/util-defaults-mode-browser@4.3.49': + resolution: {integrity: sha512-a5bNrdiONYB/qE2BuKegvUMd/+ZDwdg4vsNuuSzYE8qs2EYAdK9CynL+Rzn29PbPiUqoz/cbpRbcLzD5lEevHw==} engines: {node: '>=18.0.0'} - '@smithy/util-defaults-mode-node@4.2.53': - resolution: {integrity: sha512-ybgCk+9JdBq8pYC8Y6U5fjyS8e4sboyAShetxPNL0rRBtaVl56GSFAxsolVBIea1tXR4LPIzL8i6xqmcf0+DCQ==} + '@smithy/util-defaults-mode-node@4.2.54': + resolution: {integrity: sha512-g1cvrJvOnzeJgEdf7AE4luI7gp6L8weE0y9a9wQUSGtjb8QRHDbCJYuE4Sy0SD9N8RrnNPFsPltAz/OSoBR9Zw==} engines: {node: '>=18.0.0'} '@smithy/util-endpoints@3.4.2': @@ -1801,12 +1580,12 @@ packages: resolution: {integrity: sha512-1Su2vj9RYNDEv/V+2E+jXkkwGsgR7dc4sfHn9Z7ruzQHJIEni9zzw5CauvRXlFJfmgcqYP8fWa0dkh2Q2YaQyw==} engines: {node: '>=18.0.0'} - '@smithy/util-retry@4.3.3': - resolution: {integrity: sha512-idjUvd4M9Jj6rXkhqw4H4reHoweuK4ZxYWyOrEp4N2rOF5VtaOlQGLDQJva/8WanNXk9ScQtsAb7o5UHGvFm4A==} + '@smithy/util-retry@4.3.6': + resolution: {integrity: sha512-p6/FO1n2KxMeQyna067i0uJ6TSbb165ZhnRtCpWh4Foxqbfc6oW+XITaL8QkFJj3KFnDe2URt4gOhgU06EP9ew==} engines: {node: '>=18.0.0'} - '@smithy/util-stream@4.5.24': - resolution: {integrity: sha512-na5vv2mBSDzXewLEEoWGI7LQQkfpmFEomBsmOpzLFjqGctm0iMwXY5lAwesY9pIaErkccW0qzEOUcYP+WKneXg==} + '@smithy/util-stream@4.5.25': + resolution: {integrity: sha512-/PFpG4k8Ze8Ei+mMKj3oiPICYekthuzePZMgZbCqMiXIHHf4n2aZ4Ps0aSRShycFTGuj/J6XldmC0x0DwednIA==} engines: {node: '>=18.0.0'} '@smithy/util-uri-escape@4.2.2': @@ -1857,16 +1636,16 @@ packages: resolution: {integrity: sha512-lyIc6JUlUA8Ve5ELywPC8I2Sdnh1zc1zmbYgVarhXIp9YeAB0ReeqmGEOWNtlHkbP2DAA1AL65Wfn2ncjK/jtQ==} engines: {node: '>=8'} - '@stoplight/spectral-core@1.21.0': - resolution: {integrity: sha512-oj4e/FrDLUhBRocIW+lRMKlJ/q/rDZw61HkLbTFsdMd+f/FTkli2xHNB1YC6n1mrMKjjvy7XlUuFkC7XxtgbWw==} + '@stoplight/spectral-core@1.22.0': + resolution: {integrity: sha512-4hTxMDs4TFUG4/jKjaZttA65gNuV2PCKI9+51I+J4nL6ylo17DlbW+sl6byKnBuV/85HxaV33ri5fEGlp8lTSA==} engines: {node: ^16.20 || ^18.18 || >= 20.17} '@stoplight/spectral-formats@1.8.2': resolution: {integrity: sha512-c06HB+rOKfe7tuxg0IdKDEA5XnjL2vrn/m/OVIIxtINtBzphZrOgtRn7epQ5bQF5SWp84Ue7UJWaGgDwVngMFw==} engines: {node: ^16.20 || ^18.18 || >= 20.17} - '@stoplight/spectral-functions@1.10.1': - resolution: {integrity: sha512-obu8ZfoHxELOapfGsCJixKZXZcffjg+lSoNuttpmUFuDzVLT3VmH8QkPXfOGOL5Pz80BR35ClNAToDkdnYIURg==} + '@stoplight/spectral-functions@1.10.2': + resolution: {integrity: sha512-PIfPUgTRo8EtAnL1MIrzhHoUuojSaE8shGSMaHS3BxGyc8d079BE5+TqJa1/WLUb9YT9JQnZ0Aj4xfi8NcJOIw==} engines: {node: ^16.20 || ^18.18 || >= 20.17} '@stoplight/spectral-parsers@1.0.5': @@ -1877,8 +1656,8 @@ packages: resolution: {integrity: sha512-gj3TieX5a9zMW29z3mBlAtDOCgN3GEc1VgZnCVlr5irmR4Qi5LuECuFItAq4pTn5Zu+sW5bqutsCH7D4PkpyAA==} engines: {node: ^16.20 || ^18.18 || >= 20.17} - '@stoplight/spectral-runtime@1.1.4': - resolution: {integrity: sha512-YHbhX3dqW0do6DhiPSgSGQzr6yQLlWybhKwWx0cqxjMwxej3TqLv3BXMfIUYFKKUqIwH4Q2mV8rrMM8qD2N0rQ==} + '@stoplight/spectral-runtime@1.1.5': + resolution: {integrity: sha512-6/HSCQBKnI4M5qonCKos2W7oggXv+U/ml+m/cAd4eJAYfIVEmaLUo03qSWIIl4cBc5ujJPmn2WnCiRrz1++P7Q==} engines: {node: ^16.20 || ^18.18 || >= 20.17} '@stoplight/types@13.20.0': @@ -1920,9 +1699,6 @@ packages: '@types/chai@5.2.3': resolution: {integrity: sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==} - '@types/cookie@0.4.1': - resolution: {integrity: sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q==} - '@types/cors@2.8.19': resolution: {integrity: sha512-mFNylyeyqN93lfe/9CSxOGREz8cpzAhH+E93xJ4xWQf62V8sQ/24reV2nyzUWM6H6Xji+GGHpkbLe7pVoUEskg==} @@ -1968,15 +1744,9 @@ packages: '@types/nlcst@2.0.3': resolution: {integrity: sha512-vSYNSDe6Ix3q+6Z7ri9lyWqgGhJTmzRjZRqyq15N0Z/1/UnVsno9G/N40NBijoYx2seFDIl0+B2mgAb9mezUCA==} - '@types/node@25.5.2': - resolution: {integrity: sha512-tO4ZIRKNC+MDWV4qKVZe3Ql/woTnmHDr5JD8UI5hn2pwBrHEwOEMZK7WlNb5RKB6EoJ02gwmQS9OrjuFnZYdpg==} - '@types/node@25.6.0': resolution: {integrity: sha512-+qIYRKdNYJwY3vRCZMdJbPLJAtGjQBudzZzdzwQYkEPQd+PJGixUL5QfvCLDaULoLv+RhT3LDkwEfKaAkgSmNQ==} - '@types/qrcode@1.5.6': - resolution: {integrity: sha512-te7NQcV2BOvdj2b1hCAHzAoMNuj65kNBMz0KBaxM6c3VGBOhU0dURQKOtH8CFNI/dsKkwlv32p26qYQTWoB5bw==} - '@types/react@19.2.14': resolution: {integrity: sha512-ilcTH/UniCkMdtexkoCN0bI7pMcJDvmQFPvuPvmEaYA/NSfFTAgdUSLAoVjaRJm7+6PvcM+q1zYOwS4wTYMF9w==} @@ -2006,16 +1776,11 @@ packages: '@ungap/structured-clone@1.3.0': resolution: {integrity: sha512-WmoN8qaIAo7WTYWbAZuG8PYEhn5fkz7dZrqTBZ7dtt//lL2Gwms1IcnQ5yHqjDfX8Ft5j4YzDM23f87zBfDe9g==} - '@vincentkoc/qrcode-tui@0.2.1': - resolution: {integrity: sha512-F2XVHMfasJ0q8G93gtcyU9Px0wMH6o6nIZLrZYSHc6dm9Pq3oCbHuVYYG/UQvJD0rhrGH3P9B6qgpCAqSDUw5w==} - engines: {node: '>=20'} - hasBin: true - - '@vitest/expect@4.1.2': - resolution: {integrity: sha512-gbu+7B0YgUJ2nkdsRJrFFW6X7NTP44WlhiclHniUhxADQJH5Szt9mZ9hWnJPJ8YwOK5zUOSSlSvyzRf0u1DSBQ==} + '@vitest/expect@4.1.5': + resolution: {integrity: sha512-PWBaRY5JoKuRnHlUHfpV/KohFylaDZTupcXN1H9vYryNLOnitSw60Mw9IAE2r67NbwwzBw/Cc/8q9BK3kIX8Kw==} - '@vitest/mocker@4.1.2': - resolution: {integrity: sha512-Ize4iQtEALHDttPRCmN+FKqOl2vxTiNUhzobQFFt/BM1lRUTG7zRCLOykG/6Vo4E4hnUdfVLo5/eqKPukcWW7Q==} + '@vitest/mocker@4.1.5': + resolution: {integrity: sha512-/x2EmFC4mT4NNzqvC3fmesuV97w5FC903KPmey4gsnJiMQ3Be1IlDKVaDaG8iqaLFHqJ2FVEkxZk5VmeLjIItw==} peerDependencies: msw: ^2.4.9 vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2025,20 +1790,20 @@ packages: vite: optional: true - '@vitest/pretty-format@4.1.2': - resolution: {integrity: sha512-dwQga8aejqeuB+TvXCMzSQemvV9hNEtDDpgUKDzOmNQayl2OG241PSWeJwKRH3CiC+sESrmoFd49rfnq7T4RnA==} + '@vitest/pretty-format@4.1.5': + resolution: {integrity: sha512-7I3q6l5qr03dVfMX2wCo9FxwSJbPdwKjy2uu/YPpU3wfHvIL4QHwVRp57OfGrDFeUJ8/8QdfBKIV12FTtLn00g==} - '@vitest/runner@4.1.2': - resolution: {integrity: sha512-Gr+FQan34CdiYAwpGJmQG8PgkyFVmARK8/xSijia3eTFgVfpcpztWLuP6FttGNfPLJhaZVP/euvujeNYar36OQ==} + '@vitest/runner@4.1.5': + resolution: {integrity: sha512-2D+o7Pr82IEO46YPpoA/YU0neeyr6FTerQb5Ro7BUnBuv6NQtT/kmVnczngiMEBhzgqz2UZYl5gArejsyERDSQ==} - '@vitest/snapshot@4.1.2': - resolution: {integrity: sha512-g7yfUmxYS4mNxk31qbOYsSt2F4m1E02LFqO53Xpzg3zKMhLAPZAjjfyl9e6z7HrW6LvUdTwAQR3HHfLjpko16A==} + '@vitest/snapshot@4.1.5': + resolution: {integrity: sha512-zypXEt4KH/XgKGPUz4eC2AvErYx0My5hfL8oDb1HzGFpEk1P62bxSohdyOmvz+d9UJwanI68MKwr2EquOaOgMQ==} - '@vitest/spy@4.1.2': - resolution: {integrity: sha512-DU4fBnbVCJGNBwVA6xSToNXrkZNSiw59H8tcuUspVMsBDBST4nfvsPsEHDHGtWRRnqBERBQu7TrTKskmjqTXKA==} + '@vitest/spy@4.1.5': + resolution: {integrity: sha512-2lNOsh6+R2Idnf1TCZqSwYlKN2E/iDlD8sgU59kYVl+OMDmvldO1VDk39smRfpUNwYpNRVn3w4YfuC7KfbBnkQ==} - '@vitest/utils@4.1.2': - resolution: {integrity: sha512-xw2/TiX82lQHA06cgbqRKFb5lCAy3axQ4H4SoUFhUsg+wztiet+co86IAMDtF6Vm1hc7J6j09oh/rgDn+JdKIQ==} + '@vitest/utils@4.1.5': + resolution: {integrity: sha512-76wdkrmfXfqGjueGgnb45ITPyUi1ycZ4IHgC2bhPDUfWHklY/q3MdLOAB+TF1e6xfl8NxNY0ZYaPCFNWSsw3Ug==} abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} @@ -2116,8 +1881,8 @@ packages: ajv: optional: true - ajv@8.18.0: - resolution: {integrity: sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A==} + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} ansi-escapes@4.3.2: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} @@ -2166,15 +1931,9 @@ packages: arkregex@0.0.3: resolution: {integrity: sha512-bU21QJOJEFJK+BPNgv+5bVXkvRxyAvgnon75D92newgHxkBJTgiFwQxusyViYyJkETsddPlHyspshDQcCzmkNg==} - arkregex@0.0.5: - resolution: {integrity: sha512-ncYjBdLlh5/QnVsAA8De16Tc9EqmYM7y/WU9j+236KcyYNUXogpz3sC4ATIZYzzLxwI+0sEOaQLEmLmRleaEXw==} - arktype@2.1.27: resolution: {integrity: sha512-enctOHxI4SULBv/TDtCVi5M8oLd4J5SVlPUblXDzSsOYQNMzmVbUosGBnJuZDKmFlN5Ie0/QVEuTE+Z5X1UhsQ==} - arktype@2.2.0: - resolution: {integrity: sha512-t54MZ7ti5BhOEvzEkgKnWvqj+UbDfWig+DHr5I34xatymPusKLS0lQpNJd8M6DzmIto2QGszHfNKoFIT8tMCZQ==} - array-buffer-byte-length@1.0.2: resolution: {integrity: sha512-LHE+8BuR7RYGDKvnrmcuSq3tDcKv9OFEXQt/HpbZhY7V6h0zlUXutnAD82GiFx9rdieCMjkvtcsPqBwgUl1Iiw==} engines: {node: '>= 0.4'} @@ -2189,6 +1948,9 @@ packages: resolution: {integrity: sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==} engines: {node: '>= 0.4'} + asn1.js@5.4.1: + resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} + assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -2223,11 +1985,11 @@ packages: axios@1.10.0: resolution: {integrity: sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==} - axios@1.13.2: - resolution: {integrity: sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==} + axios@1.15.0: + resolution: {integrity: sha512-wWyJDlAatxk30ZJer+GeCWS209sA42X+N5jU2jy6oHTp7ufw8uzUTVFBX9+wTfAlhiJXGS0Bq7X6efruWjuK9Q==} - b4a@1.8.0: - resolution: {integrity: sha512-qRuSmNSkGQaHwNbM7J78Wwy+ghLEYF1zNrSeMxj4Kgw6y33O3mXcQ6Ie9fRvfU/YnxWkOchPXbaLb73TkIsfdg==} + b4a@1.8.1: + resolution: {integrity: sha512-aiqre1Nr0B/6DgE2N5vwTc+2/oQZ4Wh1t4NznYY4E00y8LCt6NqdRv81so00oo27D8MVKTpUa/MwUUtBLXCoDw==} peerDependencies: react-native-b4a: '*' peerDependenciesMeta: @@ -2252,8 +2014,8 @@ packages: bare-abort-controller: optional: true - bare-fs@4.5.6: - resolution: {integrity: sha512-1QovqDrR80Pmt5HPAsMsXTCFcDYr+NSUKW6nd6WO5v0JBmnItc/irNRzm2KOQ5oZ69P37y+AMujNyNtG+1Rggw==} + bare-fs@4.7.1: + resolution: {integrity: sha512-WDRsyVN52eAx/lBamKD6uyw8H4228h/x0sGGGegOamM2cd7Pag88GfMQalobXI+HaEUxpCkbKQUDOQqt9wawRw==} engines: {bare: '>=1.16.0'} peerDependencies: bare-buffer: '*' @@ -2261,15 +2023,15 @@ packages: bare-buffer: optional: true - bare-os@3.8.6: - resolution: {integrity: sha512-l8xaNWWb/bXuzgsrlF5jaa5QYDJ9S0ddd54cP6CH+081+5iPrbJiCfBWQqrWYzmUhCbsH+WR6qxo9MeHVCr0MQ==} + bare-os@3.9.1: + resolution: {integrity: sha512-6M5XjcnsygQNPMCMPXSK379xrJFiZ/AEMNBmFEmQW8d/789VQATvriyi5r0HYTL9TkQ26rn3kgdTG3aisbrXkQ==} engines: {bare: '>=1.14.0'} bare-path@3.0.0: resolution: {integrity: sha512-tyfW2cQcB5NN8Saijrhqn0Zh7AnFNsnczRcuWODH0eYAXBsJ5gVxAUuNr7tsHSC6IZ77cA0SitzT+s47kot8Mw==} - bare-stream@2.12.0: - resolution: {integrity: sha512-w28i8lkBgREV3rPXGbgK+BO66q+ZpKqRWrZLiCdmmUlLPrQ45CzkvRhN+7lnv00Gpi2zy5naRxnUFAxCECDm9g==} + bare-stream@2.13.1: + resolution: {integrity: sha512-Vp0cnjYyrEC4whYTymQ+YZi6pBpfiICZO3cfRG8sy67ZNWe951urv1x4eW1BKNngw3U+3fPYb5JQvHbCtxH7Ow==} peerDependencies: bare-abort-controller: '*' bare-buffer: '*' @@ -2282,8 +2044,8 @@ packages: bare-events: optional: true - bare-url@2.4.0: - resolution: {integrity: sha512-NSTU5WN+fy/L0DDenfE8SXQna4voXuW0FHM7wH8i3/q9khUSchfPbPezO4zSFMnDGIf9YE+mt/RWhZgNRKRIXA==} + bare-url@2.4.2: + resolution: {integrity: sha512-/9a2j4ac6ckpmAHvod/ob7x439OAHst/drc2Clnq+reRYd/ovddwcF4LfoxHyNk5AuGBnPg+HqFjmE/Zpq6v0A==} base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -2292,8 +2054,8 @@ packages: resolution: {integrity: sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog==} engines: {node: ^4.5.0 || >= 5.9} - basic-ftp@5.2.0: - resolution: {integrity: sha512-VoMINM2rqJwJgfdHq6RiUudKt2BV+FY5ZFezP/ypmwayk68+NzzAQy4XXLlqsGD4MCzq3DrmNFD/uUmBJuGoXw==} + basic-ftp@5.3.1: + resolution: {integrity: sha512-bopVNp6ugyA150DDuZfPFdt1KZ5a94ZDiwX4hMgZDzF+GttD80lEy8kj98kbyhLXnPvhtIo93mdnLIjpCAeeOw==} engines: {node: '>=10.0.0'} better-opn@3.0.2: @@ -2310,25 +2072,25 @@ packages: bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - body-parser@1.20.1: - resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} + bn.js@4.12.3: + resolution: {integrity: sha512-fGTi3gxV/23FTYdAoUtLYp6qySe2KE3teyZitipKNRuVYcBkoP/bB3guXN/XVKUe9mxCHXnc9C4ocyz8OmgN0g==} + + body-parser@1.20.5: + resolution: {integrity: sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} body-parser@2.2.2: resolution: {integrity: sha512-oP5VkATKlNwcgvxi0vM0p/D3n2C3EReYVX+DNYs5TjZFn/oQt2j+4sVJtSMr18pdRr8wjTcBl6LoV+FUwzPmNA==} engines: {node: '>=18'} - boolbase@1.0.0: - resolution: {integrity: sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==} - bowser@2.14.1: resolution: {integrity: sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==} - brace-expansion@1.1.13: - resolution: {integrity: sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==} + brace-expansion@1.1.14: + resolution: {integrity: sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==} - brace-expansion@5.0.4: - resolution: {integrity: sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==} + brace-expansion@5.0.5: + resolution: {integrity: sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==} engines: {node: 18 || 20 || >=22} braces@3.0.3: @@ -2341,9 +2103,6 @@ packages: buffer-equal-constant-time@1.0.1: resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} - buffer-from@1.1.2: - resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} @@ -2373,8 +2132,8 @@ packages: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} - call-bind@1.0.8: - resolution: {integrity: sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==} + call-bind@1.0.9: + resolution: {integrity: sha512-a/hy+pNsFUTR+Iz8TCJvXudKVLAnz/DyeSUo10I5yvFDQJBFU2s9uqQpoSrJlroHUKoKqzg+epxyP9lqFdzfBQ==} engines: {node: '>= 0.4'} call-bound@1.0.4: @@ -2563,8 +2322,8 @@ packages: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} - content-disposition@1.0.1: - resolution: {integrity: sha512-oIXISMynqSqm241k6kcQ5UwttDILMK4BiurCfGEREw6+X9jkkpEe5T9FZaApyLGGOnFuyMWZpdolTXMtvEJ08Q==} + content-disposition@1.1.0: + resolution: {integrity: sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==} engines: {node: '>=18'} content-type@1.0.5: @@ -2578,21 +2337,13 @@ packages: resolution: {integrity: sha512-rcQ1bsQO9799wq24uE5AM2tAILy4gXGIK/njFWcVQkGNZ96edlpY+A7bjwvzjYvLDyzmG1MmMLZhpcsb+klNMQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - cookie-signature@1.0.6: - resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + cookie-signature@1.0.7: + resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} cookie-signature@1.2.2: resolution: {integrity: sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==} engines: {node: '>=6.6.0'} - cookie@0.4.2: - resolution: {integrity: sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA==} - engines: {node: '>= 0.6'} - - cookie@0.5.0: - resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} - engines: {node: '>= 0.6'} - cookie@0.7.2: resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} @@ -2621,13 +2372,6 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} - css-select@5.2.2: - resolution: {integrity: sha512-TizTzUddG/xYLA3NXodFM0fSbNizXjOKhqiQQwvhlspadZokn1KDy0NZFS0wuEubIYAV5/c1/lAr0TaaFXEXzw==} - - css-what@6.2.2: - resolution: {integrity: sha512-u/O3vwbptzhMs3L1fQE82ZSLHQQfto5gyZzwteVIEyeaY5Fc7R4dapF/BvRoSYFeqfBk4m0V1Vafq5Pjv25wvA==} - engines: {node: '>= 6'} - cssesc@3.0.0: resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==} engines: {node: '>=4'} @@ -2636,9 +2380,6 @@ packages: cssfilter@0.0.10: resolution: {integrity: sha512-FAaLDaplstoRsDR8XGYH51znUN0UY7nMc6Z9/fvE8EXGwvJE9hu7W2vHwx1+bd6gCYnln9nLbzxFTrcO9YQDZw==} - cssom@0.5.0: - resolution: {integrity: sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==} - csstype@3.2.3: resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} @@ -2781,8 +2522,8 @@ packages: didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} - diff@8.0.3: - resolution: {integrity: sha512-qejHi7bcSD4hQAZE0tNAawRK1ZtafHDmMTMkrrIGgSLl7hTnQHmKCeB45xAcbfTqK2zowkM3j3bHt/4b/ARbYQ==} + diff@8.0.4: + resolution: {integrity: sha512-DPi0FmjiSU5EvQV0++GFDOJ9ASQUVFh5kD+OzOnYdi7n3Wpm9hWWGfB/O2blfHcMVTL5WkQXSnRiK9makhrcnw==} engines: {node: '>=0.3.1'} dijkstrajs@1.0.3: @@ -2799,19 +2540,6 @@ packages: resolution: {integrity: sha512-BDeBd8najI4/lS00HSKpdFia+OvUMytaVjfzR9n5Lq8MlZRSvtbI+uLtx1+XmQFls5wFU9dssccTmQQ6nfpjdg==} engines: {node: '>=6'} - dom-serializer@2.0.0: - resolution: {integrity: sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==} - - domelementtype@2.3.0: - resolution: {integrity: sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==} - - domhandler@5.0.3: - resolution: {integrity: sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==} - engines: {node: '>= 4'} - - domutils@3.2.2: - resolution: {integrity: sha512-6kZKyUajlDuqlHKVX1w7gyslj9MPIXzIFiz/rGu35uC1wMi+kMhQwGhl4lt9unC9Vb9INnY9Z3/ZA3+FhASLaw==} - dotenv@17.4.2: resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} engines: {node: '>=12'} @@ -2832,10 +2560,6 @@ packages: emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} - encodeurl@1.0.2: - resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} - engines: {node: '>= 0.8'} - encodeurl@2.0.0: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} @@ -2847,8 +2571,8 @@ packages: resolution: {integrity: sha512-HqD3yTBfnBxIrbnM1DoD6Pcq8NECnh8d4As1Qgh0z5Gg3jRRIqijury0CL3ghu/edArpUYiYqQiDUQBIs4np3Q==} engines: {node: '>=10.0.0'} - engine.io@6.5.5: - resolution: {integrity: sha512-C5Pn8Wk+1vKBoHghJODM63yk8MvrO9EWZUfkAt5HAqIgPE4/8FF0PEGHXtEd40l223+cE5ABWuPzm38PHFXfMA==} + engine.io@6.6.7: + resolution: {integrity: sha512-DgOngfDKM2EviOH3Mr9m7ks1q8roetLy/IMmYthAYzbpInMbYc/GS+fWFA3rl1gvwKVsQrVV61fo5emD1y3OJQ==} engines: {node: '>=10.2.0'} entities@4.5.0: @@ -2859,10 +2583,6 @@ packages: resolution: {integrity: sha512-aN97NXWF6AWBTahfVOIrB/NShkzi5H7F9r1s9mD3cDj4Ko5f2qhhVoYMibXF7GlLveb/D2ioWay8lxI97Ven3g==} engines: {node: '>=0.12'} - entities@7.0.1: - resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} - engines: {node: '>=0.12'} - env-paths@2.2.1: resolution: {integrity: sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==} engines: {node: '>=6'} @@ -2874,8 +2594,8 @@ packages: error-ex@1.3.4: resolution: {integrity: sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==} - es-abstract@1.24.1: - resolution: {integrity: sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==} + es-abstract@1.24.2: + resolution: {integrity: sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==} engines: {node: '>= 0.4'} es-aggregate-error@1.0.14: @@ -2890,8 +2610,8 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-module-lexer@2.0.0: - resolution: {integrity: sha512-5POEcUuZybH7IdmGsD8wlf0AI55wMecM9rVBTI/qEAy2c1kTOm3DjFYjrBdI2K3BaJjJYfYFeRtM0t9ssnRuxw==} + es-module-lexer@2.1.0: + resolution: {integrity: sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==} es-object-atoms@1.1.1: resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} @@ -2905,8 +2625,8 @@ packages: resolution: {integrity: sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==} engines: {node: '>= 0.4'} - es-toolkit@1.45.1: - resolution: {integrity: sha512-/jhoOj/Fx+A+IIyDNOvO3TItGmlMKhtX8ISAHKE90c4b/k1tqaqEZ+uUqfpU8DMnW5cgNJv606zS55jGvza0Xw==} + es-toolkit@1.46.1: + resolution: {integrity: sha512-5eNtXOs3tbfxXOj04tjjseeWkRWaoCjdEI+96DgwzZoe6c9juL49pXlzAFTI72aWC9Y8p7168g6XIKjh7k6pyQ==} esast-util-from-estree@2.0.0: resolution: {integrity: sha512-4CyanoAudUSBAn5K13H4JhsMH6L9ZP7XbLVe/dKybkxMO7eDyLsT8UHl9TRNrU2Gr9nz+FovfSIjuXWJ81uVwQ==} @@ -2914,8 +2634,8 @@ packages: esast-util-from-js@2.0.1: resolution: {integrity: sha512-8Ja+rNJ0Lt56Pcf3TAmpBZjmx8ZcK5Ts4cAzIOjsjevg9oSXJnl6SUQ2EevU8tv3h6ZLWmoKL5H4fgWvdvfETw==} - esbuild@0.27.3: - resolution: {integrity: sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==} + esbuild@0.27.7: + resolution: {integrity: sha512-IxpibTjyVnmrIQo5aqNpCgoACA/dTKLTlhMHihVHhdkxKyPO1uBBthumT0rdHmcsk9uMonIWS0m4FljWzILh3w==} engines: {node: '>=18'} hasBin: true @@ -2930,6 +2650,10 @@ packages: resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} engines: {node: '>=8'} + escape-string-regexp@4.0.0: + resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} + engines: {node: '>=10'} + escape-string-regexp@5.0.0: resolution: {integrity: sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==} engines: {node: '>=12'} @@ -2984,8 +2708,8 @@ packages: events-universal@1.0.1: resolution: {integrity: sha512-LUd5euvbMLpwOF8m6ivPCbhQeSiYVNb8Vs0fQ8QjXo0JTkEHpz8pxdQf0gStltaPpw0Cca8b39KxvK9cfKRiAw==} - eventsource-parser@3.0.6: - resolution: {integrity: sha512-Vo1ab+QXPzZ4tCa8SwIHJFaSzy4R6SHf7BY79rFBDf0idraZWAkYrDjDj8uWaSm3S2TK+hJ7/t1CEmZ7jXw+pg==} + eventsource-parser@3.0.8: + resolution: {integrity: sha512-70QWGkr4snxr0OXLRWsFLeRBIRPuQOvt4s8QYjmUlmlkyTZkRqS7EDVRZtzU3TiyDbXSzaOeF0XUKy8PchzukQ==} engines: {node: '>=18.0.0'} eventsource@3.0.7: @@ -3000,14 +2724,18 @@ packages: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} - express-rate-limit@8.3.1: - resolution: {integrity: sha512-D1dKN+cmyPWuvB+G2SREQDzPY1agpBIcTa9sJxOPMCNeH3gwzhqJRDWCXW3gg0y//+LQ/8j52JbMROWyrKdMdw==} + expr-eval-fork@3.0.3: + resolution: {integrity: sha512-BhC+hbc5lIVjygr840n5DEkW3MQq7H9o+mc1/N7Z5uIiCFVyESLL5DIE7LNq4CYUNxy+XjA+3jRrL/h0Kt2xcg==} + engines: {node: '>=16.9.0'} + + express-rate-limit@8.4.1: + resolution: {integrity: sha512-NGVYwQSAyEQgzxX1iCM978PP9AdO/hW93gMcF6ZwQCm+rFvLsBH6w4xcXWTcliS8La5EPRN3p9wzItqBwJrfNw==} engines: {node: '>= 16'} peerDependencies: express: '>= 4.11' - express@4.18.2: - resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} + express@4.22.0: + resolution: {integrity: sha512-c2iPh3xp5vvCLgaHK03+mWLFPhox7j1LwyxcZwFVApEv5i0X+IjPpbT50SJJwwLpdBVfp45AkK/v+AFgv/XlfQ==} engines: {node: '>= 0.10.0'} express@5.2.1: @@ -3035,23 +2763,23 @@ packages: fast-memoize@2.5.2: resolution: {integrity: sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==} - fast-string-truncated-width@1.2.1: - resolution: {integrity: sha512-Q9acT/+Uu3GwGj+5w/zsGuQjh9O1TyywhIwAxHudtWrgF09nHOPrvTLhQevPbttcxjr/SNN7mJmfOw/B1bXgow==} + fast-string-truncated-width@3.0.3: + resolution: {integrity: sha512-0jjjIEL6+0jag3l2XWWizO64/aZVtpiGE3t0Zgqxv0DPuxiMjvB3M24fCyhZUO4KomJQPj3LTSUnDP3GpdwC0g==} - fast-string-width@1.1.0: - resolution: {integrity: sha512-O3fwIVIH5gKB38QNbdg+3760ZmGz0SZMgvwJbA1b2TGXceKE6A2cOlfogh1iw8lr049zPyd7YADHy+B7U4W9bQ==} + fast-string-width@3.0.2: + resolution: {integrity: sha512-gX8LrtNEI5hq8DVUfRQMbr5lpaS4nMIWV+7XEbXk2b8kiQIizgnlr12B4dA3ZEx3308ze0O4Q1R+cHts8kyUJg==} fast-uri@3.1.0: resolution: {integrity: sha512-iPeeDKJSWf4IEOasVVrknXpaBV0IApz/gp7S2bb7Z4Lljbl2MGJRqInZiUrQwV16cpzw/D3S5j5Julj/gT52AA==} - fast-wrap-ansi@0.1.6: - resolution: {integrity: sha512-HlUwET7a5gqjURj70D5jl7aC3Zmy4weA1SHUfM0JFI0Ptq987NH2TwbBFLoERhfwk+E+eaq4EK3jXoT+R3yp3w==} + fast-wrap-ansi@0.2.0: + resolution: {integrity: sha512-rLV8JHxTyhVmFYhBJuMujcrHqOT2cnO5Zxj37qROj23CP39GXubJRBUFF0z8KFK77Uc0SukZUf7JZhsVEQ6n8w==} - fast-xml-builder@1.1.4: - resolution: {integrity: sha512-f2jhpN4Eccy0/Uz9csxh3Nu6q4ErKxf0XIsasomfOihuSUa3/xw6w8dnOtCDgEItQFJG8KyXPzQXzcODDrrbOg==} + fast-xml-builder@1.1.5: + resolution: {integrity: sha512-4TJn/8FKLeslLAH3dnohXqE3QSoxkhvaMzepOIZytwJXZO69Bfz0HBdDHzOTOon6G59Zrk6VQ2bEiv1t61rfkA==} - fast-xml-parser@5.5.8: - resolution: {integrity: sha512-Z7Fh2nVQSb2d+poDViM063ix2ZGt9jmY1nWhPfHBOK2Hgnb/OW3P4Et3P/81SEej0J7QbWtJqxO05h8QYfK7LQ==} + fast-xml-parser@5.7.2: + resolution: {integrity: sha512-P7oW7tLbYnhOLQk/Gv7cZgzgMPP/XN03K02/Jy6Y/NHzyIAIpxuZIM/YqAkfiXFPxA2CTm7NtCijK9EDu09u2w==} hasBin: true fastq@1.20.1: @@ -3092,8 +2820,8 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - finalhandler@1.2.0: - resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} + finalhandler@1.3.2: + resolution: {integrity: sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==} engines: {node: '>= 0.8'} finalhandler@2.1.1: @@ -3107,8 +2835,8 @@ packages: fix-dts-default-cjs-exports@1.0.1: resolution: {integrity: sha512-pVIECanWFC61Hzl2+oOCtoJ3F17kglZC/6N94eRWycFgBH35hHx0Li604ZIzhseh97mf2p0cv7vVrOZGoqhlEg==} - follow-redirects@1.15.11: - resolution: {integrity: sha512-deG2P0JfjrTxl50XGCDyfI97ZGVCxIpfKYmfyrQ54n5FO/0gfIES8C/Psl6kWVDolizcaaxZJnTS0QSMxvnsBQ==} + follow-redirects@1.16.0: + resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -3185,10 +2913,6 @@ packages: functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - gaxios@6.7.1: - resolution: {integrity: sha512-LDODD4TMYx7XXdpwxAVRAIAuB0bzv0s+ywFonY46k126qzQHT9ygyoa9tncmOiQmmDrik65UYsEkv3lbfqQ3yQ==} - engines: {node: '>=14'} - gaxios@7.1.4: resolution: {integrity: sha512-bTIgTsM2bWn3XklZISBTQX7ZSddGW+IO3bMdGaemHZ3tbqExMENHLx6kKZ/KlejgrMtj8q7wBItt51yegqalrA==} engines: {node: '>=18'} @@ -3196,10 +2920,6 @@ packages: gcd@0.0.1: resolution: {integrity: sha512-VNx3UEGr+ILJTiMs1+xc5SX1cMgJCrXezKPa003APUWNqQqaF6n25W8VcR7nHN6yRWbvvUTwCpZCFJeWC2kXlw==} - gcp-metadata@6.1.1: - resolution: {integrity: sha512-a4tiq7E0/5fTjxPAaH4jpjkSv/uCaU2p5KC6HVGrvl0cDjA8iBZv4vv1gyzlmK0ZUKqwpOyQMKzZQe3lTit77A==} - engines: {node: '>=14'} - gcp-metadata@8.1.2: resolution: {integrity: sha512-zV/5HKTfCeKWnxG0Dmrw51hEWFGfcF2xiXqcA3+J90WDuP0SvoiSO5ORvcBsifmx/FoIjgQN3oNOGaQ5PhLFkg==} engines: {node: '>=18'} @@ -3263,6 +2983,10 @@ packages: resolution: {integrity: sha512-Wjlyrolmm8uDpm/ogGyXZXb1Z+Ca2B8NbJwqBVg0axK9GbBeoS7yGV6vjXnYdGm6X53iehEuxxbyiKp8QmN4Vw==} engines: {node: 18 || 20 || >=22} + global-agent@4.1.3: + resolution: {integrity: sha512-KUJEViiuFT3I97t+GYMikLPJS2Lfo/S2F+DQuBWzuzaMPnvt5yyZePzArx36fBzpGTxZjIpDbXLeySLgh+k76g==} + engines: {node: '>=10.0'} + globalthis@1.0.4: resolution: {integrity: sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==} engines: {node: '>= 0.4'} @@ -3271,14 +2995,6 @@ packages: resolution: {integrity: sha512-e27Z6EThmVNNvtYASwQxose/G57rkRuaRbQyxM2bvYLLX/GqWZ5chWq2EBoUchJbCc57eC9ArzO5wMsEmWftCw==} engines: {node: '>=18'} - google-auth-library@9.15.1: - resolution: {integrity: sha512-Jb6Z0+nvECVz+2lzSMt9u98UsoakXxA2HGHMCxh+so3n90XgYWkq5dur19JAJV7ONiJY22yBTyJB1TSkvPq9Ng==} - engines: {node: '>=14'} - - google-logging-utils@0.0.2: - resolution: {integrity: sha512-NEgUnEcBiP5HrPzufUkBzJOD/Sxsco3rLNo1F1TNf7ieU8ryUzBhqba8r756CjLX7rn3fHl6iLEwPYuqpoKgQQ==} - engines: {node: '>=14'} - google-logging-utils@1.1.3: resolution: {integrity: sha512-eAmLkjDjAFCVXg7A1unxHsLf961m6y17QFqXqAXGj/gVkKFrEICfStRfwUlGNfeCEjNRa32JEWOUTlYXPyyKvA==} engines: {node: '>=14'} @@ -3298,10 +3014,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - gtoken@7.1.0: - resolution: {integrity: sha512-pCcEwRi+TKpMlxAQObHDQ56KawURgyAf6jtIY046fJ5tIv3zDe/LEIubckAO8fj6JnAxLdmWkUfNyulQ2iKdEw==} - engines: {node: '>=14.0.0'} - has-bigints@1.1.0: resolution: {integrity: sha512-R3pbpkcIqv2Pm3dUwgjclDRVmWpTJW2DcMzcIhEXEx1oh/CEMObMm3KLmRJOdvhM7o4uQBnwr8pzRK2sJWIqfg==} engines: {node: '>= 0.4'} @@ -3325,8 +3037,8 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + hasown@2.0.3: + resolution: {integrity: sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==} engines: {node: '>= 0.4'} hast-util-embedded@3.0.0: @@ -3396,30 +3108,20 @@ packages: highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} - hono@4.12.12: - resolution: {integrity: sha512-p1JfQMKaceuCbpJKAPKVqyqviZdS0eUxH9v82oWo1kb9xjQ5wA6iP3FNVAPDFlz5/p7d45lO+BpSk1tuSZMF4Q==} + hono@4.12.16: + resolution: {integrity: sha512-jN0ZewiNAWSe5khM3EyCmBb250+b40wWbwNILNfEvq84VREWwOIkuUsFONk/3i3nqkz7Oe1PcpM2mwQEK2L9Kg==} engines: {node: '>=16.9.0'} hosted-git-info@9.0.2: resolution: {integrity: sha512-M422h7o/BR3rmCQ8UHi7cyyMqKltdP9Uo+J2fXK+RSAY+wTcKOIRyhTuKv4qn+DJf3g+PL890AzId5KZpX+CBg==} engines: {node: ^20.17.0 || >=22.9.0} - html-escaper@3.0.3: - resolution: {integrity: sha512-RuMffC89BOWQoY0WKGpIhn5gX3iI54O6nRA0yC124NYVtzjmFWBIiFd8M0x+ZdX0P9R4lADg1mgP8C7PxGOWuQ==} - html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} - htmlparser2@10.1.0: - resolution: {integrity: sha512-VTZkM9GWRAtEpveh7MSF6SjjrpNVNNVJfFup7xTY3UpFtm67foy9HDVXneLtFVt4pMz5kZtgNcvCniNFb1hlEQ==} - http-cache-semantics@4.2.0: resolution: {integrity: sha512-dTxcvPXqPvXBQpq5dUr6mEMJX4oIEFv6bwom3FDwKRDsuIjjJGANqhBuoAn9c1RQJIdAKav33ED65E2ys+87QQ==} - http-errors@2.0.0: - resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} - engines: {node: '>= 0.8'} - http-errors@2.0.1: resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} engines: {node: '>= 0.8'} @@ -3436,6 +3138,10 @@ packages: resolution: {integrity: sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==} engines: {node: '>=10.19.0'} + http_ece@1.2.0: + resolution: {integrity: sha512-JrF8SSLVmcvc5NducxgyOrKXe3EsyHMgBFgSaIUGmArKe+rwr0uphRkRXvwiom3I+fpIfoItveHrfudL8/rxuA==} + engines: {node: '>=16'} + https-proxy-agent@7.0.6: resolution: {integrity: sha512-vK9P5/iUfdl95AI+JVyUuIcVtd4ofvtrOr3HNtM2yxC9bnMbEdp3x01OhQNnjb8IJYi38VlTE3mBXwcfvywuSw==} engines: {node: '>= 14'} @@ -3519,6 +3225,10 @@ packages: resolution: {integrity: sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==} engines: {node: '>= 12'} + ip-address@10.2.0: + resolution: {integrity: sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==} + engines: {node: '>= 12'} + ip-regex@4.3.0: resolution: {integrity: sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q==} engines: {node: '>=8'} @@ -3666,10 +3376,6 @@ packages: resolution: {integrity: sha512-ISWac8drv4ZGfwKl5slpHG9OwPNty4jOWPRIhBpxOoD+hqITiwuipOQ2bNthAzwA3B4fIjO4Nln74N0S9byq8A==} engines: {node: '>= 0.4'} - is-stream@2.0.1: - resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} - engines: {node: '>=8'} - is-string@1.1.1: resolution: {integrity: sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==} engines: {node: '>= 0.4'} @@ -3715,8 +3421,8 @@ packages: resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==} hasBin: true - jose@6.2.2: - resolution: {integrity: sha512-d7kPDd34KO/YnzaDOlikGpOurfF0ByC2sEV4cANCtdqLlTfBlw2p14O/5d/zv40gJPbIQxfES3nSx1/oYNyuZQ==} + jose@6.2.3: + resolution: {integrity: sha512-YYVDInQKFJfR/xa3ojUTl8c2KoTwiL1R5Wg9YCydwH0x0B9grbzlg5HC7mMjCtUJjbQ/YnGEZIhI5tCgfTb4Hw==} joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} @@ -3764,8 +3470,8 @@ packages: jsonc-parser@2.2.1: resolution: {integrity: sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==} - jsonfile@6.2.0: - resolution: {integrity: sha512-FGuPw30AdOIUTRMC2OMRtQV+jkVj2cfPqSeWXv1NEAJ1qZ5zb1X6z1mFhbfOB/iy3ssJCD+3KuZ8r8C3uVFlAg==} + jsonfile@6.2.1: + resolution: {integrity: sha512-zwOTdL3rFQ/lRdBnntKVOX6k5cKJwEc1HdilT71BWEu7J41gXIB2MRp+vxduPSwZJPWBxEzv4yH1wYLJGUHX4Q==} jsonpath-plus@10.4.0: resolution: {integrity: sha512-T92WWatJXmhBbKsgH/0hl+jxjdXrifi5IKeMY02DWggRxX0UElcbVzPlmgLTbvsPeW1PasQ6xE2Q75stkhGbsA==} @@ -3785,8 +3491,8 @@ packages: jws@4.0.1: resolution: {integrity: sha512-EKI/M/yqPncGUUh44xz0PxSidXFr/+r0pA70+gIYhjv+et7yxM+s29Y+VGDkovRofQem0fs7Uvf4+YmAdyRduA==} - katex@0.16.44: - resolution: {integrity: sha512-EkxoDTk8ufHqHlf9QxGwcxeLkWRR3iOuYfRpfORgYfqc8s13bgb+YtRY59NK5ZpRaCwq1kqA6a5lpX8C/eLphQ==} + katex@0.16.45: + resolution: {integrity: sha512-pQpZbdBu7wCTmQUh7ufPmLr0pFoObnGUoL/yhtwJDgmmQpbkg/0HSVti25Fu4rmd1oCR6NGWe9vqTWuWv3GcNA==} hasBin: true keytar@7.9.0: @@ -3795,8 +3501,8 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - koffi@2.15.1: - resolution: {integrity: sha512-mnc0C0crx/xMSljb5s9QbnLrlFHprioFO1hkXyuSuO/QtbpLDa0l/uM21944UfQunMKmp3/r789DTDxVyyH6aA==} + koffi@2.16.1: + resolution: {integrity: sha512-0Ie6CfD026dNfWSosDw9dPxPzO9Rlyo0N8m5r05S8YjytIpuilzMFDMY4IDy/8xQsTwpuVinhncD+S8n3bcYZQ==} lcm@0.0.3: resolution: {integrity: sha512-TB+ZjoillV6B26Vspf9l2L/vKaRY/4ep3hahcyVkCGFgsTNRUQdc24bQeNFiZeoxH0vr5+7SfNRMQuPHv/1IrQ==} @@ -3823,15 +3529,6 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - linkedom@0.18.12: - resolution: {integrity: sha512-jalJsOwIKuQJSeTvsgzPe9iJzyfVaEJiEXl+25EkKevsULHvMJzpNqwvj1jOESWdmgKDiXObyjOYwlUqG7wo1Q==} - engines: {node: '>=16'} - peerDependencies: - canvas: '>= 2' - peerDependenciesMeta: - canvas: - optional: true - linkify-it@5.0.0: resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} @@ -3849,8 +3546,8 @@ packages: lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - lodash@4.17.23: - resolution: {integrity: sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==} + lodash@4.18.1: + resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} long@5.3.2: resolution: {integrity: sha512-mNAgZ1GmyNhD7AuqnTG3/VQ26o760+ZYBPKjPvugO8+nLbYfX6TVpJPseBvopbdY+qpZ/lKUnmEc1LeZYS3QAA==} @@ -3866,8 +3563,8 @@ packages: resolution: {integrity: sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - lru-cache@11.2.6: - resolution: {integrity: sha512-ESL2CrkS/2wTPfuend7Zhkzo2u0daGJ/A2VucJOgQ/C48S/zB8MMeMHSGKYpXhIjbPxfuezITkaBH1wqv00DDQ==} + lru-cache@11.3.5: + resolution: {integrity: sha512-NxVFwLAnrd9i7KUBxC4DrUhmgjzOs+1Qm50D3oF1/oL+r1NpZ4gA7xvG0/zJ8evR7zIKn4vLf7qTNduWFtCrRw==} engines: {node: 20 || >=22} lru-cache@7.18.3: @@ -3893,6 +3590,10 @@ packages: engines: {node: '>= 18'} hasBin: true + matcher@4.0.0: + resolution: {integrity: sha512-S6x5wmcDmsDRRU/c2dkccDwQPXoFczc5+HpQ2lON8pnvHlnvHAHj5WlLVvw6n6vNyHuVugYrFohYxbS+pvFpKQ==} + engines: {node: '>=10'} + math-intrinsics@1.1.0: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} @@ -3971,8 +3672,8 @@ packages: resolution: {integrity: sha512-aisnrDP4GNe06UcKFnV5bfMNPBUw4jsLGaWwWfnH3v02GnBuXX2MCVn5RbrWo0j3pczUilYblq7fQ7Nw2t5XKw==} engines: {node: '>= 0.8'} - merge-descriptors@1.0.1: - resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} + merge-descriptors@1.0.3: + resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} merge-descriptors@2.0.0: resolution: {integrity: sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==} @@ -4134,12 +3835,15 @@ packages: resolution: {integrity: sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - minimatch@10.2.4: - resolution: {integrity: sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==} + minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} engines: {node: 18 || 20 || >=22} - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@3.1.5: + resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -4175,8 +3879,8 @@ packages: engines: {node: '>=10'} hasBin: true - mlly@1.8.0: - resolution: {integrity: sha512-l8D9ODSRWLe2KHJSifWGwBqpTZXIXTeo8mlKjY+E2HAakaTeNpqAyBZ8GSqLzHgw4XmHmC8whvpjJNMbFZN7/g==} + mlly@1.8.2: + resolution: {integrity: sha512-d+ObxMQFmbt10sretNDytwt85VrbkhhUA/JBGm1MPaWJ65Cl4wOgLaB1NYvJSZ0Ef03MMEU/0xpPMXUIQ29UfA==} ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -4191,8 +3895,8 @@ packages: mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} - nanoid@3.3.11: - resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} + nanoid@3.3.12: + resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -4211,12 +3915,12 @@ packages: resolution: {integrity: sha512-Z4SmBUweYa09+o6pG+eASabEpP6QkQ70yHj351pQoEXIs8uHbaU2DWVmzBANKgflPa47A50PtB2+NgRpQvr7vA==} engines: {node: '>= 10'} - netmask@2.0.2: - resolution: {integrity: sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==} + netmask@2.1.1: + resolution: {integrity: sha512-eonl3sLUha+S1GzTPxychyhnUzKyeQkZ7jLjKrBagJgPla13F+uQ71HgpFefyHgqrjEbCPkDArxYsjY8/+gLKA==} engines: {node: '>= 0.4.0'} - next-mdx-remote-client@1.1.6: - resolution: {integrity: sha512-O4HIpi44d6SismhfG5W78aTUfgxfbsj6FgoM4/G3o4Vtcobt0Ej439IiDPkv+IqsmtouVYG1tGAsz1DIuj9Tfg==} + next-mdx-remote-client@1.1.7: + resolution: {integrity: sha512-12Ap5Z/tFIETMXFSBTH2IFEhJAso7MvOJ5ICyesA4q6FM4vtAcmb+4ZKa4tV1IVQJLBVqOhaEfIESZzdwjmrQQ==} engines: {node: '>=20.9.0'} peerDependencies: react: '>= 18.3.0 < 19.0.0' @@ -4236,6 +3940,10 @@ packages: node-addon-api@4.3.0: resolution: {integrity: sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==} + node-addon-api@8.7.0: + resolution: {integrity: sha512-9MdFxmkKaOYVTV+XVRG8ArDwwQ77XIgIPyKASB1k3JPq3M8fGQQQE3YpMOrKm6g//Ktx8ivZr8xo1Qmtqub+GA==} + engines: {node: ^18 || ^20 || >= 21} + node-domexception@1.0.0: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} @@ -4263,9 +3971,6 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-readable-to-web-readable-stream@0.4.2: - resolution: {integrity: sha512-/cMZNI34v//jUTrI+UIo4ieHAB5EZRY/+7OmXZgBxaWBMcW2tGdceIw06RFxWxrKZ5Jp3sI2i5TsRo+CBhtVLQ==} - non-error@0.1.0: resolution: {integrity: sha512-TMB1uHiGsHRGv1uYclfhivcnf0/PdFp2pNqRxXjncaAsjYMoisaQJI+SSZCqRq+VliwRTC8tsMQfmrWjDMhkPQ==} engines: {node: '>=20'} @@ -4278,11 +3983,8 @@ packages: resolution: {integrity: sha512-JYc0DPlpGWB40kH5g07gGTrYuMqV653k3uBKY6uITPWds3M0ov3GaWGp9lbE3Bzngx8+XkfzgvASb9vk9JDFXQ==} engines: {node: '>=14.16'} - nth-check@2.1.1: - resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} - - oauth4webapi@3.8.5: - resolution: {integrity: sha512-A8jmyUckVhRJj5lspguklcl90Ydqk61H3dcU0oLhH3Yv13KpAliKTt5hknpGGPZSSfOwGyraNEFmofDYH+1kSg==} + oauth4webapi@3.8.6: + resolution: {integrity: sha512-iwemM91xz8nryHti2yTmg5fhyEMVOkOXwHNqbvcATjyajb5oQxCQzrNOA6uElRHuMhQQTKUyFKV9y/CNyg25BQ==} object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} @@ -4318,11 +4020,11 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} - oniguruma-parser@0.12.1: - resolution: {integrity: sha512-8Unqkvk1RYc6yq2WBYRj4hdnsAxVze8i7iPfQr8e4uSP3tRv0rpZcbGUDvxfQQcdwHt/e9PrMvGCsa8OqG9X3w==} + oniguruma-parser@0.12.2: + resolution: {integrity: sha512-6HVa5oIrgMC6aA6WF6XyyqbhRPJrKR02L20+2+zpDtO5QAzGHAUGw5TKQvwi5vctNnRHkJYmjAhRVQF2EKdTQw==} - oniguruma-to-es@4.3.5: - resolution: {integrity: sha512-Zjygswjpsewa0NLTsiizVuMQZbp0MDyM6lIt66OxsF21npUDlzpHi1Mgb/qhQdkb+dWFTzJmFbEWdvZgRho8eQ==} + oniguruma-to-es@4.3.6: + resolution: {integrity: sha512-csuQ9x3Yr0cEIs/Zgx/OEt9iBw9vqIunAPQkx19R/fiMq2oGVTgcMqO/V3Ybqefr1TBvosI6jU539ksaBULJyA==} open@8.4.2: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} @@ -4340,8 +4042,8 @@ packages: zod: optional: true - openai@6.34.0: - resolution: {integrity: sha512-yEr2jdGf4tVFYG6ohmr3pF6VJuveP0EA/sS8TBx+4Eq5NT10alu5zg2dmxMXMgqpihRDQlFGpRt2XwsGj+Fyxw==} + openai@6.35.0: + resolution: {integrity: sha512-L/skwIGnt5xQZHb0UfTu9uAUKbis3ehKypOuJKi20QvG7UStV6C8IC3myGYHcdiF4kms/bAvOJ9UqqNWqi8x/Q==} hasBin: true peerDependencies: ws: ^8.18.0 @@ -4355,23 +4057,13 @@ packages: openapi-types@12.1.3: resolution: {integrity: sha512-N4YtSYJqghVu4iek2ZUvcN/0aqH1kRDuNqzcycDxhOUpg7GdvLa2F3DgS6yBNhInhv2r/6I0Flkn7CqL8+nIcw==} - openclaw@2026.4.23: - resolution: {integrity: sha512-Er5q6z4bBFgO2T+YwJcL7WqhH8dQfB0X4h2sEO2K2C1HiEGQ3Wt9qjeNWRoGDSkGsSxAY59vtOxU8JPzZ0SgjQ==} + openclaw@2026.4.29: + resolution: {integrity: sha512-IRhX38ow4Hj783YxChK10rHwNg6OCupzGvVxG7EE24GaXHBumrESDpWUsgX0FiwTa0LYQBxuAcDncbyFiGVaOg==} engines: {node: '>=22.14.0'} hasBin: true - peerDependencies: - '@napi-rs/canvas': ^0.1.89 - node-llama-cpp: 3.18.1 - peerDependenciesMeta: - node-llama-cpp: - optional: true - - openid-client@6.8.2: - resolution: {integrity: sha512-uOvTCndr4udZsKihJ68H9bUICrriHdUVJ6Az+4Ns6cW55rwM5h0bjVIzDz2SxgOI84LKjFyjOFvERLzdTUROGA==} - osc-progress@0.3.0: - resolution: {integrity: sha512-4/8JfsetakdeEa4vAYV45FW20aY+B/+K8NEXp5Eiar3wR8726whgHrbSg5Ar/ZY1FLJ/AGtUqV7W2IVF+Gvp9A==} - engines: {node: '>=20'} + openid-client@6.8.4: + resolution: {integrity: sha512-QSw0BA08piujetEwfZsHoTrDpMEha7GDZDicQqVwX4u0ChCjefvjDB++TZ8BTg76UpwhzIQgdvvfgfl3HpCSAw==} own-keys@1.0.1: resolution: {integrity: sha512-qFOyK5PjiWZd+QQIh+1jhdb9LpxTF0qs7Pm8o5QHYZ0M3vKqSqzsZaEB6oWlxZ+q2sJBMI/Ktgd2N5ZwQoRHfg==} @@ -4471,8 +4163,8 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-expression-matcher@1.2.0: - resolution: {integrity: sha512-DwmPWeFn+tq7TiyJ2CxezCAirXjFxvaiD03npak3cRjlP9+OjTmSy1EpIrEbh+l6JgUundniloMLDQ/6VTdhLQ==} + path-expression-matcher@1.5.0: + resolution: {integrity: sha512-cbrerZV+6rvdQrrD+iGMcZFEiiSrbv9Tfdkvnusy6y0x0GKBXREFg/Y65GhIfm0tnLntThhzCnfKwp1WRjeCyQ==} engines: {node: '>=14.0.0'} path-key@3.1.1: @@ -4486,19 +4178,15 @@ packages: resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} engines: {node: 18 || 20 || >=22} - path-to-regexp@0.1.7: - resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} + path-to-regexp@0.1.13: + resolution: {integrity: sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==} - path-to-regexp@8.3.0: - resolution: {integrity: sha512-7jdwVIRtsP8MYpdXSwOS0YdD0Du+qOoF/AEPIt88PcCFrZCzx41oxku1jD88hZBwbNUIEfpqvuhjFaMAqMTWnA==} + path-to-regexp@8.4.2: + resolution: {integrity: sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==} pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - pdfjs-dist@5.6.205: - resolution: {integrity: sha512-tlUj+2IDa7G1SbvBNN74UHRLJybZDWYom+k6p5KIZl7huBvsA4APi6mKL+zCxd3tLjN5hOOEE9Tv7VdzO88pfg==} - engines: {node: '>=20.19.0 || >=22.13.0 || >=24'} - pend@1.2.0: resolution: {integrity: sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==} @@ -4509,8 +4197,8 @@ packages: resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} engines: {node: '>=8.6'} - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} pify@2.3.0: @@ -4595,6 +4283,10 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} + postcss@8.5.13: + resolution: {integrity: sha512-qif0+jGGZoLWdHey3UFHHWP0H7Gbmsk8T5VEqyYFbWqPr1XqvLGBbk/sl8V5exGmcYJklJOhOQq1pV9IcsiFag==} + engines: {node: ^10 || ^12 || >=14} + postcss@8.5.6: resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} engines: {node: ^10 || ^12 || >=14} @@ -4625,8 +4317,8 @@ packages: property-information@7.1.0: resolution: {integrity: sha512-TwEZ+X+yCJmYfL7TPUOcvBZ4QfoT5YenQiJuX//0th53DE6w0xxLEtfK3iyryQFddXuvkIk51EEgrJQ0WJkOmQ==} - protobufjs@7.5.4: - resolution: {integrity: sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg==} + protobufjs@7.5.6: + resolution: {integrity: sha512-M71sTMB146U3u0di3yup8iM+zv8yPRNQVr1KK4tyBitl3qFvEGucq/rGDRShD2rsJhtN02RJaJ7j5X5hmy8SJg==} engines: {node: '>=12.0.0'} proxy-addr@2.0.7: @@ -4674,12 +4366,12 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - qs@6.11.0: - resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} + qs@6.14.2: + resolution: {integrity: sha512-V/yCWTTF7VJ9hIh18Ugr2zhJMP01MY7c5kh4J870L7imm6/DIzBsNLTXzMwUA3yZ5b/KBqLx8Kp3uRvd7xSe3Q==} engines: {node: '>=0.6'} - qs@6.15.0: - resolution: {integrity: sha512-mAZTtNCeetKMH+pSjrb76NAM8V9a05I9aBZOHztWy/UqcJdQYNsf59vrRKWnojAT9Y+GbIvoTBC++CPHqpDBhQ==} + qs@6.15.1: + resolution: {integrity: sha512-6YHEFRL9mfgcAvql/XhwTvf5jKcOiiupt2FiJxHkiX1z4j7WL8J/jRHYLluORvc1XxB5rV20KoeK00gVJamspg==} engines: {node: '>=0.6'} queue-microtask@1.2.3: @@ -4696,8 +4388,8 @@ packages: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} - raw-body@2.5.1: - resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} + raw-body@2.5.3: + resolution: {integrity: sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==} engines: {node: '>= 0.8'} raw-body@3.0.2: @@ -4827,11 +4519,14 @@ packages: remark-gfm@4.0.0: resolution: {integrity: sha512-U92vJgBPkbw4Zfu/IiW2oTZLSL3Zpv+uI7My2eq8JxKgqraFdU8YUGicEJCEgSbeaG+QDFqIcwwfMTOEelPxuA==} + remark-gfm@4.0.1: + resolution: {integrity: sha512-1quofZ2RQ9EWdeN34S79+KExV1764+wCUGop5CPL1WGdD0ocPpu91lzPGbwWMECpEpd42kJGQwzRfyov9j4yNg==} + remark-math@6.0.0: resolution: {integrity: sha512-MMqgnP74Igy+S3WwnhQ7kqGlEerTETXMvJhrUzDikVZ2/uogJCb+WHUg97hK9/jcfc0dkD73s3LN8zU49cTEtA==} - remark-mdx-remove-esm@1.2.3: - resolution: {integrity: sha512-n6r36SaE+7cno7pmshWbGzYolDVLxJm5EKuw67+q4SPQT6kelNJHyZAiFYYtOB0axh+/1xF4BC57Ec3jncAGXQ==} + remark-mdx-remove-esm@1.3.1: + resolution: {integrity: sha512-POa8abdiuicD2e+zQkclxzJa5JEGLtV8XIOFVvisnGuw4l4xd6dfQozedwqR8JTeXQmxLebvYhlbwHoQP9RWkw==} peerDependencies: unified: ^11 @@ -4841,12 +4536,18 @@ packages: remark-mdx@3.1.0: resolution: {integrity: sha512-Ngl/H3YXyBV9RcRNdlYsZujAmhsxwzxpDzpDEhFBVAGthS4GDgnctpDjgFl/ULx5UEDzqtW1cyBSNKqYYrqLBA==} + remark-mdx@3.1.1: + resolution: {integrity: sha512-Pjj2IYlUY3+D8x00UJsIOg5BEvfMyeI+2uLPn9VO9Wg4MEtN/VTIq2NEJQfde9PnX15KgtHyl9S0BcTnWrIuWg==} + remark-parse@11.0.0: resolution: {integrity: sha512-FCxlKLNGknS5ba/1lmpYijMUzX2esxW5xQqjWxw2eHFfS2MSdaHVINFmhjo+qN1WhZhNimq0dZATN9pH0IDrpA==} remark-rehype@11.1.1: resolution: {integrity: sha512-g/osARvjkBXb6Wo0XvAeXQohVta8i84ACbenPpoSsxTOQH/Ae0/RGP4WZgnMH5pMLpsj4FG7OHmcIcXxpza8eQ==} + remark-rehype@11.1.2: + resolution: {integrity: sha512-Dh7l57ianaEoIpzbp0PC9UKAdCSVklD8E5Rpw7ETfbTl3FqcOOgq5q2LVDhgGCkaBv7p24JXikPdvhhmHvKMsw==} + remark-smartypants@3.0.2: resolution: {integrity: sha512-ILTWeOriIluwEvPjv67v7Blgrcx+LZOkAUVtKI3putuhlZm84FnqDORNXPPm+HY3NdZOMhyDwZ1E+eZB/Df5dA==} engines: {node: '>=16.0.0'} @@ -4879,8 +4580,8 @@ packages: resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} engines: {node: '>=8'} - resolve@1.22.11: - resolution: {integrity: sha512-RfqAvLnMl313r7c9oclB1HhUEAezcpLjz95wFH4LVuhk9JF/r22qmVP9AMmOU4vMX7Q8pN8jwNg/CSpdFnMjTQ==} + resolve@1.22.12: + resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==} engines: {node: '>= 0.4'} hasBin: true @@ -4916,8 +4617,8 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup@4.59.0: - resolution: {integrity: sha512-2oMpl67a3zCH9H79LeMcbDhXW/UmWG/y2zuqnF2jQq5uq9TbM9TVyXvA4+t+ne2IIkBdrLpAaRQAvo7YI/Yyeg==} + rollup@4.60.2: + resolution: {integrity: sha512-J9qZyW++QK/09NyN/zeO0dG/1GdGfyp9lV8ajHnRVLfo/uFsbji5mHnDgn/qYdUHyCkM2N+8VyspgZclfAh0eQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -4935,8 +4636,8 @@ packages: rxjs@7.8.2: resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} - safe-array-concat@1.1.3: - resolution: {integrity: sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==} + safe-array-concat@1.1.4: + resolution: {integrity: sha512-wtZlHyOje6OZTGqAoaDKxFkgRtkF9CnHAVnCHKfuj200wAgL+bSJhdsCD2l0Qx/2ekEXjPWcyKkfGb5CPboslg==} engines: {node: '>=0.4'} safe-buffer@5.1.2: @@ -4979,8 +4680,8 @@ packages: engines: {node: '>=10'} hasBin: true - send@0.18.0: - resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} + send@0.19.2: + resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==} engines: {node: '>= 0.8.0'} send@1.2.1: @@ -4991,8 +4692,12 @@ packages: resolution: {integrity: sha512-bBZaRwLH9PN5HbLCjPId4dP5bNGEtumcErgOX952IsvOhVPrm3/AeK1y0UHA/QaPG701eg0yEnOKsCOC6X/kaA==} engines: {node: '>=20'} - serve-static@1.15.0: - resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} + serialize-error@8.1.0: + resolution: {integrity: sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==} + engines: {node: '>=10'} + + serve-static@1.16.3: + resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} engines: {node: '>= 0.8.0'} serve-static@2.2.1: @@ -5027,10 +4732,6 @@ packages: resolution: {integrity: sha512-haPVm1EkS9pgvHrQ/F3Xy+hgcuMV0Wm9vfIBSiwZ05k+xgb0PkBQpGsAA/oWdDobNaZTH5ppvHtzCFbnSEwHVw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - sharp@0.34.5: - resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} engines: {node: '>=8'} @@ -5042,8 +4743,8 @@ packages: shiki@3.23.0: resolution: {integrity: sha512-55Dj73uq9ZXL5zyeRPzHQsK7Nbyt6Y10k5s7OjuFZGMhpp4r/rsLBH0o/0fstIzX1Lep9VxefWljK/SKCzygIA==} - side-channel-list@1.0.0: - resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} engines: {node: '>= 0.4'} side-channel-map@1.0.1: @@ -5071,16 +4772,15 @@ packages: simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} - simple-eval@1.0.1: - resolution: {integrity: sha512-LH7FpTAkeD+y5xQC4fzS+tFtaNlvt3Ib1zKzvhjv/Y+cioV4zIuw4IZr2yhRLu67CWL7FR9/6KXKnjRoZTvGGQ==} - engines: {node: '>=12'} - simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} simple-swizzle@0.2.4: resolution: {integrity: sha512-nAu1WFPQSMNr2Zn9PGSZK9AGn4t/y97lEm+MXTtUDwfP0ksAIX4nO+6ruD9Jwut4C49SB1Ws+fbXsm/yScWOHw==} + simplex-chat@6.5.0: + resolution: {integrity: sha512-QFGI734HhYJ7trSrEKiZ2mbodI0V8CLDGEv2+yt5zsg0FqftxSpFik6zUSezTRZtN1M8WmSlT44qlEt2a1fXQw==} + sisteransi@1.0.5: resolution: {integrity: sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==} @@ -5103,8 +4803,8 @@ packages: resolution: {integrity: sha512-asJqbVBDsBCJx0pTqw3WfesSY0iRX+2xzWEWzrpcH7L6fLzrhyF8WPI8UaeM4YCuDfpwA/cgsdugMsmtz8EJeg==} engines: {node: '>=10.0.0'} - socket.io@4.7.2: - resolution: {integrity: sha512-bvKVS29/I5fl2FGLNHuXlQaUH/BlzX1IN6S+NKLNZpBsPZIDH+90eQmCs2Railn4YUiww4SzUedJ6+uzwFnKLw==} + socket.io@4.8.0: + resolution: {integrity: sha512-8U6BEgGjQOfGz3HHTYaC/L1GaxDCJ/KM0XTkJly0EhZ5U/du9uNEZy4ZgYzEzIqlx2CMm25CrCqr1ck899eLNA==} engines: {node: '>=10.2.0'} socks-proxy-agent@10.0.0: @@ -5115,17 +4815,14 @@ packages: resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==} engines: {node: '>= 14'} - socks@2.8.7: - resolution: {integrity: sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==} + socks@2.8.8: + resolution: {integrity: sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==} engines: {node: '>= 10.0.0', npm: '>= 3.0.0'} source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} - source-map-support@0.5.21: - resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} - source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -5175,10 +4872,6 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} - engines: {node: '>= 0.8'} - statuses@2.0.2: resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} @@ -5186,8 +4879,8 @@ packages: std-env@3.10.0: resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} - std-env@4.0.0: - resolution: {integrity: sha512-zUMPtQ/HBY3/50VbpkupYHbRroTRZJPRLvreamgErJVys0ceuzMkD44J/QjqhHjOzK42GQ3QZIeFG1OYfOtKqQ==} + std-env@4.1.0: + resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==} stop-iteration-iterator@1.1.0: resolution: {integrity: sha512-eLoXW/DHyl62zxY4SCaIgnRhuMr6ri4juEYARS8E6sCEqzKpOiE521Ucofdx+KnDZl5xmvGYaaKCk5FEOxJCoQ==} @@ -5219,6 +4912,9 @@ packages: string_decoder@1.1.1: resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} @@ -5234,8 +4930,8 @@ packages: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} - strnum@2.2.0: - resolution: {integrity: sha512-Y7Bj8XyJxnPAORMZj/xltsfo55uOiyHcU2tnAVzHUnSJR/KsEX+9RoDeXEnsXtl/CX4fAcrt64gZ13aGaWPeBg==} + strnum@2.2.3: + resolution: {integrity: sha512-oKx6RUCuHfT3oyVjtnrmn19H1SiCqgJSg+54XqURKp5aCMbrXrhLjRN9TjuwMjiYstZ0MzDrHqkGZ5dFTKd+zg==} strtok3@10.3.5: resolution: {integrity: sha512-ki4hZQfh5rX0QDLLkOCj+h+CVNkqmp/CMf8v8kZpkNVK6jGQooMytqzLZYUVYIZcFZ6yDB70EfD8POcFXiF5oA==} @@ -5284,8 +4980,8 @@ packages: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} - tar-stream@3.1.8: - resolution: {integrity: sha512-U6QpVRyCGHva435KoNWy9PRoi2IFYCgtEhq9nmrPPpbRacPs9IH4aJ3gbrFC8dPcXvdSZ4XXfXT5Fshbp2MtlQ==} + tar-stream@3.2.0: + resolution: {integrity: sha512-ojzvCvVaNp6aOTFmG7jaRD0meowIAuPc3cMMhSgKiVWws1GyHbGd/xvnyuRKcKlMpt3qvxx6r0hreCNITP9hIg==} tar@6.1.15: resolution: {integrity: sha512-/zKt9UyngnxIT/EAGYuxaMYgOIJiP81ab9ZfkILq4oNLPFX50qyYmu7jRj9qeXoxmJHjGlbH0+cm2uy1WCs10A==} @@ -5318,12 +5014,12 @@ packages: tinyexec@0.3.2: resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} - tinyexec@1.0.4: - resolution: {integrity: sha512-u9r3uZC0bdpGOXtlxUIdwf9pkmvhqJdrVCH9fapQtgy/OeTTMZ1nqH7agtvEfmGui6e1XxjcdrlxvxJvc3sMqw==} + tinyexec@1.1.2: + resolution: {integrity: sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==} engines: {node: '>=18'} - tinyglobby@0.2.15: - resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + tinyglobby@0.2.16: + resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} engines: {node: '>=12.0.0'} tinyrainbow@3.1.0: @@ -5399,13 +5095,17 @@ packages: tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} - twoslash-protocol@0.3.6: - resolution: {integrity: sha512-FHGsJ9Q+EsNr5bEbgG3hnbkvEBdW5STgPU824AHUjB4kw0Dn4p8tABT7Ncg1Ie6V0+mDg3Qpy41VafZXcQhWMA==} + twoslash-protocol@0.3.8: + resolution: {integrity: sha512-HmvAHoiEviK8LqvAQyc9/irkdvwTUiR1fHmNwH/0gq8EHxyBt4PWVPixjEXg6wJu1u6yBrILEWXGK9Kw58/8yQ==} - twoslash@0.3.6: - resolution: {integrity: sha512-VuI5OKl+MaUO9UIW3rXKoPgHI3X40ZgB/j12VY6h98Ae1mCBihjPvhOPeJWlxCYcmSbmeZt5ZKkK0dsVtp+6pA==} + twoslash@0.3.8: + resolution: {integrity: sha512-OeDz0kDl8sqPUN3nr7gqcvOs70f5lZsdhKYTX3/SgB9OvdadzzoYJI/4SBXhXV1HG8E9fLc+e17itoRYTxmoig==} peerDependencies: - typescript: ^5.5.0 + typescript: ^5.5.0 || ^6.0.0 + + type-fest@0.20.2: + resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} + engines: {node: '>=10'} type-fest@0.21.3: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} @@ -5415,8 +5115,8 @@ packages: resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==} engines: {node: '>=16'} - type-fest@5.5.0: - resolution: {integrity: sha512-PlBfpQwiUvGViBNX84Yxwjsdhd1TUlXr6zjX7eoirtCPIr08NAmxwa+fcYBTeRQxHo9YC9wwF3m9i700sHma8g==} + type-fest@5.6.0: + resolution: {integrity: sha512-8ZiHFm91orbSAe2PSAiSVBVko18pbhbiB3U9GglSzF/zCGkR+rxpHx6sEMCUm4kxY4LjDIUGgCfUMtwfZfjfUA==} engines: {node: '>=20'} type-is@1.6.18: @@ -5427,8 +5127,8 @@ packages: resolution: {integrity: sha512-OZs6gsjF4vMp32qrCbiVSkrFmXtG/AZhY3t0iAMrMBiAZyV9oALtXO8hsrHbMXF9x6L3grlFuwW2oAz7cav+Gw==} engines: {node: '>= 0.6'} - typebox@1.1.28: - resolution: {integrity: sha512-OqHTHRfBpQHWPipoeFVkNgxKjjXhGY49UgekFrOuaC9O59/Hws8KHjGa1AUfNYnxWSfuNRkTB81FAL/QbTWFrg==} + typebox@1.1.34: + resolution: {integrity: sha512-V0fM5W5DTXlEMDxqtX1dQ25HR1RQ11DPUVrIup4sJi1yQtIyI30SHfxBy/HjXKL1CtUqc5or2igA/wa/v4hMKQ==} typed-array-buffer@1.0.3: resolution: {integrity: sha512-nAYYwfY3qnzX30IkA6AQZjVbtK6duGontcQm1WSG1MD94YLqK0515GNApXkoxKOWMusVssAHWLh9SeaoefYFGw==} @@ -5451,14 +5151,16 @@ packages: engines: {node: '>=14.17'} hasBin: true + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} + engines: {node: '>=14.17'} + hasBin: true + uc.micro@2.1.0: resolution: {integrity: sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==} - ufo@1.6.3: - resolution: {integrity: sha512-yDJTmhydvl5lJzBmy/hyOAA0d+aqCBuwl818haVdYCRrWV84o7YyeVm4QlVHStqNrrJSTb6jKuFAVqAFsr+K3Q==} - - uhyphen@0.2.0: - resolution: {integrity: sha512-qz3o9CHXmJJPGBdqzab7qAYuW8kQGKNEuoHFYrBwV6hWIMcpAmxDLXojcHfFr9US1Pe6zUswEIJIbLI610fuqA==} + ufo@1.6.4: + resolution: {integrity: sha512-JFNbkD1Svwe0KvGi8GOeLcP4kAWQ609twvCdcHxq1oSL8svv39ZuSvajcD8B+5D0eL4+s1Is2D/O6KN3qcTeRA==} uint8array-extras@1.5.0: resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==} @@ -5471,14 +5173,11 @@ packages: unbzip2-stream@1.4.3: resolution: {integrity: sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg==} - undici-types@7.18.2: - resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} - undici-types@7.19.2: resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==} - undici@7.24.6: - resolution: {integrity: sha512-Xi4agocCbRzt0yYMZGMA6ApD7gvtUFaxm4ZmeacWI4cZxaF6C+8I8QfofC20NAePiB/IcvZmzkJ7XPa471AEtA==} + undici@7.25.0: + resolution: {integrity: sha512-xXnp4kTyor2Zq+J1FfPI6Eq3ew5h6Vl0F/8d9XU5zZQf1tX9s2Su1/3PiMmUANFULpmksxkClamIZcaUqryHsQ==} engines: {node: '>=20.18.1'} undici@8.1.0: @@ -5539,9 +5238,6 @@ packages: unist-util-visit@5.0.0: resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} - unist-util-visit@5.1.0: - resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} - universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -5595,10 +5291,6 @@ packages: resolution: {integrity: sha512-Qo+uWgilfSmAhXCMav1uYFynlQO7fMFiMVZsQqZRMIXp0O7rR7qjkj+cPvBHLgBqi960QCoo/PH2/6ZtVqKvrg==} hasBin: true - uuid@9.0.1: - resolution: {integrity: sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==} - hasBin: true - vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} @@ -5655,18 +5347,20 @@ packages: yaml: optional: true - vitest@4.1.2: - resolution: {integrity: sha512-xjR1dMTVHlFLh98JE3i/f/WePqJsah4A0FK9cc8Ehp9Udk0AZk6ccpIZhh1qJ/yxVWRZ+Q54ocnD8TXmkhspGg==} + vitest@4.1.5: + resolution: {integrity: sha512-9Xx1v3/ih3m9hN+SbfkUyy0JAs72ap3r7joc87XL6jwF0jGg6mFBvQ1SrwaX+h8BlkX6Hz9shdd1uo6AF+ZGpg==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@opentelemetry/api': ^1.9.0 '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 - '@vitest/browser-playwright': 4.1.2 - '@vitest/browser-preview': 4.1.2 - '@vitest/browser-webdriverio': 4.1.2 - '@vitest/ui': 4.1.2 + '@vitest/browser-playwright': 4.1.5 + '@vitest/browser-preview': 4.1.5 + '@vitest/browser-webdriverio': 4.1.5 + '@vitest/coverage-istanbul': 4.1.5 + '@vitest/coverage-v8': 4.1.5 + '@vitest/ui': 4.1.5 happy-dom: '*' jsdom: '*' vite: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -5683,6 +5377,10 @@ packages: optional: true '@vitest/browser-webdriverio': optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': + optional: true '@vitest/ui': optional: true happy-dom: @@ -5693,6 +5391,11 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} + web-push@3.6.7: + resolution: {integrity: sha512-OpiIUe8cuGjrj3mMBFWY+e4MMIkW3SVT+7vEIjvD9kejGUypv8GPDf84JdPWskK8zMRIJ6xYGm+Kxr8YkPyA0A==} + engines: {node: '>= 16'} + hasBin: true + web-streams-polyfill@3.3.3: resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} @@ -5751,18 +5454,6 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@8.17.1: - resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} - engines: {node: '>=10.0.0'} - peerDependencies: - bufferutil: ^4.0.1 - utf-8-validate: '>=5.0.2' - peerDependenciesMeta: - bufferutil: - optional: true - utf-8-validate: - optional: true - ws@8.18.3: resolution: {integrity: sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg==} engines: {node: '>=10.0.0'} @@ -5866,10 +5557,10 @@ packages: peerDependencies: zod: ^3.20.0 - zod-to-json-schema@3.25.1: - resolution: {integrity: sha512-pM/SU9d3YAggzi6MtR4h7ruuQlqKtad8e9S0fmxcMi+ueAK5Korys/aWcV9LIIHTVbj01NdzxcnXSN+O74ZIVA==} + zod-to-json-schema@3.25.2: + resolution: {integrity: sha512-O/PgfnpT1xKSDeQYSCfRI5Gy3hPf91mKVDuYLUHZJMiDFptvP41MSnWofm8dnCm0256ZNfZIM7DSzuSMAFnjHA==} peerDependencies: - zod: ^3.25 || ^4 + zod: ^3.25.28 || ^4 zod@3.21.4: resolution: {integrity: sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==} @@ -5888,7 +5579,7 @@ packages: snapshots: - '@agentclientprotocol/sdk@0.19.0(zod@4.3.6)': + '@agentclientprotocol/sdk@0.21.0(zod@4.3.6)': dependencies: zod: 4.3.6 @@ -5905,27 +5596,12 @@ snapshots: optionalDependencies: zod: 4.3.6 - '@anthropic-ai/vertex-sdk@0.16.0(zod@4.3.6)': - dependencies: - '@anthropic-ai/sdk': 0.90.0(zod@4.3.6) - google-auth-library: 9.15.1 - transitivePeerDependencies: - - encoding - - supports-color - - zod - - '@ark/schema@0.55.0': + '@ark/schema@0.55.0': dependencies: '@ark/util': 0.55.0 - '@ark/schema@0.56.0': - dependencies: - '@ark/util': 0.56.0 - '@ark/util@0.55.0': {} - '@ark/util@0.56.0': {} - '@asyncapi/parser@3.4.0': dependencies: '@asyncapi/specs': 6.8.1 @@ -5933,16 +5609,16 @@ snapshots: '@stoplight/json': 3.21.0 '@stoplight/json-ref-readers': 1.2.2 '@stoplight/json-ref-resolver': 3.1.6 - '@stoplight/spectral-core': 1.21.0 - '@stoplight/spectral-functions': 1.10.1 + '@stoplight/spectral-core': 1.22.0 + '@stoplight/spectral-functions': 1.10.2 '@stoplight/spectral-parsers': 1.0.5 '@stoplight/spectral-ref-resolver': 1.0.5 '@stoplight/types': 13.20.0 '@types/json-schema': 7.0.15 '@types/urijs': 1.19.26 - ajv: 8.18.0 - ajv-errors: 3.0.0(ajv@8.18.0) - ajv-formats: 2.1.1(ajv@8.18.0) + ajv: 8.20.0 + ajv-errors: 3.0.0(ajv@8.20.0) + ajv-formats: 2.1.1(ajv@8.20.0) avsc: 5.7.9 js-yaml: 4.1.0 jsonpath-plus: 10.4.0 @@ -5966,7 +5642,7 @@ snapshots: '@aws-crypto/supports-web-crypto': 5.2.0 '@aws-crypto/util': 5.2.0 '@aws-sdk/types': 3.973.8 - '@aws-sdk/util-locate-window': 3.965.4 + '@aws-sdk/util-locate-window': 3.965.5 '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 @@ -5986,27 +5662,27 @@ snapshots: '@smithy/util-utf8': 2.3.0 tslib: 2.8.1 - '@aws-sdk/client-bedrock-runtime@3.1035.0': + '@aws-sdk/client-bedrock-runtime@3.1040.0': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.974.4 - '@aws-sdk/credential-provider-node': 3.972.35 + '@aws-sdk/core': 3.974.7 + '@aws-sdk/credential-provider-node': 3.972.38 '@aws-sdk/eventstream-handler-node': 3.972.14 '@aws-sdk/middleware-eventstream': 3.972.10 '@aws-sdk/middleware-host-header': 3.972.10 '@aws-sdk/middleware-logger': 3.972.10 '@aws-sdk/middleware-recursion-detection': 3.972.11 - '@aws-sdk/middleware-user-agent': 3.972.34 + '@aws-sdk/middleware-user-agent': 3.972.37 '@aws-sdk/middleware-websocket': 3.972.16 '@aws-sdk/region-config-resolver': 3.972.13 - '@aws-sdk/token-providers': 3.1035.0 + '@aws-sdk/token-providers': 3.1040.0 '@aws-sdk/types': 3.973.8 '@aws-sdk/util-endpoints': 3.996.8 '@aws-sdk/util-user-agent-browser': 3.972.10 - '@aws-sdk/util-user-agent-node': 3.973.20 + '@aws-sdk/util-user-agent-node': 3.973.23 '@smithy/config-resolver': 4.4.17 - '@smithy/core': 3.23.16 + '@smithy/core': 3.23.17 '@smithy/eventstream-serde-browser': 4.2.14 '@smithy/eventstream-serde-config-resolver': 4.3.14 '@smithy/eventstream-serde-node': 4.2.14 @@ -6014,78 +5690,78 @@ snapshots: '@smithy/hash-node': 4.2.14 '@smithy/invalid-dependency': 4.2.14 '@smithy/middleware-content-length': 4.2.14 - '@smithy/middleware-endpoint': 4.4.31 - '@smithy/middleware-retry': 4.5.4 - '@smithy/middleware-serde': 4.2.19 + '@smithy/middleware-endpoint': 4.4.32 + '@smithy/middleware-retry': 4.5.7 + '@smithy/middleware-serde': 4.2.20 '@smithy/middleware-stack': 4.2.14 '@smithy/node-config-provider': 4.3.14 - '@smithy/node-http-handler': 4.6.0 + '@smithy/node-http-handler': 4.6.1 '@smithy/protocol-http': 5.3.14 - '@smithy/smithy-client': 4.12.12 + '@smithy/smithy-client': 4.12.13 '@smithy/types': 4.14.1 '@smithy/url-parser': 4.2.14 '@smithy/util-base64': 4.3.2 '@smithy/util-body-length-browser': 4.2.2 '@smithy/util-body-length-node': 4.2.3 - '@smithy/util-defaults-mode-browser': 4.3.48 - '@smithy/util-defaults-mode-node': 4.2.53 + '@smithy/util-defaults-mode-browser': 4.3.49 + '@smithy/util-defaults-mode-node': 4.2.54 '@smithy/util-endpoints': 3.4.2 '@smithy/util-middleware': 4.2.14 - '@smithy/util-retry': 4.3.3 - '@smithy/util-stream': 4.5.24 + '@smithy/util-retry': 4.3.6 + '@smithy/util-stream': 4.5.25 '@smithy/util-utf8': 4.2.2 tslib: 2.8.1 transitivePeerDependencies: - aws-crt - '@aws-sdk/core@3.974.4': + '@aws-sdk/core@3.974.7': dependencies: '@aws-sdk/types': 3.973.8 - '@aws-sdk/xml-builder': 3.972.18 - '@smithy/core': 3.23.16 + '@aws-sdk/xml-builder': 3.972.22 + '@smithy/core': 3.23.17 '@smithy/node-config-provider': 4.3.14 '@smithy/property-provider': 4.2.14 '@smithy/protocol-http': 5.3.14 '@smithy/signature-v4': 5.3.14 - '@smithy/smithy-client': 4.12.12 + '@smithy/smithy-client': 4.12.13 '@smithy/types': 4.14.1 '@smithy/util-base64': 4.3.2 '@smithy/util-middleware': 4.2.14 - '@smithy/util-retry': 4.3.3 + '@smithy/util-retry': 4.3.6 '@smithy/util-utf8': 4.2.2 tslib: 2.8.1 - '@aws-sdk/credential-provider-env@3.972.30': + '@aws-sdk/credential-provider-env@3.972.33': dependencies: - '@aws-sdk/core': 3.974.4 + '@aws-sdk/core': 3.974.7 '@aws-sdk/types': 3.973.8 '@smithy/property-provider': 4.2.14 '@smithy/types': 4.14.1 tslib: 2.8.1 - '@aws-sdk/credential-provider-http@3.972.32': + '@aws-sdk/credential-provider-http@3.972.35': dependencies: - '@aws-sdk/core': 3.974.4 + '@aws-sdk/core': 3.974.7 '@aws-sdk/types': 3.973.8 '@smithy/fetch-http-handler': 5.3.17 - '@smithy/node-http-handler': 4.6.0 + '@smithy/node-http-handler': 4.6.1 '@smithy/property-provider': 4.2.14 '@smithy/protocol-http': 5.3.14 - '@smithy/smithy-client': 4.12.12 + '@smithy/smithy-client': 4.12.13 '@smithy/types': 4.14.1 - '@smithy/util-stream': 4.5.24 + '@smithy/util-stream': 4.5.25 tslib: 2.8.1 - '@aws-sdk/credential-provider-ini@3.972.34': + '@aws-sdk/credential-provider-ini@3.972.37': dependencies: - '@aws-sdk/core': 3.974.4 - '@aws-sdk/credential-provider-env': 3.972.30 - '@aws-sdk/credential-provider-http': 3.972.32 - '@aws-sdk/credential-provider-login': 3.972.34 - '@aws-sdk/credential-provider-process': 3.972.30 - '@aws-sdk/credential-provider-sso': 3.972.34 - '@aws-sdk/credential-provider-web-identity': 3.972.34 - '@aws-sdk/nested-clients': 3.997.2 + '@aws-sdk/core': 3.974.7 + '@aws-sdk/credential-provider-env': 3.972.33 + '@aws-sdk/credential-provider-http': 3.972.35 + '@aws-sdk/credential-provider-login': 3.972.37 + '@aws-sdk/credential-provider-process': 3.972.33 + '@aws-sdk/credential-provider-sso': 3.972.37 + '@aws-sdk/credential-provider-web-identity': 3.972.37 + '@aws-sdk/nested-clients': 3.997.5 '@aws-sdk/types': 3.973.8 '@smithy/credential-provider-imds': 4.2.14 '@smithy/property-provider': 4.2.14 @@ -6095,10 +5771,10 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-provider-login@3.972.34': + '@aws-sdk/credential-provider-login@3.972.37': dependencies: - '@aws-sdk/core': 3.974.4 - '@aws-sdk/nested-clients': 3.997.2 + '@aws-sdk/core': 3.974.7 + '@aws-sdk/nested-clients': 3.997.5 '@aws-sdk/types': 3.973.8 '@smithy/property-provider': 4.2.14 '@smithy/protocol-http': 5.3.14 @@ -6108,14 +5784,14 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-provider-node@3.972.35': + '@aws-sdk/credential-provider-node@3.972.38': dependencies: - '@aws-sdk/credential-provider-env': 3.972.30 - '@aws-sdk/credential-provider-http': 3.972.32 - '@aws-sdk/credential-provider-ini': 3.972.34 - '@aws-sdk/credential-provider-process': 3.972.30 - '@aws-sdk/credential-provider-sso': 3.972.34 - '@aws-sdk/credential-provider-web-identity': 3.972.34 + '@aws-sdk/credential-provider-env': 3.972.33 + '@aws-sdk/credential-provider-http': 3.972.35 + '@aws-sdk/credential-provider-ini': 3.972.37 + '@aws-sdk/credential-provider-process': 3.972.33 + '@aws-sdk/credential-provider-sso': 3.972.37 + '@aws-sdk/credential-provider-web-identity': 3.972.37 '@aws-sdk/types': 3.973.8 '@smithy/credential-provider-imds': 4.2.14 '@smithy/property-provider': 4.2.14 @@ -6125,20 +5801,20 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-provider-process@3.972.30': + '@aws-sdk/credential-provider-process@3.972.33': dependencies: - '@aws-sdk/core': 3.974.4 + '@aws-sdk/core': 3.974.7 '@aws-sdk/types': 3.973.8 '@smithy/property-provider': 4.2.14 '@smithy/shared-ini-file-loader': 4.4.9 '@smithy/types': 4.14.1 tslib: 2.8.1 - '@aws-sdk/credential-provider-sso@3.972.34': + '@aws-sdk/credential-provider-sso@3.972.37': dependencies: - '@aws-sdk/core': 3.974.4 - '@aws-sdk/nested-clients': 3.997.2 - '@aws-sdk/token-providers': 3.1035.0 + '@aws-sdk/core': 3.974.7 + '@aws-sdk/nested-clients': 3.997.5 + '@aws-sdk/token-providers': 3.1039.0 '@aws-sdk/types': 3.973.8 '@smithy/property-provider': 4.2.14 '@smithy/shared-ini-file-loader': 4.4.9 @@ -6147,10 +5823,10 @@ snapshots: transitivePeerDependencies: - aws-crt - '@aws-sdk/credential-provider-web-identity@3.972.34': + '@aws-sdk/credential-provider-web-identity@3.972.37': dependencies: - '@aws-sdk/core': 3.974.4 - '@aws-sdk/nested-clients': 3.997.2 + '@aws-sdk/core': 3.974.7 + '@aws-sdk/nested-clients': 3.997.5 '@aws-sdk/types': 3.973.8 '@smithy/property-provider': 4.2.14 '@smithy/shared-ini-file-loader': 4.4.9 @@ -6189,37 +5865,37 @@ snapshots: '@aws-sdk/middleware-recursion-detection@3.972.11': dependencies: '@aws-sdk/types': 3.973.8 - '@aws/lambda-invoke-store': 0.2.3 + '@aws/lambda-invoke-store': 0.2.4 '@smithy/protocol-http': 5.3.14 '@smithy/types': 4.14.1 tslib: 2.8.1 - '@aws-sdk/middleware-sdk-s3@3.972.33': + '@aws-sdk/middleware-sdk-s3@3.972.36': dependencies: - '@aws-sdk/core': 3.974.4 + '@aws-sdk/core': 3.974.7 '@aws-sdk/types': 3.973.8 '@aws-sdk/util-arn-parser': 3.972.3 - '@smithy/core': 3.23.16 + '@smithy/core': 3.23.17 '@smithy/node-config-provider': 4.3.14 '@smithy/protocol-http': 5.3.14 '@smithy/signature-v4': 5.3.14 - '@smithy/smithy-client': 4.12.12 + '@smithy/smithy-client': 4.12.13 '@smithy/types': 4.14.1 '@smithy/util-config-provider': 4.2.2 '@smithy/util-middleware': 4.2.14 - '@smithy/util-stream': 4.5.24 + '@smithy/util-stream': 4.5.25 '@smithy/util-utf8': 4.2.2 tslib: 2.8.1 - '@aws-sdk/middleware-user-agent@3.972.34': + '@aws-sdk/middleware-user-agent@3.972.37': dependencies: - '@aws-sdk/core': 3.974.4 + '@aws-sdk/core': 3.974.7 '@aws-sdk/types': 3.973.8 '@aws-sdk/util-endpoints': 3.996.8 - '@smithy/core': 3.23.16 + '@smithy/core': 3.23.17 '@smithy/protocol-http': 5.3.14 '@smithy/types': 4.14.1 - '@smithy/util-retry': 4.3.3 + '@smithy/util-retry': 4.3.6 tslib: 2.8.1 '@aws-sdk/middleware-websocket@3.972.16': @@ -6237,45 +5913,45 @@ snapshots: '@smithy/util-utf8': 4.2.2 tslib: 2.8.1 - '@aws-sdk/nested-clients@3.997.2': + '@aws-sdk/nested-clients@3.997.5': dependencies: '@aws-crypto/sha256-browser': 5.2.0 '@aws-crypto/sha256-js': 5.2.0 - '@aws-sdk/core': 3.974.4 + '@aws-sdk/core': 3.974.7 '@aws-sdk/middleware-host-header': 3.972.10 '@aws-sdk/middleware-logger': 3.972.10 '@aws-sdk/middleware-recursion-detection': 3.972.11 - '@aws-sdk/middleware-user-agent': 3.972.34 + '@aws-sdk/middleware-user-agent': 3.972.37 '@aws-sdk/region-config-resolver': 3.972.13 - '@aws-sdk/signature-v4-multi-region': 3.996.21 + '@aws-sdk/signature-v4-multi-region': 3.996.24 '@aws-sdk/types': 3.973.8 '@aws-sdk/util-endpoints': 3.996.8 '@aws-sdk/util-user-agent-browser': 3.972.10 - '@aws-sdk/util-user-agent-node': 3.973.20 + '@aws-sdk/util-user-agent-node': 3.973.23 '@smithy/config-resolver': 4.4.17 - '@smithy/core': 3.23.16 + '@smithy/core': 3.23.17 '@smithy/fetch-http-handler': 5.3.17 '@smithy/hash-node': 4.2.14 '@smithy/invalid-dependency': 4.2.14 '@smithy/middleware-content-length': 4.2.14 - '@smithy/middleware-endpoint': 4.4.31 - '@smithy/middleware-retry': 4.5.4 - '@smithy/middleware-serde': 4.2.19 + '@smithy/middleware-endpoint': 4.4.32 + '@smithy/middleware-retry': 4.5.7 + '@smithy/middleware-serde': 4.2.20 '@smithy/middleware-stack': 4.2.14 '@smithy/node-config-provider': 4.3.14 - '@smithy/node-http-handler': 4.6.0 + '@smithy/node-http-handler': 4.6.1 '@smithy/protocol-http': 5.3.14 - '@smithy/smithy-client': 4.12.12 + '@smithy/smithy-client': 4.12.13 '@smithy/types': 4.14.1 '@smithy/url-parser': 4.2.14 '@smithy/util-base64': 4.3.2 '@smithy/util-body-length-browser': 4.2.2 '@smithy/util-body-length-node': 4.2.3 - '@smithy/util-defaults-mode-browser': 4.3.48 - '@smithy/util-defaults-mode-node': 4.2.53 + '@smithy/util-defaults-mode-browser': 4.3.49 + '@smithy/util-defaults-mode-node': 4.2.54 '@smithy/util-endpoints': 3.4.2 '@smithy/util-middleware': 4.2.14 - '@smithy/util-retry': 4.3.3 + '@smithy/util-retry': 4.3.6 '@smithy/util-utf8': 4.2.2 tslib: 2.8.1 transitivePeerDependencies: @@ -6289,19 +5965,31 @@ snapshots: '@smithy/types': 4.14.1 tslib: 2.8.1 - '@aws-sdk/signature-v4-multi-region@3.996.21': + '@aws-sdk/signature-v4-multi-region@3.996.24': dependencies: - '@aws-sdk/middleware-sdk-s3': 3.972.33 + '@aws-sdk/middleware-sdk-s3': 3.972.36 '@aws-sdk/types': 3.973.8 '@smithy/protocol-http': 5.3.14 '@smithy/signature-v4': 5.3.14 '@smithy/types': 4.14.1 tslib: 2.8.1 - '@aws-sdk/token-providers@3.1035.0': + '@aws-sdk/token-providers@3.1039.0': dependencies: - '@aws-sdk/core': 3.974.4 - '@aws-sdk/nested-clients': 3.997.2 + '@aws-sdk/core': 3.974.7 + '@aws-sdk/nested-clients': 3.997.5 + '@aws-sdk/types': 3.973.8 + '@smithy/property-provider': 4.2.14 + '@smithy/shared-ini-file-loader': 4.4.9 + '@smithy/types': 4.14.1 + tslib: 2.8.1 + transitivePeerDependencies: + - aws-crt + + '@aws-sdk/token-providers@3.1040.0': + dependencies: + '@aws-sdk/core': 3.974.7 + '@aws-sdk/nested-clients': 3.997.5 '@aws-sdk/types': 3.973.8 '@smithy/property-provider': 4.2.14 '@smithy/shared-ini-file-loader': 4.4.9 @@ -6334,7 +6022,7 @@ snapshots: '@smithy/types': 4.14.1 tslib: 2.8.1 - '@aws-sdk/util-locate-window@3.965.4': + '@aws-sdk/util-locate-window@3.965.5': dependencies: tslib: 2.8.1 @@ -6345,22 +6033,23 @@ snapshots: bowser: 2.14.1 tslib: 2.8.1 - '@aws-sdk/util-user-agent-node@3.973.20': + '@aws-sdk/util-user-agent-node@3.973.23': dependencies: - '@aws-sdk/middleware-user-agent': 3.972.34 + '@aws-sdk/middleware-user-agent': 3.972.37 '@aws-sdk/types': 3.973.8 '@smithy/node-config-provider': 4.3.14 '@smithy/types': 4.14.1 '@smithy/util-config-provider': 4.2.2 tslib: 2.8.1 - '@aws-sdk/xml-builder@3.972.18': + '@aws-sdk/xml-builder@3.972.22': dependencies: + '@nodable/entities': 2.1.0 '@smithy/types': 4.14.1 - fast-xml-parser: 5.5.8 + fast-xml-parser: 5.7.2 tslib: 2.8.1 - '@aws/lambda-invoke-store@0.2.3': {} + '@aws/lambda-invoke-store@0.2.4': {} '@babel/code-frame@7.29.0': dependencies: @@ -6370,140 +6059,140 @@ snapshots: '@babel/helper-validator-identifier@7.28.5': {} - '@babel/runtime@7.28.6': {} + '@babel/runtime@7.29.2': {} - '@biomejs/biome@2.4.10': + '@biomejs/biome@2.4.13': optionalDependencies: - '@biomejs/cli-darwin-arm64': 2.4.10 - '@biomejs/cli-darwin-x64': 2.4.10 - '@biomejs/cli-linux-arm64': 2.4.10 - '@biomejs/cli-linux-arm64-musl': 2.4.10 - '@biomejs/cli-linux-x64': 2.4.10 - '@biomejs/cli-linux-x64-musl': 2.4.10 - '@biomejs/cli-win32-arm64': 2.4.10 - '@biomejs/cli-win32-x64': 2.4.10 - - '@biomejs/cli-darwin-arm64@2.4.10': + '@biomejs/cli-darwin-arm64': 2.4.13 + '@biomejs/cli-darwin-x64': 2.4.13 + '@biomejs/cli-linux-arm64': 2.4.13 + '@biomejs/cli-linux-arm64-musl': 2.4.13 + '@biomejs/cli-linux-x64': 2.4.13 + '@biomejs/cli-linux-x64-musl': 2.4.13 + '@biomejs/cli-win32-arm64': 2.4.13 + '@biomejs/cli-win32-x64': 2.4.13 + + '@biomejs/cli-darwin-arm64@2.4.13': optional: true - '@biomejs/cli-darwin-x64@2.4.10': + '@biomejs/cli-darwin-x64@2.4.13': optional: true - '@biomejs/cli-linux-arm64-musl@2.4.10': + '@biomejs/cli-linux-arm64-musl@2.4.13': optional: true - '@biomejs/cli-linux-arm64@2.4.10': + '@biomejs/cli-linux-arm64@2.4.13': optional: true - '@biomejs/cli-linux-x64-musl@2.4.10': + '@biomejs/cli-linux-x64-musl@2.4.13': optional: true - '@biomejs/cli-linux-x64@2.4.10': + '@biomejs/cli-linux-x64@2.4.13': optional: true - '@biomejs/cli-win32-arm64@2.4.10': + '@biomejs/cli-win32-arm64@2.4.13': optional: true - '@biomejs/cli-win32-x64@2.4.10': + '@biomejs/cli-win32-x64@2.4.13': optional: true - '@borewit/text-codec@0.2.1': {} + '@borewit/text-codec@0.2.2': {} '@canvas/image-data@1.1.0': {} - '@clack/core@1.2.0': + '@clack/core@1.3.0': dependencies: - fast-wrap-ansi: 0.1.6 + fast-wrap-ansi: 0.2.0 sisteransi: 1.0.5 - '@clack/prompts@1.2.0': + '@clack/prompts@1.3.0': dependencies: - '@clack/core': 1.2.0 - fast-string-width: 1.1.0 - fast-wrap-ansi: 0.1.6 + '@clack/core': 1.3.0 + fast-string-width: 3.0.2 + fast-wrap-ansi: 0.2.0 sisteransi: 1.0.5 - '@emnapi/runtime@1.8.1': + '@emnapi/runtime@1.10.0': dependencies: tslib: 2.8.1 optional: true - '@esbuild/aix-ppc64@0.27.3': + '@esbuild/aix-ppc64@0.27.7': optional: true - '@esbuild/android-arm64@0.27.3': + '@esbuild/android-arm64@0.27.7': optional: true - '@esbuild/android-arm@0.27.3': + '@esbuild/android-arm@0.27.7': optional: true - '@esbuild/android-x64@0.27.3': + '@esbuild/android-x64@0.27.7': optional: true - '@esbuild/darwin-arm64@0.27.3': + '@esbuild/darwin-arm64@0.27.7': optional: true - '@esbuild/darwin-x64@0.27.3': + '@esbuild/darwin-x64@0.27.7': optional: true - '@esbuild/freebsd-arm64@0.27.3': + '@esbuild/freebsd-arm64@0.27.7': optional: true - '@esbuild/freebsd-x64@0.27.3': + '@esbuild/freebsd-x64@0.27.7': optional: true - '@esbuild/linux-arm64@0.27.3': + '@esbuild/linux-arm64@0.27.7': optional: true - '@esbuild/linux-arm@0.27.3': + '@esbuild/linux-arm@0.27.7': optional: true - '@esbuild/linux-ia32@0.27.3': + '@esbuild/linux-ia32@0.27.7': optional: true - '@esbuild/linux-loong64@0.27.3': + '@esbuild/linux-loong64@0.27.7': optional: true - '@esbuild/linux-mips64el@0.27.3': + '@esbuild/linux-mips64el@0.27.7': optional: true - '@esbuild/linux-ppc64@0.27.3': + '@esbuild/linux-ppc64@0.27.7': optional: true - '@esbuild/linux-riscv64@0.27.3': + '@esbuild/linux-riscv64@0.27.7': optional: true - '@esbuild/linux-s390x@0.27.3': + '@esbuild/linux-s390x@0.27.7': optional: true - '@esbuild/linux-x64@0.27.3': + '@esbuild/linux-x64@0.27.7': optional: true - '@esbuild/netbsd-arm64@0.27.3': + '@esbuild/netbsd-arm64@0.27.7': optional: true - '@esbuild/netbsd-x64@0.27.3': + '@esbuild/netbsd-x64@0.27.7': optional: true - '@esbuild/openbsd-arm64@0.27.3': + '@esbuild/openbsd-arm64@0.27.7': optional: true - '@esbuild/openbsd-x64@0.27.3': + '@esbuild/openbsd-x64@0.27.7': optional: true - '@esbuild/openharmony-arm64@0.27.3': + '@esbuild/openharmony-arm64@0.27.7': optional: true - '@esbuild/sunos-x64@0.27.3': + '@esbuild/sunos-x64@0.27.7': optional: true - '@esbuild/win32-arm64@0.27.3': + '@esbuild/win32-arm64@0.27.7': optional: true - '@esbuild/win32-ia32@0.27.3': + '@esbuild/win32-ia32@0.27.7': optional: true - '@esbuild/win32-x64@0.27.3': + '@esbuild/win32-x64@0.27.7': optional: true '@floating-ui/core@1.7.5': @@ -6523,11 +6212,11 @@ snapshots: '@floating-ui/utils@0.2.11': {} - '@google/genai@1.49.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))': + '@google/genai@1.51.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))': dependencies: google-auth-library: 10.6.2 p-retry: 4.6.2 - protobufjs: 7.5.4 + protobufjs: 7.5.6 ws: 8.20.0 optionalDependencies: '@modelcontextprotocol/sdk': 1.29.0(zod@4.3.6) @@ -6536,314 +6225,209 @@ snapshots: - supports-color - utf-8-validate - '@homebridge/ciao@1.3.6': - dependencies: - debug: 4.4.3 - fast-deep-equal: 3.1.3 - source-map-support: 0.5.21 - tslib: 2.8.1 - transitivePeerDependencies: - - supports-color - - '@hono/node-server@1.19.13(hono@4.12.12)': + '@hono/node-server@1.19.14(hono@4.12.16)': dependencies: - hono: 4.12.12 - - '@img/colour@1.1.0': {} + hono: 4.12.16 '@img/sharp-darwin-arm64@0.33.5': optionalDependencies: '@img/sharp-libvips-darwin-arm64': 1.0.4 optional: true - '@img/sharp-darwin-arm64@0.34.5': - optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.2.4 - optional: true - '@img/sharp-darwin-x64@0.33.5': optionalDependencies: '@img/sharp-libvips-darwin-x64': 1.0.4 optional: true - '@img/sharp-darwin-x64@0.34.5': - optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.2.4 - optional: true - '@img/sharp-libvips-darwin-arm64@1.0.4': optional: true - '@img/sharp-libvips-darwin-arm64@1.2.4': - optional: true - '@img/sharp-libvips-darwin-x64@1.0.4': optional: true - '@img/sharp-libvips-darwin-x64@1.2.4': - optional: true - '@img/sharp-libvips-linux-arm64@1.0.4': optional: true - '@img/sharp-libvips-linux-arm64@1.2.4': - optional: true - '@img/sharp-libvips-linux-arm@1.0.5': optional: true - '@img/sharp-libvips-linux-arm@1.2.4': - optional: true - - '@img/sharp-libvips-linux-ppc64@1.2.4': - optional: true - - '@img/sharp-libvips-linux-riscv64@1.2.4': - optional: true - '@img/sharp-libvips-linux-s390x@1.0.4': optional: true - '@img/sharp-libvips-linux-s390x@1.2.4': - optional: true - '@img/sharp-libvips-linux-x64@1.0.4': optional: true - '@img/sharp-libvips-linux-x64@1.2.4': - optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.0.4': optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.2.4': - optional: true - '@img/sharp-libvips-linuxmusl-x64@1.0.4': optional: true - '@img/sharp-libvips-linuxmusl-x64@1.2.4': - optional: true - '@img/sharp-linux-arm64@0.33.5': optionalDependencies: '@img/sharp-libvips-linux-arm64': 1.0.4 optional: true - '@img/sharp-linux-arm64@0.34.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.2.4 - optional: true - '@img/sharp-linux-arm@0.33.5': optionalDependencies: '@img/sharp-libvips-linux-arm': 1.0.5 optional: true - '@img/sharp-linux-arm@0.34.5': - optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.2.4 - optional: true - - '@img/sharp-linux-ppc64@0.34.5': - optionalDependencies: - '@img/sharp-libvips-linux-ppc64': 1.2.4 - optional: true - - '@img/sharp-linux-riscv64@0.34.5': - optionalDependencies: - '@img/sharp-libvips-linux-riscv64': 1.2.4 - optional: true - '@img/sharp-linux-s390x@0.33.5': optionalDependencies: '@img/sharp-libvips-linux-s390x': 1.0.4 optional: true - '@img/sharp-linux-s390x@0.34.5': - optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.2.4 - optional: true - '@img/sharp-linux-x64@0.33.5': optionalDependencies: '@img/sharp-libvips-linux-x64': 1.0.4 optional: true - '@img/sharp-linux-x64@0.34.5': - optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.2.4 - optional: true - '@img/sharp-linuxmusl-arm64@0.33.5': optionalDependencies: '@img/sharp-libvips-linuxmusl-arm64': 1.0.4 optional: true - '@img/sharp-linuxmusl-arm64@0.34.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 - optional: true - '@img/sharp-linuxmusl-x64@0.33.5': optionalDependencies: '@img/sharp-libvips-linuxmusl-x64': 1.0.4 optional: true - '@img/sharp-linuxmusl-x64@0.34.5': - optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.2.4 - optional: true - '@img/sharp-wasm32@0.33.5': dependencies: - '@emnapi/runtime': 1.8.1 - optional: true - - '@img/sharp-wasm32@0.34.5': - dependencies: - '@emnapi/runtime': 1.8.1 - optional: true - - '@img/sharp-win32-arm64@0.34.5': + '@emnapi/runtime': 1.10.0 optional: true '@img/sharp-win32-ia32@0.33.5': optional: true - '@img/sharp-win32-ia32@0.34.5': - optional: true - '@img/sharp-win32-x64@0.33.5': optional: true - '@img/sharp-win32-x64@0.34.5': - optional: true - '@inquirer/ansi@1.0.2': {} - '@inquirer/checkbox@4.3.2(@types/node@25.5.2)': + '@inquirer/checkbox@4.3.2(@types/node@25.6.0)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/type': 3.0.10(@types/node@25.6.0) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/confirm@5.1.21(@types/node@25.5.2)': + '@inquirer/confirm@5.1.21(@types/node@25.6.0)': dependencies: - '@inquirer/core': 10.3.2(@types/node@25.5.2) - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) + '@inquirer/type': 3.0.10(@types/node@25.6.0) optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/core@10.3.2(@types/node@25.5.2)': + '@inquirer/core@10.3.2(@types/node@25.6.0)': dependencies: '@inquirer/ansi': 1.0.2 '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/type': 3.0.10(@types/node@25.6.0) cli-width: 4.1.0 mute-stream: 2.0.0 signal-exit: 4.1.0 wrap-ansi: 6.2.0 yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/editor@4.2.23(@types/node@25.5.2)': + '@inquirer/editor@4.2.23(@types/node@25.6.0)': dependencies: - '@inquirer/core': 10.3.2(@types/node@25.5.2) - '@inquirer/external-editor': 1.0.3(@types/node@25.5.2) - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) + '@inquirer/external-editor': 1.0.3(@types/node@25.6.0) + '@inquirer/type': 3.0.10(@types/node@25.6.0) optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/expand@4.0.23(@types/node@25.5.2)': + '@inquirer/expand@4.0.23(@types/node@25.6.0)': dependencies: - '@inquirer/core': 10.3.2(@types/node@25.5.2) - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) + '@inquirer/type': 3.0.10(@types/node@25.6.0) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/external-editor@1.0.3(@types/node@25.5.2)': + '@inquirer/external-editor@1.0.3(@types/node@25.6.0)': dependencies: chardet: 2.1.1 iconv-lite: 0.7.2 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 '@inquirer/figures@1.0.15': {} - '@inquirer/input@4.3.1(@types/node@25.5.2)': + '@inquirer/input@4.3.1(@types/node@25.6.0)': dependencies: - '@inquirer/core': 10.3.2(@types/node@25.5.2) - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) + '@inquirer/type': 3.0.10(@types/node@25.6.0) optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/number@3.0.23(@types/node@25.5.2)': + '@inquirer/number@3.0.23(@types/node@25.6.0)': dependencies: - '@inquirer/core': 10.3.2(@types/node@25.5.2) - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) + '@inquirer/type': 3.0.10(@types/node@25.6.0) optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/password@4.0.23(@types/node@25.5.2)': + '@inquirer/password@4.0.23(@types/node@25.6.0)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@25.5.2) - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) + '@inquirer/type': 3.0.10(@types/node@25.6.0) optionalDependencies: - '@types/node': 25.5.2 - - '@inquirer/prompts@7.9.0(@types/node@25.5.2)': - dependencies: - '@inquirer/checkbox': 4.3.2(@types/node@25.5.2) - '@inquirer/confirm': 5.1.21(@types/node@25.5.2) - '@inquirer/editor': 4.2.23(@types/node@25.5.2) - '@inquirer/expand': 4.0.23(@types/node@25.5.2) - '@inquirer/input': 4.3.1(@types/node@25.5.2) - '@inquirer/number': 3.0.23(@types/node@25.5.2) - '@inquirer/password': 4.0.23(@types/node@25.5.2) - '@inquirer/rawlist': 4.1.11(@types/node@25.5.2) - '@inquirer/search': 3.2.2(@types/node@25.5.2) - '@inquirer/select': 4.4.2(@types/node@25.5.2) + '@types/node': 25.6.0 + + '@inquirer/prompts@7.9.0(@types/node@25.6.0)': + dependencies: + '@inquirer/checkbox': 4.3.2(@types/node@25.6.0) + '@inquirer/confirm': 5.1.21(@types/node@25.6.0) + '@inquirer/editor': 4.2.23(@types/node@25.6.0) + '@inquirer/expand': 4.0.23(@types/node@25.6.0) + '@inquirer/input': 4.3.1(@types/node@25.6.0) + '@inquirer/number': 3.0.23(@types/node@25.6.0) + '@inquirer/password': 4.0.23(@types/node@25.6.0) + '@inquirer/rawlist': 4.1.11(@types/node@25.6.0) + '@inquirer/search': 3.2.2(@types/node@25.6.0) + '@inquirer/select': 4.4.2(@types/node@25.6.0) optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/rawlist@4.1.11(@types/node@25.5.2)': + '@inquirer/rawlist@4.1.11(@types/node@25.6.0)': dependencies: - '@inquirer/core': 10.3.2(@types/node@25.5.2) - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) + '@inquirer/type': 3.0.10(@types/node@25.6.0) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/search@3.2.2(@types/node@25.5.2)': + '@inquirer/search@3.2.2(@types/node@25.6.0)': dependencies: - '@inquirer/core': 10.3.2(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/type': 3.0.10(@types/node@25.6.0) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/select@4.4.2(@types/node@25.5.2)': + '@inquirer/select@4.4.2(@types/node@25.6.0)': dependencies: '@inquirer/ansi': 1.0.2 - '@inquirer/core': 10.3.2(@types/node@25.5.2) + '@inquirer/core': 10.3.2(@types/node@25.6.0) '@inquirer/figures': 1.0.15 - '@inquirer/type': 3.0.10(@types/node@25.5.2) + '@inquirer/type': 3.0.10(@types/node@25.6.0) yoctocolors-cjs: 2.1.3 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 - '@inquirer/type@3.0.10(@types/node@25.5.2)': + '@inquirer/type@3.0.10(@types/node@25.6.0)': optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 '@isaacs/fs-minipass@4.0.1': dependencies: @@ -6934,7 +6518,7 @@ snapshots: '@mariozechner/clipboard-win32-x64-msvc@0.3.2': optional: true - '@mariozechner/clipboard@0.3.2': + '@mariozechner/clipboard@0.3.5': optionalDependencies: '@mariozechner/clipboard-darwin-arm64': 0.3.2 '@mariozechner/clipboard-darwin-universal': 0.3.2 @@ -6953,10 +6537,10 @@ snapshots: std-env: 3.10.0 yoctocolors: 2.1.2 - '@mariozechner/pi-agent-core@0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': + '@mariozechner/pi-agent-core@0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': dependencies: - '@mariozechner/pi-ai': 0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) - typebox: 1.1.28 + '@mariozechner/pi-ai': 0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + typebox: 1.1.34 transitivePeerDependencies: - '@modelcontextprotocol/sdk' - aws-crt @@ -6966,19 +6550,19 @@ snapshots: - ws - zod - '@mariozechner/pi-ai@0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': + '@mariozechner/pi-ai@0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': dependencies: '@anthropic-ai/sdk': 0.90.0(zod@4.3.6) - '@aws-sdk/client-bedrock-runtime': 3.1035.0 - '@google/genai': 1.49.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6)) + '@aws-sdk/client-bedrock-runtime': 3.1040.0 + '@google/genai': 1.51.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6)) '@mistralai/mistralai': 2.2.1 chalk: 5.6.2 openai: 6.26.0(ws@8.20.0)(zod@4.3.6) partial-json: 0.1.7 proxy-agent: 6.5.0 - typebox: 1.1.28 - undici: 7.24.6 - zod-to-json-schema: 3.25.1(zod@4.3.6) + typebox: 1.1.34 + undici: 7.25.0 + zod-to-json-schema: 3.25.2(zod@4.3.6) transitivePeerDependencies: - '@modelcontextprotocol/sdk' - aws-crt @@ -6988,31 +6572,31 @@ snapshots: - ws - zod - '@mariozechner/pi-coding-agent@0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': + '@mariozechner/pi-coding-agent@0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6)': dependencies: '@mariozechner/jiti': 2.6.5 - '@mariozechner/pi-agent-core': 0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) - '@mariozechner/pi-ai': 0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) - '@mariozechner/pi-tui': 0.70.0 + '@mariozechner/pi-agent-core': 0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + '@mariozechner/pi-ai': 0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + '@mariozechner/pi-tui': 0.70.6 '@silvia-odwyer/photon-node': 0.3.4 chalk: 5.6.2 cli-highlight: 2.1.11 - diff: 8.0.3 + diff: 8.0.4 extract-zip: 2.0.1 file-type: 21.3.4 glob: 13.0.6 hosted-git-info: 9.0.2 ignore: 7.0.5 marked: 15.0.12 - minimatch: 10.2.4 + minimatch: 10.2.5 proper-lockfile: 4.1.2 strip-ansi: 7.2.0 - typebox: 1.1.28 - undici: 7.24.6 + typebox: 1.1.34 + undici: 7.25.0 uuid: 14.0.0 yaml: 2.8.3 optionalDependencies: - '@mariozechner/clipboard': 0.3.2 + '@mariozechner/clipboard': 0.3.5 transitivePeerDependencies: - '@modelcontextprotocol/sdk' - aws-crt @@ -7022,7 +6606,7 @@ snapshots: - ws - zod - '@mariozechner/pi-tui@0.70.0': + '@mariozechner/pi-tui@0.70.6': dependencies: '@types/mime-types': 2.1.4 chalk: 5.6.2 @@ -7030,7 +6614,7 @@ snapshots: marked: 15.0.12 mime-types: 3.0.2 optionalDependencies: - koffi: 2.15.1 + koffi: 2.16.1 '@mdx-js/mdx@3.1.1': dependencies: @@ -7050,14 +6634,14 @@ snapshots: recma-jsx: 1.0.1(acorn@8.16.0) recma-stringify: 1.0.0 rehype-recma: 1.0.0 - remark-mdx: 3.1.0 + remark-mdx: 3.1.1 remark-parse: 11.0.0 - remark-rehype: 11.1.1 + remark-rehype: 11.1.2 source-map: 0.7.6 unified: 11.0.5 unist-util-position-from-estree: 2.0.0 unist-util-stringify-position: 4.0.0 - unist-util-visit: 5.1.0 + unist-util-visit: 5.0.0 vfile: 6.0.3 transitivePeerDependencies: - supports-color @@ -7068,14 +6652,15 @@ snapshots: '@types/react': 19.2.14 react: 19.2.3 - '@mintlify/cli@4.0.1090(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/node@25.5.2)(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@5.9.3)(yaml@2.8.3)': + '@mintlify/cli@4.0.1146(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/node@25.6.0)(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@6.0.3)(yaml@2.8.3)': dependencies: - '@inquirer/prompts': 7.9.0(@types/node@25.5.2) - '@mintlify/common': 1.0.835(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/link-rot': 3.0.1010(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/prebuild': 1.0.977(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/previewing': 4.0.1038(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/validation': 0.1.653(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@inquirer/prompts': 7.9.0(@types/node@25.6.0) + '@mintlify/common': 1.0.876(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/link-rot': 3.0.1054(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/models': 0.0.303 + '@mintlify/prebuild': 1.0.1019(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/previewing': 4.0.1080(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/validation': 0.1.686(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) adm-zip: 0.5.16 chalk: 5.2.0 color: 4.2.3 @@ -7083,11 +6668,11 @@ snapshots: front-matter: 4.0.2 fs-extra: 11.2.0 ink: 6.3.0(@types/react@19.2.14)(react@19.2.3) - inquirer: 12.3.0(@types/node@25.5.2) + inquirer: 12.3.0(@types/node@25.6.0) js-yaml: 4.1.0 mdast-util-mdx-jsx: 3.2.0 open: 8.4.2 - openid-client: 6.8.2 + openid-client: 6.8.4 posthog-node: 5.17.2 react: 19.2.3 semver: 7.7.2 @@ -7115,13 +6700,13 @@ snapshots: - utf-8-validate - yaml - '@mintlify/common@1.0.661(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)': + '@mintlify/common@1.0.661(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)': dependencies: '@asyncapi/parser': 3.4.0 - '@mintlify/mdx': 3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@mintlify/mdx': 3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) '@mintlify/models': 0.0.255 '@mintlify/openapi-parser': 0.0.8 - '@mintlify/validation': 0.1.555(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@mintlify/validation': 0.1.555(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) '@sindresorhus/slugify': 2.2.0 '@types/mdast': 4.0.4 acorn: 8.11.2 @@ -7175,14 +6760,14 @@ snapshots: - ts-node - typescript - '@mintlify/common@1.0.835(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3)': + '@mintlify/common@1.0.876(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3)': dependencies: '@asyncapi/parser': 3.4.0 '@asyncapi/specs': 6.8.1 - '@mintlify/mdx': 3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) - '@mintlify/models': 0.0.287 + '@mintlify/mdx': 3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) + '@mintlify/models': 0.0.303 '@mintlify/openapi-parser': 0.0.8 - '@mintlify/validation': 0.1.653(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@mintlify/validation': 0.1.686(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) '@sindresorhus/slugify': 2.2.0 '@types/mdast': 4.0.4 acorn: 8.11.2 @@ -7197,7 +6782,7 @@ snapshots: hex-rgb: 5.0.0 ignore: 7.0.5 js-yaml: 4.1.0 - lodash: 4.17.21 + lodash: 4.18.1 mdast-util-from-markdown: 2.0.2 mdast-util-gfm: 3.0.0 mdast-util-mdx: 3.0.0 @@ -7239,13 +6824,14 @@ snapshots: - typescript - yaml - '@mintlify/link-rot@3.0.1010(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3)': + '@mintlify/link-rot@3.0.1054(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3)': dependencies: - '@mintlify/common': 1.0.835(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/prebuild': 1.0.977(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/previewing': 4.0.1038(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/scraping': 4.0.522(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) - '@mintlify/validation': 0.1.653(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@mintlify/common': 1.0.876(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/models': 0.0.303 + '@mintlify/prebuild': 1.0.1019(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/previewing': 4.0.1080(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/scraping': 4.0.522(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) + '@mintlify/validation': 0.1.686(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) fs-extra: 11.1.0 unist-util-visit: 4.1.2 transitivePeerDependencies: @@ -7267,27 +6853,27 @@ snapshots: - utf-8-validate - yaml - '@mintlify/mdx@3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)': + '@mintlify/mdx@3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)': dependencies: '@radix-ui/react-popover': 1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3) '@shikijs/transformers': 3.23.0 - '@shikijs/twoslash': 3.23.0(typescript@5.9.3) - arktype: 2.2.0 + '@shikijs/twoslash': 3.23.0(typescript@6.0.3) + arktype: 2.1.27 hast-util-to-string: 3.0.1 mdast-util-from-markdown: 2.0.3 mdast-util-gfm: 3.1.0 mdast-util-mdx-jsx: 3.2.0 mdast-util-to-hast: 13.2.1 - next-mdx-remote-client: 1.1.6(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(unified@11.0.5) + next-mdx-remote-client: 1.1.7(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(unified@11.0.5) react: 19.2.3 react-dom: 18.3.1(react@19.2.3) rehype-katex: 7.0.1 - remark-gfm: 4.0.0 + remark-gfm: 4.0.1 remark-math: 6.0.0 remark-smartypants: 3.0.2 shiki: 3.23.0 unified: 11.0.5 - unist-util-visit: 5.1.0 + unist-util-visit: 5.0.0 transitivePeerDependencies: - '@types/react' - supports-color @@ -7300,28 +6886,28 @@ snapshots: transitivePeerDependencies: - debug - '@mintlify/models@0.0.287': + '@mintlify/models@0.0.303': dependencies: - axios: 1.13.2 + axios: 1.15.0 openapi-types: 12.1.3 transitivePeerDependencies: - debug '@mintlify/openapi-parser@0.0.8': dependencies: - ajv: 8.18.0 - ajv-draft-04: 1.0.0(ajv@8.18.0) - ajv-formats: 3.0.1(ajv@8.18.0) + ajv: 8.20.0 + ajv-draft-04: 1.0.0(ajv@8.20.0) + ajv-formats: 3.0.1(ajv@8.20.0) jsonpointer: 5.0.1 leven: 4.1.0 yaml: 2.8.3 - '@mintlify/prebuild@1.0.977(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3)': + '@mintlify/prebuild@1.0.1019(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3)': dependencies: - '@mintlify/common': 1.0.835(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) + '@mintlify/common': 1.0.876(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) '@mintlify/openapi-parser': 0.0.8 - '@mintlify/scraping': 4.0.699(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/validation': 0.1.653(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@mintlify/scraping': 4.0.740(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/validation': 0.1.686(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) chalk: 5.3.0 favicons: 7.2.0 front-matter: 4.0.2 @@ -7349,16 +6935,16 @@ snapshots: - utf-8-validate - yaml - '@mintlify/previewing@4.0.1038(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@5.9.3)(yaml@2.8.3)': + '@mintlify/previewing@4.0.1080(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(typescript@6.0.3)(yaml@2.8.3)': dependencies: - '@mintlify/common': 1.0.835(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/prebuild': 1.0.977(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) - '@mintlify/validation': 0.1.653(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@mintlify/common': 1.0.876(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/prebuild': 1.0.1019(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) + '@mintlify/validation': 0.1.686(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) adm-zip: 0.5.16 better-opn: 3.0.2 chalk: 5.2.0 chokidar: 3.5.3 - express: 4.18.2 + express: 4.22.0 front-matter: 4.0.2 fs-extra: 11.1.0 got: 13.0.0 @@ -7368,7 +6954,7 @@ snapshots: js-yaml: 4.1.0 openapi-types: 12.1.3 react: 19.2.3 - socket.io: 4.7.2 + socket.io: 4.8.0 tar: 6.1.15 unist-util-visit: 4.1.2 yargs: 17.7.1 @@ -7389,16 +6975,16 @@ snapshots: - utf-8-validate - yaml - '@mintlify/scraping@4.0.522(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)': + '@mintlify/scraping@4.0.522(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)': dependencies: - '@mintlify/common': 1.0.661(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@mintlify/common': 1.0.661(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) '@mintlify/openapi-parser': 0.0.8 fs-extra: 11.1.1 hast-util-to-mdast: 10.1.0 js-yaml: 4.1.0 mdast-util-mdx-jsx: 3.1.3 neotraverse: 0.6.18 - puppeteer: 22.14.0(typescript@5.9.3) + puppeteer: 22.14.0(typescript@6.0.3) rehype-parse: 9.0.1 remark-gfm: 4.0.0 remark-mdx: 3.0.1 @@ -7424,16 +7010,16 @@ snapshots: - typescript - utf-8-validate - '@mintlify/scraping@4.0.699(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3)': + '@mintlify/scraping@4.0.740(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3)': dependencies: - '@mintlify/common': 1.0.835(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)(yaml@2.8.3) + '@mintlify/common': 1.0.876(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)(yaml@2.8.3) '@mintlify/openapi-parser': 0.0.8 fs-extra: 11.1.1 hast-util-to-mdast: 10.1.0 js-yaml: 4.1.0 mdast-util-mdx-jsx: 3.1.3 neotraverse: 0.6.18 - puppeteer: 22.14.0(typescript@5.9.3) + puppeteer: 22.14.0(typescript@6.0.3) rehype-parse: 9.0.1 remark-gfm: 4.0.0 remark-mdx: 3.0.1 @@ -7460,9 +7046,9 @@ snapshots: - utf-8-validate - yaml - '@mintlify/validation@0.1.555(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)': + '@mintlify/validation@0.1.555(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)': dependencies: - '@mintlify/mdx': 3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) + '@mintlify/mdx': 3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) '@mintlify/models': 0.0.255 arktype: 2.1.27 js-yaml: 4.1.0 @@ -7482,14 +7068,14 @@ snapshots: - supports-color - typescript - '@mintlify/validation@0.1.653(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3)': + '@mintlify/validation@0.1.686(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3)': dependencies: - '@mintlify/mdx': 3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@5.9.3) - '@mintlify/models': 0.0.287 + '@mintlify/mdx': 3.0.4(@radix-ui/react-popover@1.1.15(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3))(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(typescript@6.0.3) + '@mintlify/models': 0.0.303 arktype: 2.1.27 js-yaml: 4.1.0 lcm: 0.0.3 - lodash: 4.17.21 + lodash: 4.18.1 neotraverse: 0.6.18 object-hash: 3.0.0 openapi-types: 12.1.3 @@ -7509,81 +7095,34 @@ snapshots: dependencies: ws: 8.20.0 zod: 4.3.6 - zod-to-json-schema: 3.25.1(zod@4.3.6) + zod-to-json-schema: 3.25.2(zod@4.3.6) transitivePeerDependencies: - bufferutil - utf-8-validate '@modelcontextprotocol/sdk@1.29.0(zod@4.3.6)': dependencies: - '@hono/node-server': 1.19.13(hono@4.12.12) - ajv: 8.18.0 - ajv-formats: 3.0.1(ajv@8.18.0) + '@hono/node-server': 1.19.14(hono@4.12.16) + ajv: 8.20.0 + ajv-formats: 3.0.1(ajv@8.20.0) content-type: 1.0.5 cors: 2.8.6 cross-spawn: 7.0.6 eventsource: 3.0.7 - eventsource-parser: 3.0.6 + eventsource-parser: 3.0.8 express: 5.2.1 - express-rate-limit: 8.3.1(express@5.2.1) - hono: 4.12.12 - jose: 6.2.2 + express-rate-limit: 8.4.1(express@5.2.1) + hono: 4.12.16 + jose: 6.2.3 json-schema-typed: 8.0.2 pkce-challenge: 5.0.1 raw-body: 3.0.2 zod: 4.3.6 - zod-to-json-schema: 3.25.1(zod@4.3.6) + zod-to-json-schema: 3.25.2(zod@4.3.6) transitivePeerDependencies: - supports-color - '@mozilla/readability@0.6.0': {} - - '@napi-rs/canvas-android-arm64@0.1.97': - optional: true - - '@napi-rs/canvas-darwin-arm64@0.1.97': - optional: true - - '@napi-rs/canvas-darwin-x64@0.1.97': - optional: true - - '@napi-rs/canvas-linux-arm-gnueabihf@0.1.97': - optional: true - - '@napi-rs/canvas-linux-arm64-gnu@0.1.97': - optional: true - - '@napi-rs/canvas-linux-arm64-musl@0.1.97': - optional: true - - '@napi-rs/canvas-linux-riscv64-gnu@0.1.97': - optional: true - - '@napi-rs/canvas-linux-x64-gnu@0.1.97': - optional: true - - '@napi-rs/canvas-linux-x64-musl@0.1.97': - optional: true - - '@napi-rs/canvas-win32-arm64-msvc@0.1.97': - optional: true - - '@napi-rs/canvas-win32-x64-msvc@0.1.97': - optional: true - - '@napi-rs/canvas@0.1.97': - optionalDependencies: - '@napi-rs/canvas-android-arm64': 0.1.97 - '@napi-rs/canvas-darwin-arm64': 0.1.97 - '@napi-rs/canvas-darwin-x64': 0.1.97 - '@napi-rs/canvas-linux-arm-gnueabihf': 0.1.97 - '@napi-rs/canvas-linux-arm64-gnu': 0.1.97 - '@napi-rs/canvas-linux-arm64-musl': 0.1.97 - '@napi-rs/canvas-linux-riscv64-gnu': 0.1.97 - '@napi-rs/canvas-linux-x64-gnu': 0.1.97 - '@napi-rs/canvas-linux-x64-musl': 0.1.97 - '@napi-rs/canvas-win32-arm64-msvc': 0.1.97 - '@napi-rs/canvas-win32-x64-msvc': 0.1.97 + '@nodable/entities@2.1.0': {} '@nodelib/fs.scandir@2.1.5': dependencies: @@ -7609,24 +7148,24 @@ snapshots: '@protobufjs/base64@1.1.2': {} - '@protobufjs/codegen@2.0.4': {} + '@protobufjs/codegen@2.0.5': {} '@protobufjs/eventemitter@1.1.0': {} '@protobufjs/fetch@1.1.0': dependencies: '@protobufjs/aspromise': 1.1.2 - '@protobufjs/inquire': 1.1.0 + '@protobufjs/inquire': 1.1.1 '@protobufjs/float@1.0.2': {} - '@protobufjs/inquire@1.1.0': {} + '@protobufjs/inquire@1.1.1': {} '@protobufjs/path@1.1.2': {} '@protobufjs/pool@1.1.0': {} - '@protobufjs/utf8@1.1.0': {} + '@protobufjs/utf8@1.1.1': {} '@puppeteer/browsers@2.3.0': dependencies: @@ -7634,7 +7173,7 @@ snapshots: extract-zip: 2.0.1 progress: 2.0.3 proxy-agent: 6.5.0 - semver: 7.7.4 + semver: 7.7.2 tar-fs: 3.1.2 unbzip2-stream: 1.4.3 yargs: 17.7.2 @@ -7823,79 +7362,79 @@ snapshots: '@radix-ui/rect@1.1.1': {} - '@rollup/rollup-android-arm-eabi@4.59.0': + '@rollup/rollup-android-arm-eabi@4.60.2': optional: true - '@rollup/rollup-android-arm64@4.59.0': + '@rollup/rollup-android-arm64@4.60.2': optional: true - '@rollup/rollup-darwin-arm64@4.59.0': + '@rollup/rollup-darwin-arm64@4.60.2': optional: true - '@rollup/rollup-darwin-x64@4.59.0': + '@rollup/rollup-darwin-x64@4.60.2': optional: true - '@rollup/rollup-freebsd-arm64@4.59.0': + '@rollup/rollup-freebsd-arm64@4.60.2': optional: true - '@rollup/rollup-freebsd-x64@4.59.0': + '@rollup/rollup-freebsd-x64@4.60.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.59.0': + '@rollup/rollup-linux-arm-gnueabihf@4.60.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.59.0': + '@rollup/rollup-linux-arm-musleabihf@4.60.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.59.0': + '@rollup/rollup-linux-arm64-gnu@4.60.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.59.0': + '@rollup/rollup-linux-arm64-musl@4.60.2': optional: true - '@rollup/rollup-linux-loong64-gnu@4.59.0': + '@rollup/rollup-linux-loong64-gnu@4.60.2': optional: true - '@rollup/rollup-linux-loong64-musl@4.59.0': + '@rollup/rollup-linux-loong64-musl@4.60.2': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.59.0': + '@rollup/rollup-linux-ppc64-gnu@4.60.2': optional: true - '@rollup/rollup-linux-ppc64-musl@4.59.0': + '@rollup/rollup-linux-ppc64-musl@4.60.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.59.0': + '@rollup/rollup-linux-riscv64-gnu@4.60.2': optional: true - '@rollup/rollup-linux-riscv64-musl@4.59.0': + '@rollup/rollup-linux-riscv64-musl@4.60.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.59.0': + '@rollup/rollup-linux-s390x-gnu@4.60.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.59.0': + '@rollup/rollup-linux-x64-gnu@4.60.2': optional: true - '@rollup/rollup-linux-x64-musl@4.59.0': + '@rollup/rollup-linux-x64-musl@4.60.2': optional: true - '@rollup/rollup-openbsd-x64@4.59.0': + '@rollup/rollup-openbsd-x64@4.60.2': optional: true - '@rollup/rollup-openharmony-arm64@4.59.0': + '@rollup/rollup-openharmony-arm64@4.60.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.59.0': + '@rollup/rollup-win32-arm64-msvc@4.60.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.59.0': + '@rollup/rollup-win32-ia32-msvc@4.60.2': optional: true - '@rollup/rollup-win32-x64-gnu@4.59.0': + '@rollup/rollup-win32-x64-gnu@4.60.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.59.0': + '@rollup/rollup-win32-x64-msvc@4.60.2': optional: true '@shikijs/core@3.23.0': @@ -7909,7 +7448,7 @@ snapshots: dependencies: '@shikijs/types': 3.23.0 '@shikijs/vscode-textmate': 10.0.2 - oniguruma-to-es: 4.3.5 + oniguruma-to-es: 4.3.6 '@shikijs/engine-oniguruma@3.23.0': dependencies: @@ -7929,12 +7468,12 @@ snapshots: '@shikijs/core': 3.23.0 '@shikijs/types': 3.23.0 - '@shikijs/twoslash@3.23.0(typescript@5.9.3)': + '@shikijs/twoslash@3.23.0(typescript@6.0.3)': dependencies: '@shikijs/core': 3.23.0 '@shikijs/types': 3.23.0 - twoslash: 0.3.6(typescript@5.9.3) - typescript: 5.9.3 + twoslash: 0.3.8(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color @@ -7947,6 +7486,10 @@ snapshots: '@silvia-odwyer/photon-node@0.3.4': {} + '@simplex-chat/types@0.5.0': + dependencies: + typescript: 5.9.3 + '@sinclair/typebox@0.34.49': {} '@sindresorhus/is@5.6.0': {} @@ -7969,7 +7512,7 @@ snapshots: '@smithy/util-middleware': 4.2.14 tslib: 2.8.1 - '@smithy/core@3.23.16': + '@smithy/core@3.23.17': dependencies: '@smithy/protocol-http': 5.3.14 '@smithy/types': 4.14.1 @@ -7977,7 +7520,7 @@ snapshots: '@smithy/util-base64': 4.3.2 '@smithy/util-body-length-browser': 4.2.2 '@smithy/util-middleware': 4.2.14 - '@smithy/util-stream': 4.5.24 + '@smithy/util-stream': 4.5.25 '@smithy/util-utf8': 4.2.2 '@smithy/uuid': 1.1.2 tslib: 2.8.1 @@ -8054,10 +7597,10 @@ snapshots: '@smithy/types': 4.14.1 tslib: 2.8.1 - '@smithy/middleware-endpoint@4.4.31': + '@smithy/middleware-endpoint@4.4.32': dependencies: - '@smithy/core': 3.23.16 - '@smithy/middleware-serde': 4.2.19 + '@smithy/core': 3.23.17 + '@smithy/middleware-serde': 4.2.20 '@smithy/node-config-provider': 4.3.14 '@smithy/shared-ini-file-loader': 4.4.9 '@smithy/types': 4.14.1 @@ -8065,22 +7608,22 @@ snapshots: '@smithy/util-middleware': 4.2.14 tslib: 2.8.1 - '@smithy/middleware-retry@4.5.4': + '@smithy/middleware-retry@4.5.7': dependencies: - '@smithy/core': 3.23.16 + '@smithy/core': 3.23.17 '@smithy/node-config-provider': 4.3.14 '@smithy/protocol-http': 5.3.14 - '@smithy/service-error-classification': 4.3.0 - '@smithy/smithy-client': 4.12.12 + '@smithy/service-error-classification': 4.3.1 + '@smithy/smithy-client': 4.12.13 '@smithy/types': 4.14.1 '@smithy/util-middleware': 4.2.14 - '@smithy/util-retry': 4.3.3 + '@smithy/util-retry': 4.3.6 '@smithy/uuid': 1.1.2 tslib: 2.8.1 - '@smithy/middleware-serde@4.2.19': + '@smithy/middleware-serde@4.2.20': dependencies: - '@smithy/core': 3.23.16 + '@smithy/core': 3.23.17 '@smithy/protocol-http': 5.3.14 '@smithy/types': 4.14.1 tslib: 2.8.1 @@ -8097,7 +7640,7 @@ snapshots: '@smithy/types': 4.14.1 tslib: 2.8.1 - '@smithy/node-http-handler@4.6.0': + '@smithy/node-http-handler@4.6.1': dependencies: '@smithy/protocol-http': 5.3.14 '@smithy/querystring-builder': 4.2.14 @@ -8125,7 +7668,7 @@ snapshots: '@smithy/types': 4.14.1 tslib: 2.8.1 - '@smithy/service-error-classification@4.3.0': + '@smithy/service-error-classification@4.3.1': dependencies: '@smithy/types': 4.14.1 @@ -8145,14 +7688,14 @@ snapshots: '@smithy/util-utf8': 4.2.2 tslib: 2.8.1 - '@smithy/smithy-client@4.12.12': + '@smithy/smithy-client@4.12.13': dependencies: - '@smithy/core': 3.23.16 - '@smithy/middleware-endpoint': 4.4.31 + '@smithy/core': 3.23.17 + '@smithy/middleware-endpoint': 4.4.32 '@smithy/middleware-stack': 4.2.14 '@smithy/protocol-http': 5.3.14 '@smithy/types': 4.14.1 - '@smithy/util-stream': 4.5.24 + '@smithy/util-stream': 4.5.25 tslib: 2.8.1 '@smithy/types@4.14.1': @@ -8193,20 +7736,20 @@ snapshots: dependencies: tslib: 2.8.1 - '@smithy/util-defaults-mode-browser@4.3.48': + '@smithy/util-defaults-mode-browser@4.3.49': dependencies: '@smithy/property-provider': 4.2.14 - '@smithy/smithy-client': 4.12.12 + '@smithy/smithy-client': 4.12.13 '@smithy/types': 4.14.1 tslib: 2.8.1 - '@smithy/util-defaults-mode-node@4.2.53': + '@smithy/util-defaults-mode-node@4.2.54': dependencies: '@smithy/config-resolver': 4.4.17 '@smithy/credential-provider-imds': 4.2.14 '@smithy/node-config-provider': 4.3.14 '@smithy/property-provider': 4.2.14 - '@smithy/smithy-client': 4.12.12 + '@smithy/smithy-client': 4.12.13 '@smithy/types': 4.14.1 tslib: 2.8.1 @@ -8225,16 +7768,16 @@ snapshots: '@smithy/types': 4.14.1 tslib: 2.8.1 - '@smithy/util-retry@4.3.3': + '@smithy/util-retry@4.3.6': dependencies: - '@smithy/service-error-classification': 4.3.0 + '@smithy/service-error-classification': 4.3.1 '@smithy/types': 4.14.1 tslib: 2.8.1 - '@smithy/util-stream@4.5.24': + '@smithy/util-stream@4.5.25': dependencies: '@smithy/fetch-http-handler': 5.3.17 - '@smithy/node-http-handler': 4.6.0 + '@smithy/node-http-handler': 4.6.1 '@smithy/types': 4.14.1 '@smithy/util-base64': 4.3.2 '@smithy/util-buffer-from': 4.2.2 @@ -8264,15 +7807,15 @@ snapshots: '@standard-schema/spec@1.1.0': {} - '@stoplight/better-ajv-errors@1.0.3(ajv@8.18.0)': + '@stoplight/better-ajv-errors@1.0.3(ajv@8.20.0)': dependencies: - ajv: 8.18.0 + ajv: 8.20.0 jsonpointer: 5.0.1 leven: 3.1.0 '@stoplight/json-ref-readers@1.2.2': dependencies: - node-fetch: 2.7.0 + node-fetch: 2.6.7 tslib: 1.14.1 transitivePeerDependencies: - encoding @@ -8286,7 +7829,7 @@ snapshots: dependency-graph: 0.11.0 fast-memoize: 2.5.2 immer: 9.0.21 - lodash: 4.17.23 + lodash: 4.18.1 tslib: 2.8.1 urijs: 1.19.11 @@ -8296,35 +7839,35 @@ snapshots: '@stoplight/path': 1.3.2 '@stoplight/types': 13.20.0 jsonc-parser: 2.2.1 - lodash: 4.17.23 + lodash: 4.18.1 safe-stable-stringify: 1.1.1 '@stoplight/ordered-object-literal@1.0.5': {} '@stoplight/path@1.3.2': {} - '@stoplight/spectral-core@1.21.0': + '@stoplight/spectral-core@1.22.0': dependencies: - '@stoplight/better-ajv-errors': 1.0.3(ajv@8.18.0) + '@stoplight/better-ajv-errors': 1.0.3(ajv@8.20.0) '@stoplight/json': 3.21.0 '@stoplight/path': 1.3.2 '@stoplight/spectral-parsers': 1.0.5 '@stoplight/spectral-ref-resolver': 1.0.5 - '@stoplight/spectral-runtime': 1.1.4 + '@stoplight/spectral-runtime': 1.1.5 '@stoplight/types': 13.6.0 '@types/es-aggregate-error': 1.0.6 '@types/json-schema': 7.0.15 - ajv: 8.18.0 - ajv-errors: 3.0.0(ajv@8.18.0) - ajv-formats: 2.1.1(ajv@8.18.0) + ajv: 8.20.0 + ajv-errors: 3.0.0(ajv@8.20.0) + ajv-formats: 2.1.1(ajv@8.20.0) es-aggregate-error: 1.0.14 + expr-eval-fork: 3.0.3 jsonpath-plus: 10.4.0 - lodash: 4.17.23 + lodash: 4.18.1 lodash.topath: 4.5.2 - minimatch: 3.1.2 + minimatch: 3.1.5 nimma: 0.2.3 pony-cause: 1.1.1 - simple-eval: 1.0.1 tslib: 2.8.1 transitivePeerDependencies: - encoding @@ -8332,24 +7875,24 @@ snapshots: '@stoplight/spectral-formats@1.8.2': dependencies: '@stoplight/json': 3.21.0 - '@stoplight/spectral-core': 1.21.0 + '@stoplight/spectral-core': 1.22.0 '@types/json-schema': 7.0.15 tslib: 2.8.1 transitivePeerDependencies: - encoding - '@stoplight/spectral-functions@1.10.1': + '@stoplight/spectral-functions@1.10.2': dependencies: - '@stoplight/better-ajv-errors': 1.0.3(ajv@8.18.0) + '@stoplight/better-ajv-errors': 1.0.3(ajv@8.20.0) '@stoplight/json': 3.21.0 - '@stoplight/spectral-core': 1.21.0 + '@stoplight/spectral-core': 1.22.0 '@stoplight/spectral-formats': 1.8.2 - '@stoplight/spectral-runtime': 1.1.4 - ajv: 8.18.0 - ajv-draft-04: 1.0.0(ajv@8.18.0) - ajv-errors: 3.0.0(ajv@8.18.0) - ajv-formats: 2.1.1(ajv@8.18.0) - lodash: 4.17.23 + '@stoplight/spectral-runtime': 1.1.5 + ajv: 8.20.0 + ajv-draft-04: 1.0.0(ajv@8.20.0) + ajv-errors: 3.0.0(ajv@8.20.0) + ajv-formats: 2.1.1(ajv@8.20.0) + lodash: 4.18.1 tslib: 2.8.1 transitivePeerDependencies: - encoding @@ -8365,19 +7908,19 @@ snapshots: dependencies: '@stoplight/json-ref-readers': 1.2.2 '@stoplight/json-ref-resolver': 3.1.6 - '@stoplight/spectral-runtime': 1.1.4 + '@stoplight/spectral-runtime': 1.1.5 dependency-graph: 0.11.0 tslib: 2.8.1 transitivePeerDependencies: - encoding - '@stoplight/spectral-runtime@1.1.4': + '@stoplight/spectral-runtime@1.1.5': dependencies: '@stoplight/json': 3.21.0 '@stoplight/path': 1.3.2 '@stoplight/types': 13.20.0 abort-controller: 3.0.0 - lodash: 4.17.23 + lodash: 4.18.1 node-fetch: 2.7.0 tslib: 2.8.1 transitivePeerDependencies: @@ -8431,11 +7974,9 @@ snapshots: '@types/deep-eql': 4.0.2 assertion-error: 2.0.1 - '@types/cookie@0.4.1': {} - '@types/cors@2.8.19': dependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 '@types/debug@4.1.13': dependencies: @@ -8445,7 +7986,7 @@ snapshots: '@types/es-aggregate-error@1.0.6': dependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 '@types/estree-jsx@1.0.5': dependencies: @@ -8477,18 +8018,10 @@ snapshots: dependencies: '@types/unist': 3.0.3 - '@types/node@25.5.2': - dependencies: - undici-types: 7.18.2 - '@types/node@25.6.0': dependencies: undici-types: 7.19.2 - '@types/qrcode@1.5.6': - dependencies: - '@types/node': 25.5.2 - '@types/react@19.2.14': dependencies: csstype: 3.2.3 @@ -8503,64 +8036,60 @@ snapshots: '@types/ws@8.18.1': dependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 '@types/yauzl@2.10.3': dependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 optional: true - '@typescript/vfs@1.6.4(typescript@5.9.3)': + '@typescript/vfs@1.6.4(typescript@6.0.3)': dependencies: debug: 4.4.3 - typescript: 5.9.3 + typescript: 6.0.3 transitivePeerDependencies: - supports-color '@ungap/structured-clone@1.3.0': {} - '@vincentkoc/qrcode-tui@0.2.1': - dependencies: - qrcode: 1.5.4 - - '@vitest/expect@4.1.2': + '@vitest/expect@4.1.5': dependencies: '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.3 - '@vitest/spy': 4.1.2 - '@vitest/utils': 4.1.2 + '@vitest/spy': 4.1.5 + '@vitest/utils': 4.1.5 chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.2(vite@7.3.1(@types/node@25.5.2)(jiti@1.21.7)(yaml@2.8.3))': + '@vitest/mocker@4.1.5(vite@7.3.1(@types/node@25.6.0)(jiti@1.21.7)(yaml@2.8.3))': dependencies: - '@vitest/spy': 4.1.2 + '@vitest/spy': 4.1.5 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 7.3.1(@types/node@25.5.2)(jiti@1.21.7)(yaml@2.8.3) + vite: 7.3.1(@types/node@25.6.0)(jiti@1.21.7)(yaml@2.8.3) - '@vitest/pretty-format@4.1.2': + '@vitest/pretty-format@4.1.5': dependencies: tinyrainbow: 3.1.0 - '@vitest/runner@4.1.2': + '@vitest/runner@4.1.5': dependencies: - '@vitest/utils': 4.1.2 + '@vitest/utils': 4.1.5 pathe: 2.0.3 - '@vitest/snapshot@4.1.2': + '@vitest/snapshot@4.1.5': dependencies: - '@vitest/pretty-format': 4.1.2 - '@vitest/utils': 4.1.2 + '@vitest/pretty-format': 4.1.5 + '@vitest/utils': 4.1.5 magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@4.1.2': {} + '@vitest/spy@4.1.5': {} - '@vitest/utils@4.1.2': + '@vitest/utils@4.1.5': dependencies: - '@vitest/pretty-format': 4.1.2 + '@vitest/pretty-format': 4.1.5 convert-source-map: 2.0.0 tinyrainbow: 3.1.0 @@ -8603,23 +8132,23 @@ snapshots: clean-stack: 4.2.0 indent-string: 5.0.0 - ajv-draft-04@1.0.0(ajv@8.18.0): + ajv-draft-04@1.0.0(ajv@8.20.0): optionalDependencies: - ajv: 8.18.0 + ajv: 8.20.0 - ajv-errors@3.0.0(ajv@8.18.0): + ajv-errors@3.0.0(ajv@8.20.0): dependencies: - ajv: 8.18.0 + ajv: 8.20.0 - ajv-formats@2.1.1(ajv@8.18.0): + ajv-formats@2.1.1(ajv@8.20.0): optionalDependencies: - ajv: 8.18.0 + ajv: 8.20.0 - ajv-formats@3.0.1(ajv@8.18.0): + ajv-formats@3.0.1(ajv@8.20.0): optionalDependencies: - ajv: 8.18.0 + ajv: 8.20.0 - ajv@8.18.0: + ajv@8.20.0: dependencies: fast-deep-equal: 3.1.3 fast-uri: 3.1.0 @@ -8667,22 +8196,12 @@ snapshots: dependencies: '@ark/util': 0.55.0 - arkregex@0.0.5: - dependencies: - '@ark/util': 0.56.0 - arktype@2.1.27: dependencies: '@ark/schema': 0.55.0 '@ark/util': 0.55.0 arkregex: 0.0.3 - arktype@2.2.0: - dependencies: - '@ark/schema': 0.56.0 - '@ark/util': 0.56.0 - arkregex: 0.0.5 - array-buffer-byte-length@1.0.2: dependencies: call-bound: 1.0.4 @@ -8695,13 +8214,20 @@ snapshots: arraybuffer.prototype.slice@1.0.4: dependencies: array-buffer-byte-length: 1.0.2 - call-bind: 1.0.8 + call-bind: 1.0.9 define-properties: 1.2.1 - es-abstract: 1.24.1 + es-abstract: 1.24.2 es-errors: 1.3.0 get-intrinsic: 1.3.0 is-array-buffer: 3.0.5 + asn1.js@5.4.1: + dependencies: + bn.js: 4.12.3 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + safer-buffer: 2.1.2 + assertion-error@2.0.1: {} ast-types@0.13.4: @@ -8724,21 +8250,21 @@ snapshots: axios@1.10.0: dependencies: - follow-redirects: 1.15.11 + follow-redirects: 1.16.0 form-data: 4.0.5 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug - axios@1.13.2: + axios@1.15.0: dependencies: - follow-redirects: 1.15.11 + follow-redirects: 1.16.0 form-data: 4.0.5 - proxy-from-env: 1.1.0 + proxy-from-env: 2.1.0 transitivePeerDependencies: - debug - b4a@1.8.0: {} + b4a@1.8.1: {} bail@2.0.2: {} @@ -8748,24 +8274,24 @@ snapshots: bare-events@2.8.2: {} - bare-fs@4.5.6: + bare-fs@4.7.1: dependencies: bare-events: 2.8.2 bare-path: 3.0.0 - bare-stream: 2.12.0(bare-events@2.8.2) - bare-url: 2.4.0 + bare-stream: 2.13.1(bare-events@2.8.2) + bare-url: 2.4.2 fast-fifo: 1.3.2 transitivePeerDependencies: - bare-abort-controller - react-native-b4a - bare-os@3.8.6: {} + bare-os@3.9.1: {} bare-path@3.0.0: dependencies: - bare-os: 3.8.6 + bare-os: 3.9.1 - bare-stream@2.12.0(bare-events@2.8.2): + bare-stream@2.13.1(bare-events@2.8.2): dependencies: streamx: 2.25.0 teex: 1.0.1 @@ -8774,7 +8300,7 @@ snapshots: transitivePeerDependencies: - react-native-b4a - bare-url@2.4.0: + bare-url@2.4.2: dependencies: bare-path: 3.0.0 @@ -8782,7 +8308,7 @@ snapshots: base64id@2.0.0: {} - basic-ftp@5.2.0: {} + basic-ftp@5.3.1: {} better-opn@3.0.2: dependencies: @@ -8799,18 +8325,20 @@ snapshots: readable-stream: 3.6.2 optional: true - body-parser@1.20.1: + bn.js@4.12.3: {} + + body-parser@1.20.5: dependencies: bytes: 3.1.2 content-type: 1.0.5 debug: 2.6.9 depd: 2.0.0 destroy: 1.2.0 - http-errors: 2.0.0 + http-errors: 2.0.1 iconv-lite: 0.4.24 on-finished: 2.4.1 - qs: 6.11.0 - raw-body: 2.5.1 + qs: 6.15.1 + raw-body: 2.5.3 type-is: 1.6.18 unpipe: 1.0.0 transitivePeerDependencies: @@ -8824,22 +8352,20 @@ snapshots: http-errors: 2.0.1 iconv-lite: 0.7.2 on-finished: 2.4.1 - qs: 6.15.0 + qs: 6.15.1 raw-body: 3.0.2 type-is: 2.0.1 transitivePeerDependencies: - supports-color - boolbase@1.0.0: {} - bowser@2.14.1: {} - brace-expansion@1.1.13: + brace-expansion@1.1.14: dependencies: balanced-match: 1.0.2 concat-map: 0.0.1 - brace-expansion@5.0.4: + brace-expansion@5.0.5: dependencies: balanced-match: 4.0.4 @@ -8851,16 +8377,14 @@ snapshots: buffer-equal-constant-time@1.0.1: {} - buffer-from@1.1.2: {} - buffer@5.7.1: dependencies: base64-js: 1.5.1 ieee754: 1.2.1 - bundle-require@5.1.0(esbuild@0.27.3): + bundle-require@5.1.0(esbuild@0.27.7): dependencies: - esbuild: 0.27.3 + esbuild: 0.27.7 load-tsconfig: 0.2.5 bytes@3.1.2: {} @@ -8884,7 +8408,7 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 - call-bind@1.0.8: + call-bind@1.0.9: dependencies: call-bind-apply-helpers: 1.0.2 es-define-property: 1.0.1 @@ -9067,7 +8591,7 @@ snapshots: dependencies: safe-buffer: 5.2.1 - content-disposition@1.0.1: {} + content-disposition@1.1.0: {} content-type@1.0.5: {} @@ -9075,14 +8599,10 @@ snapshots: convert-to-spaces@2.0.1: {} - cookie-signature@1.0.6: {} + cookie-signature@1.0.7: {} cookie-signature@1.2.2: {} - cookie@0.4.2: {} - - cookie@0.5.0: {} - cookie@0.7.2: {} core-util-is@1.0.3: {} @@ -9092,14 +8612,14 @@ snapshots: object-assign: 4.1.1 vary: 1.1.2 - cosmiconfig@9.0.1(typescript@5.9.3): + cosmiconfig@9.0.1(typescript@6.0.3): dependencies: env-paths: 2.2.1 import-fresh: 3.3.1 js-yaml: 4.1.0 parse-json: 5.2.0 optionalDependencies: - typescript: 5.9.3 + typescript: 6.0.3 croner@10.0.1: {} @@ -9109,22 +8629,10 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - css-select@5.2.2: - dependencies: - boolbase: 1.0.0 - css-what: 6.2.2 - domhandler: 5.0.3 - domutils: 3.2.2 - nth-check: 2.1.1 - - css-what@6.2.2: {} - cssesc@3.0.0: {} cssfilter@0.0.10: {} - cssom@0.5.0: {} - csstype@3.2.3: {} data-uri-to-buffer@4.0.1: {} @@ -9245,7 +8753,7 @@ snapshots: didyoumean@1.2.2: {} - diff@8.0.3: {} + diff@8.0.4: {} dijkstrajs@1.0.3: {} @@ -9259,24 +8767,6 @@ snapshots: dependencies: dns-packet: 5.6.1 - dom-serializer@2.0.0: - dependencies: - domelementtype: 2.3.0 - domhandler: 5.0.3 - entities: 4.5.0 - - domelementtype@2.3.0: {} - - domhandler@5.0.3: - dependencies: - domelementtype: 2.3.0 - - domutils@3.2.2: - dependencies: - dom-serializer: 2.0.0 - domelementtype: 2.3.0 - domhandler: 5.0.3 - dotenv@17.4.2: {} dunder-proto@1.0.1: @@ -9295,8 +8785,6 @@ snapshots: emoji-regex@8.0.0: {} - encodeurl@1.0.2: {} - encodeurl@2.0.0: {} end-of-stream@1.4.5: @@ -9305,18 +8793,18 @@ snapshots: engine.io-parser@5.2.3: {} - engine.io@6.5.5: + engine.io@6.6.7: dependencies: - '@types/cookie': 0.4.1 '@types/cors': 2.8.19 - '@types/node': 25.5.2 + '@types/node': 25.6.0 + '@types/ws': 8.18.1 accepts: 1.3.8 base64id: 2.0.0 - cookie: 0.4.2 + cookie: 0.7.2 cors: 2.8.6 - debug: 4.3.7 + debug: 4.4.3 engine.io-parser: 5.2.3 - ws: 8.17.1 + ws: 8.18.3 transitivePeerDependencies: - bufferutil - supports-color @@ -9326,8 +8814,6 @@ snapshots: entities@6.0.1: {} - entities@7.0.1: {} - env-paths@2.2.1: {} environment@1.1.0: {} @@ -9336,12 +8822,12 @@ snapshots: dependencies: is-arrayish: 0.2.1 - es-abstract@1.24.1: + es-abstract@1.24.2: dependencies: array-buffer-byte-length: 1.0.2 arraybuffer.prototype.slice: 1.0.4 available-typed-arrays: 1.0.7 - call-bind: 1.0.8 + call-bind: 1.0.9 call-bound: 1.0.4 data-view-buffer: 1.0.2 data-view-byte-length: 1.0.2 @@ -9360,7 +8846,7 @@ snapshots: has-property-descriptors: 1.0.2 has-proto: 1.2.0 has-symbols: 1.1.0 - hasown: 2.0.2 + hasown: 2.0.3 internal-slot: 1.1.0 is-array-buffer: 3.0.5 is-callable: 1.2.7 @@ -9378,7 +8864,7 @@ snapshots: object.assign: 4.1.7 own-keys: 1.0.1 regexp.prototype.flags: 1.5.4 - safe-array-concat: 1.1.3 + safe-array-concat: 1.1.4 safe-push-apply: 1.0.0 safe-regex-test: 1.1.0 set-proto: 1.0.0 @@ -9397,7 +8883,7 @@ snapshots: dependencies: define-data-property: 1.1.4 define-properties: 1.2.1 - es-abstract: 1.24.1 + es-abstract: 1.24.2 es-errors: 1.3.0 function-bind: 1.1.2 globalthis: 1.0.4 @@ -9408,7 +8894,7 @@ snapshots: es-errors@1.3.0: {} - es-module-lexer@2.0.0: {} + es-module-lexer@2.1.0: {} es-object-atoms@1.1.1: dependencies: @@ -9419,7 +8905,7 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.3.0 has-tostringtag: 1.0.2 - hasown: 2.0.2 + hasown: 2.0.3 es-to-primitive@1.3.0: dependencies: @@ -9427,7 +8913,7 @@ snapshots: is-date-object: 1.1.0 is-symbol: 1.1.1 - es-toolkit@1.45.1: {} + es-toolkit@1.46.1: {} esast-util-from-estree@2.0.0: dependencies: @@ -9443,34 +8929,34 @@ snapshots: esast-util-from-estree: 2.0.0 vfile-message: 4.0.3 - esbuild@0.27.3: + esbuild@0.27.7: optionalDependencies: - '@esbuild/aix-ppc64': 0.27.3 - '@esbuild/android-arm': 0.27.3 - '@esbuild/android-arm64': 0.27.3 - '@esbuild/android-x64': 0.27.3 - '@esbuild/darwin-arm64': 0.27.3 - '@esbuild/darwin-x64': 0.27.3 - '@esbuild/freebsd-arm64': 0.27.3 - '@esbuild/freebsd-x64': 0.27.3 - '@esbuild/linux-arm': 0.27.3 - '@esbuild/linux-arm64': 0.27.3 - '@esbuild/linux-ia32': 0.27.3 - '@esbuild/linux-loong64': 0.27.3 - '@esbuild/linux-mips64el': 0.27.3 - '@esbuild/linux-ppc64': 0.27.3 - '@esbuild/linux-riscv64': 0.27.3 - '@esbuild/linux-s390x': 0.27.3 - '@esbuild/linux-x64': 0.27.3 - '@esbuild/netbsd-arm64': 0.27.3 - '@esbuild/netbsd-x64': 0.27.3 - '@esbuild/openbsd-arm64': 0.27.3 - '@esbuild/openbsd-x64': 0.27.3 - '@esbuild/openharmony-arm64': 0.27.3 - '@esbuild/sunos-x64': 0.27.3 - '@esbuild/win32-arm64': 0.27.3 - '@esbuild/win32-ia32': 0.27.3 - '@esbuild/win32-x64': 0.27.3 + '@esbuild/aix-ppc64': 0.27.7 + '@esbuild/android-arm': 0.27.7 + '@esbuild/android-arm64': 0.27.7 + '@esbuild/android-x64': 0.27.7 + '@esbuild/darwin-arm64': 0.27.7 + '@esbuild/darwin-x64': 0.27.7 + '@esbuild/freebsd-arm64': 0.27.7 + '@esbuild/freebsd-x64': 0.27.7 + '@esbuild/linux-arm': 0.27.7 + '@esbuild/linux-arm64': 0.27.7 + '@esbuild/linux-ia32': 0.27.7 + '@esbuild/linux-loong64': 0.27.7 + '@esbuild/linux-mips64el': 0.27.7 + '@esbuild/linux-ppc64': 0.27.7 + '@esbuild/linux-riscv64': 0.27.7 + '@esbuild/linux-s390x': 0.27.7 + '@esbuild/linux-x64': 0.27.7 + '@esbuild/netbsd-arm64': 0.27.7 + '@esbuild/netbsd-x64': 0.27.7 + '@esbuild/openbsd-arm64': 0.27.7 + '@esbuild/openbsd-x64': 0.27.7 + '@esbuild/openharmony-arm64': 0.27.7 + '@esbuild/sunos-x64': 0.27.7 + '@esbuild/win32-arm64': 0.27.7 + '@esbuild/win32-ia32': 0.27.7 + '@esbuild/win32-x64': 0.27.7 escalade@3.2.0: {} @@ -9478,6 +8964,8 @@ snapshots: escape-string-regexp@2.0.0: {} + escape-string-regexp@4.0.0: {} + escape-string-regexp@5.0.0: {} escodegen@2.1.0: @@ -9537,52 +9025,54 @@ snapshots: transitivePeerDependencies: - bare-abort-controller - eventsource-parser@3.0.6: {} + eventsource-parser@3.0.8: {} eventsource@3.0.7: dependencies: - eventsource-parser: 3.0.6 + eventsource-parser: 3.0.8 expand-template@2.0.3: optional: true expect-type@1.3.0: {} - express-rate-limit@8.3.1(express@5.2.1): + expr-eval-fork@3.0.3: {} + + express-rate-limit@8.4.1(express@5.2.1): dependencies: express: 5.2.1 ip-address: 10.1.0 - express@4.18.2: + express@4.22.0: dependencies: accepts: 1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.1 + body-parser: 1.20.5 content-disposition: 0.5.4 content-type: 1.0.5 - cookie: 0.5.0 - cookie-signature: 1.0.6 + cookie: 0.7.2 + cookie-signature: 1.0.7 debug: 2.6.9 depd: 2.0.0 - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 1.2.0 + finalhandler: 1.3.2 fresh: 0.5.2 - http-errors: 2.0.0 - merge-descriptors: 1.0.1 + http-errors: 2.0.1 + merge-descriptors: 1.0.3 methods: 1.1.2 on-finished: 2.4.1 parseurl: 1.3.3 - path-to-regexp: 0.1.7 + path-to-regexp: 0.1.13 proxy-addr: 2.0.7 - qs: 6.11.0 + qs: 6.14.2 range-parser: 1.2.1 safe-buffer: 5.2.1 - send: 0.18.0 - serve-static: 1.15.0 + send: 0.19.2 + serve-static: 1.16.3 setprototypeof: 1.2.0 - statuses: 2.0.1 + statuses: 2.0.2 type-is: 1.6.18 utils-merge: 1.0.1 vary: 1.1.2 @@ -9593,7 +9083,7 @@ snapshots: dependencies: accepts: 2.0.0 body-parser: 2.2.2 - content-disposition: 1.0.1 + content-disposition: 1.1.0 content-type: 1.0.5 cookie: 0.7.2 cookie-signature: 1.2.2 @@ -9611,7 +9101,7 @@ snapshots: once: 1.4.0 parseurl: 1.3.3 proxy-addr: 2.0.7 - qs: 6.15.0 + qs: 6.15.1 range-parser: 1.2.1 router: 2.2.0 send: 1.2.1 @@ -9648,27 +9138,28 @@ snapshots: fast-memoize@2.5.2: {} - fast-string-truncated-width@1.2.1: {} + fast-string-truncated-width@3.0.3: {} - fast-string-width@1.1.0: + fast-string-width@3.0.2: dependencies: - fast-string-truncated-width: 1.2.1 + fast-string-truncated-width: 3.0.3 fast-uri@3.1.0: {} - fast-wrap-ansi@0.1.6: + fast-wrap-ansi@0.2.0: dependencies: - fast-string-width: 1.1.0 + fast-string-width: 3.0.2 - fast-xml-builder@1.1.4: + fast-xml-builder@1.1.5: dependencies: - path-expression-matcher: 1.2.0 + path-expression-matcher: 1.5.0 - fast-xml-parser@5.5.8: + fast-xml-parser@5.7.2: dependencies: - fast-xml-builder: 1.1.4 - path-expression-matcher: 1.2.0 - strnum: 2.2.0 + '@nodable/entities': 2.1.0 + fast-xml-builder: 1.1.5 + path-expression-matcher: 1.5.0 + strnum: 2.2.3 fastq@1.20.1: dependencies: @@ -9688,9 +9179,9 @@ snapshots: dependencies: pend: 1.2.0 - fdir@6.5.0(picomatch@4.0.3): + fdir@6.5.0(picomatch@4.0.4): optionalDependencies: - picomatch: 4.0.3 + picomatch: 4.0.4 fetch-blob@3.2.0: dependencies: @@ -9719,14 +9210,14 @@ snapshots: dependencies: to-regex-range: 5.0.1 - finalhandler@1.2.0: + finalhandler@1.3.2: dependencies: debug: 2.6.9 - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 parseurl: 1.3.3 - statuses: 2.0.1 + statuses: 2.0.2 unpipe: 1.0.0 transitivePeerDependencies: - supports-color @@ -9750,10 +9241,10 @@ snapshots: fix-dts-default-cjs-exports@1.0.1: dependencies: magic-string: 0.30.21 - mlly: 1.8.0 - rollup: 4.59.0 + mlly: 1.8.2 + rollup: 4.60.2 - follow-redirects@1.15.11: {} + follow-redirects@1.16.0: {} for-each@0.3.5: dependencies: @@ -9766,7 +9257,7 @@ snapshots: asynckit: 0.4.0 combined-stream: 1.0.8 es-set-tostringtag: 2.1.0 - hasown: 2.0.2 + hasown: 2.0.3 mime-types: 2.1.35 format@0.2.2: {} @@ -9791,19 +9282,19 @@ snapshots: fs-extra@11.1.0: dependencies: graceful-fs: 4.2.11 - jsonfile: 6.2.0 + jsonfile: 6.2.1 universalify: 2.0.1 fs-extra@11.1.1: dependencies: graceful-fs: 4.2.11 - jsonfile: 6.2.0 + jsonfile: 6.2.1 universalify: 2.0.1 fs-extra@11.2.0: dependencies: graceful-fs: 4.2.11 - jsonfile: 6.2.0 + jsonfile: 6.2.1 universalify: 2.0.1 fs-minipass@2.1.0: @@ -9817,26 +9308,15 @@ snapshots: function.prototype.name@1.1.8: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 call-bound: 1.0.4 define-properties: 1.2.1 functions-have-names: 1.2.3 - hasown: 2.0.2 + hasown: 2.0.3 is-callable: 1.2.7 functions-have-names@1.2.3: {} - gaxios@6.7.1: - dependencies: - extend: 3.0.2 - https-proxy-agent: 7.0.6 - is-stream: 2.0.1 - node-fetch: 2.7.0 - uuid: 9.0.1 - transitivePeerDependencies: - - encoding - - supports-color - gaxios@7.1.4: dependencies: extend: 3.0.2 @@ -9847,15 +9327,6 @@ snapshots: gcd@0.0.1: {} - gcp-metadata@6.1.1: - dependencies: - gaxios: 6.7.1 - google-logging-utils: 0.0.2 - json-bigint: 1.0.0 - transitivePeerDependencies: - - encoding - - supports-color - gcp-metadata@8.1.2: dependencies: gaxios: 7.1.4 @@ -9880,7 +9351,7 @@ snapshots: get-proto: 1.0.1 gopd: 1.2.0 has-symbols: 1.1.0 - hasown: 2.0.2 + hasown: 2.0.3 math-intrinsics: 1.1.0 get-nonce@1.0.1: {} @@ -9904,7 +9375,7 @@ snapshots: get-uri@6.0.5: dependencies: - basic-ftp: 5.2.0 + basic-ftp: 5.3.1 data-uri-to-buffer: 6.0.2 debug: 4.4.3 transitivePeerDependencies: @@ -9912,7 +9383,7 @@ snapshots: get-uri@8.0.0: dependencies: - basic-ftp: 5.2.0 + basic-ftp: 5.3.1 data-uri-to-buffer: 8.0.0 debug: 4.4.3 transitivePeerDependencies: @@ -9931,10 +9402,17 @@ snapshots: glob@13.0.6: dependencies: - minimatch: 10.2.4 + minimatch: 10.2.5 minipass: 7.1.3 path-scurry: 2.0.2 + global-agent@4.1.3: + dependencies: + globalthis: 1.0.4 + matcher: 4.0.0 + semver: 7.7.4 + serialize-error: 8.1.0 + globalthis@1.0.4: dependencies: define-properties: 1.2.1 @@ -9951,20 +9429,6 @@ snapshots: transitivePeerDependencies: - supports-color - google-auth-library@9.15.1: - dependencies: - base64-js: 1.5.1 - ecdsa-sig-formatter: 1.0.11 - gaxios: 6.7.1 - gcp-metadata: 6.1.1 - gtoken: 7.1.0 - jws: 4.0.1 - transitivePeerDependencies: - - encoding - - supports-color - - google-logging-utils@0.0.2: {} - google-logging-utils@1.1.3: {} gopd@1.2.0: {} @@ -9999,14 +9463,6 @@ snapshots: graceful-fs@4.2.11: {} - gtoken@7.1.0: - dependencies: - gaxios: 6.7.1 - jws: 4.0.1 - transitivePeerDependencies: - - encoding - - supports-color - has-bigints@1.1.0: {} has-flag@4.0.0: {} @@ -10025,7 +9481,7 @@ snapshots: dependencies: has-symbols: 1.1.0 - hasown@2.0.2: + hasown@2.0.3: dependencies: function-bind: 1.1.2 @@ -10183,7 +9639,7 @@ snapshots: rehype-minify-whitespace: 6.0.2 trim-trailing-lines: 2.1.0 unist-util-position: 5.0.0 - unist-util-visit: 5.1.0 + unist-util-visit: 5.0.0 hast-util-to-string@3.0.1: dependencies: @@ -10212,33 +9668,16 @@ snapshots: highlight.js@10.7.3: {} - hono@4.12.12: {} + hono@4.12.16: {} hosted-git-info@9.0.2: dependencies: - lru-cache: 11.2.6 - - html-escaper@3.0.3: {} + lru-cache: 11.3.5 html-void-elements@3.0.0: {} - htmlparser2@10.1.0: - dependencies: - domelementtype: 2.3.0 - domhandler: 5.0.3 - domutils: 3.2.2 - entities: 7.0.1 - http-cache-semantics@4.2.0: {} - http-errors@2.0.0: - dependencies: - depd: 2.0.0 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 2.0.1 - toidentifier: 1.0.1 - http-errors@2.0.1: dependencies: depd: 2.0.0 @@ -10266,6 +9705,8 @@ snapshots: quick-lru: 5.1.1 resolve-alpn: 1.2.1 + http_ece@1.2.0: {} + https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.4 @@ -10327,7 +9768,7 @@ snapshots: cli-cursor: 4.0.0 cli-truncate: 4.0.0 code-excerpt: 4.0.0 - es-toolkit: 1.45.1 + es-toolkit: 1.46.1 indent-string: 5.0.0 is-in-ci: 2.0.0 patch-console: 2.0.0 @@ -10350,12 +9791,12 @@ snapshots: inline-style-parser@0.2.7: {} - inquirer@12.3.0(@types/node@25.5.2): + inquirer@12.3.0(@types/node@25.6.0): dependencies: - '@inquirer/core': 10.3.2(@types/node@25.5.2) - '@inquirer/prompts': 7.9.0(@types/node@25.5.2) - '@inquirer/type': 3.0.10(@types/node@25.5.2) - '@types/node': 25.5.2 + '@inquirer/core': 10.3.2(@types/node@25.6.0) + '@inquirer/prompts': 7.9.0(@types/node@25.6.0) + '@inquirer/type': 3.0.10(@types/node@25.6.0) + '@types/node': 25.6.0 ansi-escapes: 4.3.2 mute-stream: 2.0.0 run-async: 3.0.0 @@ -10364,11 +9805,13 @@ snapshots: internal-slot@1.1.0: dependencies: es-errors: 1.3.0 - hasown: 2.0.2 + hasown: 2.0.3 side-channel: 1.1.0 ip-address@10.1.0: {} + ip-address@10.2.0: {} + ip-regex@4.3.0: {} ipaddr.js@1.9.1: {} @@ -10384,7 +9827,7 @@ snapshots: is-array-buffer@3.0.5: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 call-bound: 1.0.4 get-intrinsic: 1.3.0 @@ -10417,7 +9860,7 @@ snapshots: is-core-module@2.16.1: dependencies: - hasown: 2.0.2 + hasown: 2.0.3 is-data-view@1.0.2: dependencies: @@ -10495,7 +9938,7 @@ snapshots: call-bound: 1.0.4 gopd: 1.2.0 has-tostringtag: 1.0.2 - hasown: 2.0.2 + hasown: 2.0.3 is-set@2.0.3: {} @@ -10503,8 +9946,6 @@ snapshots: dependencies: call-bound: 1.0.4 - is-stream@2.0.1: {} - is-string@1.1.1: dependencies: call-bound: 1.0.4 @@ -10545,7 +9986,7 @@ snapshots: jiti@2.6.1: {} - jose@6.2.2: {} + jose@6.2.3: {} joycon@3.1.1: {} @@ -10572,7 +10013,7 @@ snapshots: json-schema-to-ts@3.1.1: dependencies: - '@babel/runtime': 7.28.6 + '@babel/runtime': 7.29.2 ts-algebra: 2.0.0 json-schema-traverse@1.0.0: {} @@ -10583,7 +10024,7 @@ snapshots: jsonc-parser@2.2.1: {} - jsonfile@6.2.0: + jsonfile@6.2.1: dependencies: universalify: 2.0.1 optionalDependencies: @@ -10615,7 +10056,7 @@ snapshots: jwa: 2.0.1 safe-buffer: 5.2.1 - katex@0.16.44: + katex@0.16.45: dependencies: commander: 8.3.0 @@ -10629,7 +10070,7 @@ snapshots: dependencies: json-buffer: 3.0.1 - koffi@2.15.1: + koffi@2.16.1: optional: true lcm@0.0.3: @@ -10650,14 +10091,6 @@ snapshots: lines-and-columns@1.2.4: {} - linkedom@0.18.12: - dependencies: - css-select: 5.2.2 - cssom: 0.5.0 - html-escaper: 3.0.3 - htmlparser2: 10.1.0 - uhyphen: 0.2.0 - linkify-it@5.0.0: dependencies: uc.micro: 2.1.0 @@ -10672,7 +10105,7 @@ snapshots: lodash@4.17.21: {} - lodash@4.17.23: {} + lodash@4.18.1: {} long@5.3.2: {} @@ -10684,7 +10117,7 @@ snapshots: lowercase-keys@3.0.0: {} - lru-cache@11.2.6: {} + lru-cache@11.3.5: {} lru-cache@7.18.3: {} @@ -10707,6 +10140,10 @@ snapshots: marked@15.0.12: {} + matcher@4.0.0: + dependencies: + escape-string-regexp: 4.0.0 + math-intrinsics@1.1.0: {} mdast-util-find-and-replace@3.0.2: @@ -10714,7 +10151,7 @@ snapshots: '@types/mdast': 4.0.4 escape-string-regexp: 5.0.0 unist-util-is: 6.0.1 - unist-util-visit-parents: 6.0.2 + unist-util-visit-parents: 6.0.1 mdast-util-from-markdown@2.0.2: dependencies: @@ -10755,7 +10192,7 @@ snapshots: '@types/mdast': 4.0.4 devlop: 1.1.0 escape-string-regexp: 5.0.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 micromark-extension-frontmatter: 2.0.0 transitivePeerDependencies: @@ -10773,7 +10210,7 @@ snapshots: dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 micromark-util-normalize-identifier: 2.0.1 transitivePeerDependencies: @@ -10782,7 +10219,7 @@ snapshots: mdast-util-gfm-strikethrough@2.0.0: dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color @@ -10792,7 +10229,7 @@ snapshots: '@types/mdast': 4.0.4 devlop: 1.1.0 markdown-table: 3.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color @@ -10801,14 +10238,14 @@ snapshots: dependencies: '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color mdast-util-gfm@3.0.0: dependencies: - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-gfm-autolink-literal: 2.0.1 mdast-util-gfm-footnote: 2.1.0 mdast-util-gfm-strikethrough: 2.0.0 @@ -10836,7 +10273,7 @@ snapshots: '@types/mdast': 4.0.4 devlop: 1.1.0 longest-streak: 3.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 unist-util-remove-position: 5.0.0 transitivePeerDependencies: @@ -10848,7 +10285,7 @@ snapshots: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color @@ -10861,7 +10298,7 @@ snapshots: '@types/unist': 3.0.3 ccount: 2.0.1 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 parse-entities: 4.0.2 stringify-entities: 4.0.4 @@ -10889,7 +10326,7 @@ snapshots: mdast-util-mdx@3.0.0: dependencies: - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-mdx-expression: 2.0.1 mdast-util-mdx-jsx: 3.2.0 mdast-util-mdxjs-esm: 2.0.1 @@ -10903,7 +10340,7 @@ snapshots: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 devlop: 1.1.0 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 mdast-util-to-markdown: 2.1.2 transitivePeerDependencies: - supports-color @@ -10922,7 +10359,7 @@ snapshots: micromark-util-sanitize-uri: 2.0.1 trim-lines: 3.0.1 unist-util-position: 5.0.0 - unist-util-visit: 5.1.0 + unist-util-visit: 5.0.0 vfile: 6.0.3 mdast-util-to-markdown@2.1.2: @@ -10934,7 +10371,7 @@ snapshots: mdast-util-to-string: 4.0.0 micromark-util-classify-character: 2.0.1 micromark-util-decode-string: 2.0.1 - unist-util-visit: 5.1.0 + unist-util-visit: 5.0.0 zwitch: 2.0.4 mdast-util-to-string@4.0.0: @@ -10947,7 +10384,7 @@ snapshots: media-typer@1.1.0: {} - merge-descriptors@1.0.1: {} + merge-descriptors@1.0.3: {} merge-descriptors@2.0.0: {} @@ -11043,7 +10480,7 @@ snapshots: dependencies: '@types/katex': 0.16.8 devlop: 1.1.0 - katex: 0.16.44 + katex: 0.16.45 micromark-factory-space: 2.0.1 micromark-util-character: 2.1.1 micromark-util-symbol: 2.0.1 @@ -11092,8 +10529,8 @@ snapshots: micromark-extension-mdxjs@3.0.0: dependencies: - acorn: 8.16.0 - acorn-jsx: 5.3.2(acorn@8.16.0) + acorn: 8.11.2 + acorn-jsx: 5.3.2(acorn@8.11.2) micromark-extension-mdx-expression: 3.0.1 micromark-extension-mdx-jsx: 3.0.1 micromark-extension-mdx-md: 2.0.0 @@ -11262,16 +10699,17 @@ snapshots: mimic-response@4.0.0: {} - minimatch@10.2.4: + minimalistic-assert@1.0.1: {} + + minimatch@10.2.5: dependencies: - brace-expansion: 5.0.4 + brace-expansion: 5.0.5 - minimatch@3.1.2: + minimatch@3.1.5: dependencies: - brace-expansion: 1.1.13 + brace-expansion: 1.1.14 - minimist@1.2.8: - optional: true + minimist@1.2.8: {} minipass@3.3.6: dependencies: @@ -11297,12 +10735,12 @@ snapshots: mkdirp@1.0.4: {} - mlly@1.8.0: + mlly@1.8.2: dependencies: acorn: 8.16.0 pathe: 2.0.3 pkg-types: 1.3.1 - ufo: 1.6.3 + ufo: 1.6.4 ms@2.0.0: {} @@ -11316,7 +10754,7 @@ snapshots: object-assign: 4.1.1 thenify-all: 1.6.0 - nanoid@3.3.11: {} + nanoid@3.3.12: {} napi-build-utils@2.0.0: optional: true @@ -11327,16 +10765,16 @@ snapshots: neotraverse@0.6.18: {} - netmask@2.0.2: {} + netmask@2.1.1: {} - next-mdx-remote-client@1.1.6(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(unified@11.0.5): + next-mdx-remote-client@1.1.7(@types/react@19.2.14)(react-dom@18.3.1(react@19.2.3))(react@19.2.3)(unified@11.0.5): dependencies: '@babel/code-frame': 7.29.0 '@mdx-js/mdx': 3.1.1 '@mdx-js/react': 3.1.1(@types/react@19.2.14)(react@19.2.3) react: 19.2.3 react-dom: 18.3.1(react@19.2.3) - remark-mdx-remove-esm: 1.2.3(unified@11.0.5) + remark-mdx-remove-esm: 1.3.1(unified@11.0.5) serialize-error: 13.0.1 vfile: 6.0.3 vfile-matter: 5.0.1 @@ -11361,12 +10799,14 @@ snapshots: node-abi@3.89.0: dependencies: - semver: 7.7.4 + semver: 7.7.2 optional: true node-addon-api@4.3.0: optional: true + node-addon-api@8.7.0: {} + node-domexception@1.0.0: {} node-fetch@2.6.7: @@ -11383,20 +10823,13 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 - node-readable-to-web-readable-stream@0.4.2: - optional: true - non-error@0.1.0: {} normalize-path@3.0.0: {} normalize-url@8.1.1: {} - nth-check@2.1.1: - dependencies: - boolbase: 1.0.0 - - oauth4webapi@3.8.5: {} + oauth4webapi@3.8.6: {} object-assign@4.1.1: {} @@ -11408,7 +10841,7 @@ snapshots: object.assign@4.1.7: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 call-bound: 1.0.4 define-properties: 1.2.1 es-object-atoms: 1.1.1 @@ -11429,11 +10862,11 @@ snapshots: dependencies: mimic-fn: 2.1.0 - oniguruma-parser@0.12.1: {} + oniguruma-parser@0.12.2: {} - oniguruma-to-es@4.3.5: + oniguruma-to-es@4.3.6: dependencies: - oniguruma-parser: 0.12.1 + oniguruma-parser: 0.12.2 regex: 6.1.0 regex-recursion: 6.0.2 @@ -11448,55 +10881,47 @@ snapshots: ws: 8.20.0 zod: 4.3.6 - openai@6.34.0(ws@8.20.0)(zod@4.3.6): + openai@6.35.0(ws@8.20.0)(zod@4.3.6): optionalDependencies: ws: 8.20.0 zod: 4.3.6 openapi-types@12.1.3: {} - openclaw@2026.4.23(@napi-rs/canvas@0.1.97): + openclaw@2026.4.29: dependencies: - '@agentclientprotocol/sdk': 0.19.0(zod@4.3.6) - '@anthropic-ai/vertex-sdk': 0.16.0(zod@4.3.6) - '@clack/prompts': 1.2.0 - '@homebridge/ciao': 1.3.6 + '@agentclientprotocol/sdk': 0.21.0(zod@4.3.6) + '@clack/prompts': 1.3.0 '@lydell/node-pty': 1.2.0-beta.12 - '@mariozechner/pi-agent-core': 0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) - '@mariozechner/pi-ai': 0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) - '@mariozechner/pi-coding-agent': 0.70.0(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) - '@mariozechner/pi-tui': 0.70.0 + '@mariozechner/pi-agent-core': 0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + '@mariozechner/pi-ai': 0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + '@mariozechner/pi-coding-agent': 0.70.6(@modelcontextprotocol/sdk@1.29.0(zod@4.3.6))(ws@8.20.0)(zod@4.3.6) + '@mariozechner/pi-tui': 0.70.6 '@modelcontextprotocol/sdk': 1.29.0(zod@4.3.6) - '@mozilla/readability': 0.6.0 - '@napi-rs/canvas': 0.1.97 - '@vincentkoc/qrcode-tui': 0.2.1 - ajv: 8.18.0 + ajv: 8.20.0 chalk: 5.6.2 chokidar: 5.0.0 - cli-highlight: 2.1.11 commander: 14.0.3 croner: 10.0.1 dotenv: 17.4.2 - express: 5.2.1 file-type: 22.0.1 + global-agent: 4.1.3 https-proxy-agent: 9.0.0 ipaddr.js: 2.3.0 jiti: 2.6.1 json5: 2.2.3 jszip: 3.10.1 - linkedom: 0.18.12 markdown-it: 14.1.1 - openai: 6.34.0(ws@8.20.0)(zod@4.3.6) - osc-progress: 0.3.0 - pdfjs-dist: 5.6.205 + openai: 6.35.0(ws@8.20.0)(zod@4.3.6) proxy-agent: 8.0.1 + qrcode: 1.5.4 semver: 7.7.4 - sharp: 0.34.5 sqlite-vec: 0.1.9 tar: 7.5.13 tslog: 4.10.2 - typebox: 1.1.28 + typebox: 1.1.34 undici: 8.1.0 + web-push: 3.6.7 ws: 8.20.0 yaml: 2.8.3 zod: 4.3.6 @@ -11504,17 +10929,13 @@ snapshots: - '@cfworker/json-schema' - aws-crt - bufferutil - - canvas - - encoding - supports-color - utf-8-validate - openid-client@6.8.2: + openid-client@6.8.4: dependencies: - jose: 6.2.2 - oauth4webapi: 3.8.5 - - osc-progress@0.3.0: {} + jose: 6.2.3 + oauth4webapi: 3.8.6 own-keys@1.0.1: dependencies: @@ -11580,12 +11001,12 @@ snapshots: pac-resolver@7.0.1: dependencies: degenerator: 5.0.1 - netmask: 2.0.2 + netmask: 2.1.1 pac-resolver@9.0.1(quickjs-wasi@2.2.0): dependencies: degenerator: 7.0.1(quickjs-wasi@2.2.0) - netmask: 2.0.2 + netmask: 2.1.1 quickjs-wasi: 2.2.0 pako@1.0.11: {} @@ -11640,7 +11061,7 @@ snapshots: path-exists@4.0.0: {} - path-expression-matcher@1.2.0: {} + path-expression-matcher@1.5.0: {} path-key@3.1.1: {} @@ -11648,27 +11069,22 @@ snapshots: path-scurry@2.0.2: dependencies: - lru-cache: 11.2.6 + lru-cache: 11.3.5 minipass: 7.1.3 - path-to-regexp@0.1.7: {} + path-to-regexp@0.1.13: {} - path-to-regexp@8.3.0: {} + path-to-regexp@8.4.2: {} pathe@2.0.3: {} - pdfjs-dist@5.6.205: - optionalDependencies: - '@napi-rs/canvas': 0.1.97 - node-readable-to-web-readable-stream: 0.4.2 - pend@1.2.0: {} picocolors@1.1.1: {} picomatch@2.3.2: {} - picomatch@4.0.3: {} + picomatch@4.0.4: {} pify@2.3.0: {} @@ -11679,7 +11095,7 @@ snapshots: pkg-types@1.3.1: dependencies: confbox: 0.1.8 - mlly: 1.8.0 + mlly: 1.8.2 pathe: 2.0.3 pngjs@5.0.0: {} @@ -11693,7 +11109,7 @@ snapshots: postcss: 8.5.6 postcss-value-parser: 4.2.0 read-cache: 1.0.0 - resolve: 1.22.11 + resolve: 1.22.12 postcss-js@4.1.0(postcss@8.5.6): dependencies: @@ -11727,9 +11143,15 @@ snapshots: postcss-value-parser@4.2.0: {} + postcss@8.5.13: + dependencies: + nanoid: 3.3.12 + picocolors: 1.1.1 + source-map-js: 1.2.1 + postcss@8.5.6: dependencies: - nanoid: 3.3.11 + nanoid: 3.3.12 picocolors: 1.1.1 source-map-js: 1.2.1 @@ -11767,18 +11189,18 @@ snapshots: property-information@7.1.0: {} - protobufjs@7.5.4: + protobufjs@7.5.6: dependencies: '@protobufjs/aspromise': 1.1.2 '@protobufjs/base64': 1.1.2 - '@protobufjs/codegen': 2.0.4 + '@protobufjs/codegen': 2.0.5 '@protobufjs/eventemitter': 1.1.0 '@protobufjs/fetch': 1.1.0 '@protobufjs/float': 1.0.2 - '@protobufjs/inquire': 1.1.0 + '@protobufjs/inquire': 1.1.1 '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 - '@protobufjs/utf8': 1.1.0 + '@protobufjs/utf8': 1.1.1 '@types/node': 25.6.0 long: 5.3.2 @@ -11845,10 +11267,10 @@ snapshots: - supports-color - utf-8-validate - puppeteer@22.14.0(typescript@5.9.3): + puppeteer@22.14.0(typescript@6.0.3): dependencies: '@puppeteer/browsers': 2.3.0 - cosmiconfig: 9.0.1(typescript@5.9.3) + cosmiconfig: 9.0.1(typescript@6.0.3) devtools-protocol: 0.0.1312386 puppeteer-core: 22.14.0 transitivePeerDependencies: @@ -11866,11 +11288,11 @@ snapshots: pngjs: 5.0.0 yargs: 15.4.1 - qs@6.11.0: + qs@6.14.2: dependencies: side-channel: 1.1.0 - qs@6.15.0: + qs@6.15.1: dependencies: side-channel: 1.1.0 @@ -11882,10 +11304,10 @@ snapshots: range-parser@1.2.1: {} - raw-body@2.5.1: + raw-body@2.5.3: dependencies: bytes: 3.1.2 - http-errors: 2.0.0 + http-errors: 2.0.1 iconv-lite: 0.4.24 unpipe: 1.0.0 @@ -11961,7 +11383,7 @@ snapshots: readable-stream@3.6.2: dependencies: inherits: 2.0.4 - string_decoder: 1.1.1 + string_decoder: 1.3.0 util-deprecate: 1.0.2 optional: true @@ -12004,9 +11426,9 @@ snapshots: reflect.getprototypeof@1.0.10: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 define-properties: 1.2.1 - es-abstract: 1.24.1 + es-abstract: 1.24.2 es-errors: 1.3.0 es-object-atoms: 1.1.1 get-intrinsic: 1.3.0 @@ -12025,7 +11447,7 @@ snapshots: regexp.prototype.flags@1.5.4: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 define-properties: 1.2.1 es-errors: 1.3.0 get-proto: 1.0.1 @@ -12038,7 +11460,7 @@ snapshots: '@types/katex': 0.16.8 hast-util-from-html-isomorphic: 2.0.0 hast-util-to-text: 4.0.2 - katex: 0.16.44 + katex: 0.16.45 unist-util-visit-parents: 6.0.2 vfile: 6.0.3 @@ -12064,7 +11486,7 @@ snapshots: rehype-stringify@10.0.1: dependencies: '@types/hast': 3.0.4 - hast-util-to-html: 9.0.5 + hast-util-to-html: 9.0.4 unified: 11.0.5 remark-frontmatter@5.0.0: @@ -12077,6 +11499,17 @@ snapshots: - supports-color remark-gfm@4.0.0: + dependencies: + '@types/mdast': 4.0.4 + mdast-util-gfm: 3.0.0 + micromark-extension-gfm: 3.0.0 + remark-parse: 11.0.0 + remark-stringify: 11.0.0 + unified: 11.0.5 + transitivePeerDependencies: + - supports-color + + remark-gfm@4.0.1: dependencies: '@types/mdast': 4.0.4 mdast-util-gfm: 3.1.0 @@ -12096,7 +11529,7 @@ snapshots: transitivePeerDependencies: - supports-color - remark-mdx-remove-esm@1.2.3(unified@11.0.5): + remark-mdx-remove-esm@1.3.1(unified@11.0.5): dependencies: '@types/mdast': 4.0.4 mdast-util-mdxjs-esm: 2.0.1 @@ -12119,10 +11552,17 @@ snapshots: transitivePeerDependencies: - supports-color + remark-mdx@3.1.1: + dependencies: + mdast-util-mdx: 3.0.0 + micromark-extension-mdxjs: 3.0.0 + transitivePeerDependencies: + - supports-color + remark-parse@11.0.0: dependencies: '@types/mdast': 4.0.4 - mdast-util-from-markdown: 2.0.3 + mdast-util-from-markdown: 2.0.2 micromark-util-types: 2.0.2 unified: 11.0.5 transitivePeerDependencies: @@ -12136,12 +11576,20 @@ snapshots: unified: 11.0.5 vfile: 6.0.3 + remark-rehype@11.1.2: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + mdast-util-to-hast: 13.2.1 + unified: 11.0.5 + vfile: 6.0.3 + remark-smartypants@3.0.2: dependencies: retext: 9.0.0 retext-smartypants: 6.2.0 unified: 11.0.5 - unist-util-visit: 5.1.0 + unist-util-visit: 5.0.0 remark-stringify@11.0.0: dependencies: @@ -12170,8 +11618,9 @@ snapshots: resolve-from@5.0.0: {} - resolve@1.22.11: + resolve@1.22.12: dependencies: + es-errors: 1.3.0 is-core-module: 2.16.1 path-parse: 1.0.7 supports-preserve-symlinks-flag: 1.0.0 @@ -12195,7 +11644,7 @@ snapshots: dependencies: '@types/nlcst': 2.0.3 nlcst-to-string: 4.0.0 - unist-util-visit: 5.1.0 + unist-util-visit: 5.0.0 retext-stringify@4.0.0: dependencies: @@ -12216,35 +11665,35 @@ snapshots: reusify@1.1.0: {} - rollup@4.59.0: + rollup@4.60.2: dependencies: '@types/estree': 1.0.8 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.59.0 - '@rollup/rollup-android-arm64': 4.59.0 - '@rollup/rollup-darwin-arm64': 4.59.0 - '@rollup/rollup-darwin-x64': 4.59.0 - '@rollup/rollup-freebsd-arm64': 4.59.0 - '@rollup/rollup-freebsd-x64': 4.59.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.59.0 - '@rollup/rollup-linux-arm-musleabihf': 4.59.0 - '@rollup/rollup-linux-arm64-gnu': 4.59.0 - '@rollup/rollup-linux-arm64-musl': 4.59.0 - '@rollup/rollup-linux-loong64-gnu': 4.59.0 - '@rollup/rollup-linux-loong64-musl': 4.59.0 - '@rollup/rollup-linux-ppc64-gnu': 4.59.0 - '@rollup/rollup-linux-ppc64-musl': 4.59.0 - '@rollup/rollup-linux-riscv64-gnu': 4.59.0 - '@rollup/rollup-linux-riscv64-musl': 4.59.0 - '@rollup/rollup-linux-s390x-gnu': 4.59.0 - '@rollup/rollup-linux-x64-gnu': 4.59.0 - '@rollup/rollup-linux-x64-musl': 4.59.0 - '@rollup/rollup-openbsd-x64': 4.59.0 - '@rollup/rollup-openharmony-arm64': 4.59.0 - '@rollup/rollup-win32-arm64-msvc': 4.59.0 - '@rollup/rollup-win32-ia32-msvc': 4.59.0 - '@rollup/rollup-win32-x64-gnu': 4.59.0 - '@rollup/rollup-win32-x64-msvc': 4.59.0 + '@rollup/rollup-android-arm-eabi': 4.60.2 + '@rollup/rollup-android-arm64': 4.60.2 + '@rollup/rollup-darwin-arm64': 4.60.2 + '@rollup/rollup-darwin-x64': 4.60.2 + '@rollup/rollup-freebsd-arm64': 4.60.2 + '@rollup/rollup-freebsd-x64': 4.60.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.60.2 + '@rollup/rollup-linux-arm-musleabihf': 4.60.2 + '@rollup/rollup-linux-arm64-gnu': 4.60.2 + '@rollup/rollup-linux-arm64-musl': 4.60.2 + '@rollup/rollup-linux-loong64-gnu': 4.60.2 + '@rollup/rollup-linux-loong64-musl': 4.60.2 + '@rollup/rollup-linux-ppc64-gnu': 4.60.2 + '@rollup/rollup-linux-ppc64-musl': 4.60.2 + '@rollup/rollup-linux-riscv64-gnu': 4.60.2 + '@rollup/rollup-linux-riscv64-musl': 4.60.2 + '@rollup/rollup-linux-s390x-gnu': 4.60.2 + '@rollup/rollup-linux-x64-gnu': 4.60.2 + '@rollup/rollup-linux-x64-musl': 4.60.2 + '@rollup/rollup-openbsd-x64': 4.60.2 + '@rollup/rollup-openharmony-arm64': 4.60.2 + '@rollup/rollup-win32-arm64-msvc': 4.60.2 + '@rollup/rollup-win32-ia32-msvc': 4.60.2 + '@rollup/rollup-win32-x64-gnu': 4.60.2 + '@rollup/rollup-win32-x64-msvc': 4.60.2 fsevents: 2.3.3 router@2.2.0: @@ -12253,7 +11702,7 @@ snapshots: depd: 2.0.0 is-promise: 4.0.0 parseurl: 1.3.3 - path-to-regexp: 8.3.0 + path-to-regexp: 8.4.2 transitivePeerDependencies: - supports-color @@ -12267,9 +11716,9 @@ snapshots: dependencies: tslib: 2.8.1 - safe-array-concat@1.1.3: + safe-array-concat@1.1.4: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 call-bound: 1.0.4 get-intrinsic: 1.3.0 has-symbols: 1.1.0 @@ -12306,21 +11755,21 @@ snapshots: semver@7.7.4: {} - send@0.18.0: + send@0.19.2: dependencies: debug: 2.6.9 depd: 2.0.0 destroy: 1.2.0 - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 fresh: 0.5.2 - http-errors: 2.0.0 + http-errors: 2.0.1 mime: 1.6.0 ms: 2.1.3 on-finished: 2.4.1 range-parser: 1.2.1 - statuses: 2.0.1 + statuses: 2.0.2 transitivePeerDependencies: - supports-color @@ -12343,14 +11792,18 @@ snapshots: serialize-error@13.0.1: dependencies: non-error: 0.1.0 - type-fest: 5.5.0 + type-fest: 5.6.0 + + serialize-error@8.1.0: + dependencies: + type-fest: 0.20.2 - serve-static@1.15.0: + serve-static@1.16.3: dependencies: - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.18.0 + send: 0.19.2 transitivePeerDependencies: - supports-color @@ -12395,13 +11848,13 @@ snapshots: dependencies: decode-ico: 0.4.1 ico-endec: 0.1.6 - sharp: 0.34.5 + sharp: 0.33.5 sharp@0.33.5: dependencies: color: 4.2.3 detect-libc: 2.1.2 - semver: 7.7.4 + semver: 7.7.2 optionalDependencies: '@img/sharp-darwin-arm64': 0.33.5 '@img/sharp-darwin-x64': 0.33.5 @@ -12423,37 +11876,6 @@ snapshots: '@img/sharp-win32-ia32': 0.33.5 '@img/sharp-win32-x64': 0.33.5 - sharp@0.34.5: - dependencies: - '@img/colour': 1.1.0 - detect-libc: 2.1.2 - semver: 7.7.4 - optionalDependencies: - '@img/sharp-darwin-arm64': 0.34.5 - '@img/sharp-darwin-x64': 0.34.5 - '@img/sharp-libvips-darwin-arm64': 1.2.4 - '@img/sharp-libvips-darwin-x64': 1.2.4 - '@img/sharp-libvips-linux-arm': 1.2.4 - '@img/sharp-libvips-linux-arm64': 1.2.4 - '@img/sharp-libvips-linux-ppc64': 1.2.4 - '@img/sharp-libvips-linux-riscv64': 1.2.4 - '@img/sharp-libvips-linux-s390x': 1.2.4 - '@img/sharp-libvips-linux-x64': 1.2.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 - '@img/sharp-libvips-linuxmusl-x64': 1.2.4 - '@img/sharp-linux-arm': 0.34.5 - '@img/sharp-linux-arm64': 0.34.5 - '@img/sharp-linux-ppc64': 0.34.5 - '@img/sharp-linux-riscv64': 0.34.5 - '@img/sharp-linux-s390x': 0.34.5 - '@img/sharp-linux-x64': 0.34.5 - '@img/sharp-linuxmusl-arm64': 0.34.5 - '@img/sharp-linuxmusl-x64': 0.34.5 - '@img/sharp-wasm32': 0.34.5 - '@img/sharp-win32-arm64': 0.34.5 - '@img/sharp-win32-ia32': 0.34.5 - '@img/sharp-win32-x64': 0.34.5 - shebang-command@2.0.0: dependencies: shebang-regex: 3.0.0 @@ -12471,7 +11893,7 @@ snapshots: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 - side-channel-list@1.0.0: + side-channel-list@1.0.1: dependencies: es-errors: 1.3.0 object-inspect: 1.13.4 @@ -12495,7 +11917,7 @@ snapshots: dependencies: es-errors: 1.3.0 object-inspect: 1.13.4 - side-channel-list: 1.0.0 + side-channel-list: 1.0.1 side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 @@ -12508,10 +11930,6 @@ snapshots: simple-concat@1.0.1: optional: true - simple-eval@1.0.1: - dependencies: - jsep: 1.4.0 - simple-get@4.0.1: dependencies: decompress-response: 6.0.0 @@ -12523,6 +11941,15 @@ snapshots: dependencies: is-arrayish: 0.3.4 + simplex-chat@6.5.0: + dependencies: + '@simplex-chat/types': 0.5.0 + extract-zip: 2.0.1 + fast-deep-equal: 3.1.3 + node-addon-api: 8.7.0 + transitivePeerDependencies: + - supports-color + sisteransi@1.0.5: {} slice-ansi@5.0.0: @@ -12553,13 +11980,13 @@ snapshots: transitivePeerDependencies: - supports-color - socket.io@4.7.2: + socket.io@4.8.0: dependencies: accepts: 1.3.8 base64id: 2.0.0 cors: 2.8.6 debug: 4.3.7 - engine.io: 6.5.5 + engine.io: 6.6.7 socket.io-adapter: 2.5.6 socket.io-parser: 4.2.6 transitivePeerDependencies: @@ -12571,7 +11998,7 @@ snapshots: dependencies: agent-base: 9.0.0 debug: 4.4.3 - socks: 2.8.7 + socks: 2.8.8 transitivePeerDependencies: - supports-color @@ -12579,23 +12006,19 @@ snapshots: dependencies: agent-base: 7.1.4 debug: 4.4.3 - socks: 2.8.7 + socks: 2.8.8 transitivePeerDependencies: - supports-color - socks@2.8.7: + socks@2.8.8: dependencies: - ip-address: 10.1.0 + ip-address: 10.2.0 smart-buffer: 4.2.0 source-map-js@1.2.1: {} - source-map-support@0.5.21: - dependencies: - buffer-from: 1.1.2 - source-map: 0.6.1 - - source-map@0.6.1: {} + source-map@0.6.1: + optional: true source-map@0.7.6: {} @@ -12632,13 +12055,11 @@ snapshots: stackback@0.0.2: {} - statuses@2.0.1: {} - statuses@2.0.2: {} std-env@3.10.0: {} - std-env@4.0.0: {} + std-env@4.1.0: {} stop-iteration-iterator@1.1.0: dependencies: @@ -12668,24 +12089,24 @@ snapshots: string.prototype.trim@1.2.10: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 call-bound: 1.0.4 define-data-property: 1.1.4 define-properties: 1.2.1 - es-abstract: 1.24.1 + es-abstract: 1.24.2 es-object-atoms: 1.1.1 has-property-descriptors: 1.0.2 string.prototype.trimend@1.0.9: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 call-bound: 1.0.4 define-properties: 1.2.1 es-object-atoms: 1.1.1 string.prototype.trimstart@1.0.8: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 define-properties: 1.2.1 es-object-atoms: 1.1.1 @@ -12693,6 +12114,11 @@ snapshots: dependencies: safe-buffer: 5.1.2 + string_decoder@1.3.0: + dependencies: + safe-buffer: 5.2.1 + optional: true + stringify-entities@4.0.4: dependencies: character-entities-html4: 2.1.0 @@ -12709,7 +12135,7 @@ snapshots: strip-json-comments@2.0.1: optional: true - strnum@2.2.0: {} + strnum@2.2.3: {} strtok3@10.3.5: dependencies: @@ -12730,7 +12156,7 @@ snapshots: lines-and-columns: 1.2.4 mz: 2.7.0 pirates: 4.0.7 - tinyglobby: 0.2.15 + tinyglobby: 0.2.16 ts-interface-checker: 0.1.13 supports-color@7.2.0: @@ -12763,7 +12189,7 @@ snapshots: postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.6)(yaml@2.8.3) postcss-nested: 6.2.0(postcss@8.5.6) postcss-selector-parser: 6.1.2 - resolve: 1.22.11 + resolve: 1.22.12 sucrase: 3.35.1 transitivePeerDependencies: - tsx @@ -12791,7 +12217,7 @@ snapshots: postcss-load-config: 4.0.2(postcss@8.5.6) postcss-nested: 6.2.0(postcss@8.5.6) postcss-selector-parser: 6.1.2 - resolve: 1.22.11 + resolve: 1.22.12 sucrase: 3.35.1 transitivePeerDependencies: - ts-node @@ -12807,9 +12233,9 @@ snapshots: tar-fs@3.1.2: dependencies: pump: 3.0.4 - tar-stream: 3.1.8 + tar-stream: 3.2.0 optionalDependencies: - bare-fs: 4.5.6 + bare-fs: 4.7.1 bare-path: 3.0.0 transitivePeerDependencies: - bare-abort-controller @@ -12825,10 +12251,10 @@ snapshots: readable-stream: 3.6.2 optional: true - tar-stream@3.1.8: + tar-stream@3.2.0: dependencies: - b4a: 1.8.0 - bare-fs: 4.5.6 + b4a: 1.8.1 + bare-fs: 4.7.1 fast-fifo: 1.3.2 streamx: 2.25.0 transitivePeerDependencies: @@ -12862,7 +12288,7 @@ snapshots: text-decoder@1.2.7: dependencies: - b4a: 1.8.0 + b4a: 1.8.1 transitivePeerDependencies: - react-native-b4a @@ -12880,12 +12306,12 @@ snapshots: tinyexec@0.3.2: {} - tinyexec@1.0.4: {} + tinyexec@1.1.2: {} - tinyglobby@0.2.15: + tinyglobby@0.2.16: dependencies: - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 tinyrainbow@3.1.0: {} @@ -12899,7 +12325,7 @@ snapshots: token-types@6.1.2: dependencies: - '@borewit/text-codec': 0.2.1 + '@borewit/text-codec': 0.2.2 '@tokenizer/token': 0.3.0 ieee754: 1.2.1 @@ -12923,28 +12349,28 @@ snapshots: tslog@4.10.2: {} - tsup@8.5.1(jiti@1.21.7)(postcss@8.5.6)(typescript@5.9.3)(yaml@2.8.3): + tsup@8.5.1(jiti@1.21.7)(postcss@8.5.6)(typescript@6.0.3)(yaml@2.8.3): dependencies: - bundle-require: 5.1.0(esbuild@0.27.3) + bundle-require: 5.1.0(esbuild@0.27.7) cac: 6.7.14 chokidar: 4.0.3 consola: 3.4.2 debug: 4.4.3 - esbuild: 0.27.3 + esbuild: 0.27.7 fix-dts-default-cjs-exports: 1.0.1 joycon: 3.1.1 picocolors: 1.1.1 postcss-load-config: 6.0.1(jiti@1.21.7)(postcss@8.5.6)(yaml@2.8.3) resolve-from: 5.0.0 - rollup: 4.59.0 + rollup: 4.60.2 source-map: 0.7.6 sucrase: 3.35.1 tinyexec: 0.3.2 - tinyglobby: 0.2.15 + tinyglobby: 0.2.16 tree-kill: 1.2.2 optionalDependencies: postcss: 8.5.6 - typescript: 5.9.3 + typescript: 6.0.3 transitivePeerDependencies: - jiti - supports-color @@ -12956,21 +12382,23 @@ snapshots: safe-buffer: 5.2.1 optional: true - twoslash-protocol@0.3.6: {} + twoslash-protocol@0.3.8: {} - twoslash@0.3.6(typescript@5.9.3): + twoslash@0.3.8(typescript@6.0.3): dependencies: - '@typescript/vfs': 1.6.4(typescript@5.9.3) - twoslash-protocol: 0.3.6 - typescript: 5.9.3 + '@typescript/vfs': 1.6.4(typescript@6.0.3) + twoslash-protocol: 0.3.8 + typescript: 6.0.3 transitivePeerDependencies: - supports-color + type-fest@0.20.2: {} + type-fest@0.21.3: {} type-fest@4.41.0: {} - type-fest@5.5.0: + type-fest@5.6.0: dependencies: tagged-tag: 1.0.0 @@ -12985,7 +12413,7 @@ snapshots: media-typer: 1.1.0 mime-types: 3.0.2 - typebox@1.1.28: {} + typebox@1.1.34: {} typed-array-buffer@1.0.3: dependencies: @@ -12995,7 +12423,7 @@ snapshots: typed-array-byte-length@1.0.3: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 for-each: 0.3.5 gopd: 1.2.0 has-proto: 1.2.0 @@ -13004,7 +12432,7 @@ snapshots: typed-array-byte-offset@1.0.4: dependencies: available-typed-arrays: 1.0.7 - call-bind: 1.0.8 + call-bind: 1.0.9 for-each: 0.3.5 gopd: 1.2.0 has-proto: 1.2.0 @@ -13013,7 +12441,7 @@ snapshots: typed-array-length@1.0.7: dependencies: - call-bind: 1.0.8 + call-bind: 1.0.9 for-each: 0.3.5 gopd: 1.2.0 is-typed-array: 1.1.15 @@ -13022,11 +12450,11 @@ snapshots: typescript@5.9.3: {} - uc.micro@2.1.0: {} + typescript@6.0.3: {} - ufo@1.6.3: {} + uc.micro@2.1.0: {} - uhyphen@0.2.0: {} + ufo@1.6.4: {} uint8array-extras@1.5.0: {} @@ -13042,11 +12470,9 @@ snapshots: buffer: 5.7.1 through: 2.3.8 - undici-types@7.18.2: {} - undici-types@7.19.2: {} - undici@7.24.6: {} + undici@7.25.0: {} undici@8.1.0: {} @@ -13097,13 +12523,13 @@ snapshots: unist-util-remove-position@5.0.0: dependencies: '@types/unist': 3.0.3 - unist-util-visit: 5.1.0 + unist-util-visit: 5.0.0 unist-util-remove@4.0.0: dependencies: '@types/unist': 3.0.3 unist-util-is: 6.0.1 - unist-util-visit-parents: 6.0.2 + unist-util-visit-parents: 6.0.1 unist-util-stringify-position@4.0.0: dependencies: @@ -13140,12 +12566,6 @@ snapshots: unist-util-is: 6.0.1 unist-util-visit-parents: 6.0.2 - unist-util-visit@5.1.0: - dependencies: - '@types/unist': 3.0.3 - unist-util-is: 6.0.1 - unist-util-visit-parents: 6.0.2 - universalify@2.0.1: {} unpipe@1.0.0: {} @@ -13179,8 +12599,6 @@ snapshots: uuid@14.0.0: {} - uuid@9.0.1: {} - vary@1.1.2: {} vfile-location@5.0.3: @@ -13203,49 +12621,59 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.3 - vite@7.3.1(@types/node@25.5.2)(jiti@1.21.7)(yaml@2.8.3): + vite@7.3.1(@types/node@25.6.0)(jiti@1.21.7)(yaml@2.8.3): dependencies: - esbuild: 0.27.3 - fdir: 6.5.0(picomatch@4.0.3) - picomatch: 4.0.3 - postcss: 8.5.6 - rollup: 4.59.0 - tinyglobby: 0.2.15 + esbuild: 0.27.7 + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 + postcss: 8.5.13 + rollup: 4.60.2 + tinyglobby: 0.2.16 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 fsevents: 2.3.3 jiti: 1.21.7 yaml: 2.8.3 - vitest@4.1.2(@types/node@25.5.2)(vite@7.3.1(@types/node@25.5.2)(jiti@1.21.7)(yaml@2.8.3)): + vitest@4.1.5(@types/node@25.6.0)(vite@7.3.1(@types/node@25.6.0)(jiti@1.21.7)(yaml@2.8.3)): dependencies: - '@vitest/expect': 4.1.2 - '@vitest/mocker': 4.1.2(vite@7.3.1(@types/node@25.5.2)(jiti@1.21.7)(yaml@2.8.3)) - '@vitest/pretty-format': 4.1.2 - '@vitest/runner': 4.1.2 - '@vitest/snapshot': 4.1.2 - '@vitest/spy': 4.1.2 - '@vitest/utils': 4.1.2 - es-module-lexer: 2.0.0 + '@vitest/expect': 4.1.5 + '@vitest/mocker': 4.1.5(vite@7.3.1(@types/node@25.6.0)(jiti@1.21.7)(yaml@2.8.3)) + '@vitest/pretty-format': 4.1.5 + '@vitest/runner': 4.1.5 + '@vitest/snapshot': 4.1.5 + '@vitest/spy': 4.1.5 + '@vitest/utils': 4.1.5 + es-module-lexer: 2.1.0 expect-type: 1.3.0 magic-string: 0.30.21 obug: 2.1.1 pathe: 2.0.3 - picomatch: 4.0.3 - std-env: 4.0.0 + picomatch: 4.0.4 + std-env: 4.1.0 tinybench: 2.9.0 - tinyexec: 1.0.4 - tinyglobby: 0.2.15 + tinyexec: 1.1.2 + tinyglobby: 0.2.16 tinyrainbow: 3.1.0 - vite: 7.3.1(@types/node@25.5.2)(jiti@1.21.7)(yaml@2.8.3) + vite: 7.3.1(@types/node@25.6.0)(jiti@1.21.7)(yaml@2.8.3) why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 25.5.2 + '@types/node': 25.6.0 transitivePeerDependencies: - msw web-namespaces@2.0.1: {} + web-push@3.6.7: + dependencies: + asn1.js: 5.4.1 + http_ece: 1.2.0 + https-proxy-agent: 7.0.6 + jws: 4.0.1 + minimist: 1.2.8 + transitivePeerDependencies: + - supports-color + web-streams-polyfill@3.3.3: {} webidl-conversions@3.0.1: {} @@ -13291,7 +12719,7 @@ snapshots: which-typed-array@1.1.20: dependencies: available-typed-arrays: 1.0.7 - call-bind: 1.0.8 + call-bind: 1.0.9 call-bound: 1.0.4 for-each: 0.3.5 get-proto: 1.0.1 @@ -13331,8 +12759,6 @@ snapshots: wrappy@1.0.2: {} - ws@8.17.1: {} - ws@8.18.3: {} ws@8.20.0: {} @@ -13431,7 +12857,7 @@ snapshots: dependencies: zod: 3.24.0 - zod-to-json-schema@3.25.1(zod@4.3.6): + zod-to-json-schema@3.25.2(zod@4.3.6): dependencies: zod: 4.3.6 diff --git a/scripts/write-plugin-manifest.mjs b/scripts/write-plugin-manifest.mjs index a08c773..b347d93 100644 --- a/scripts/write-plugin-manifest.mjs +++ b/scripts/write-plugin-manifest.mjs @@ -21,10 +21,7 @@ const channelSchema = channelPlugin?.configSchema; const existingChannelConfig = manifest.channelConfigs?.[channelId] ?? {}; function mergeUiHints(runtimeUiHints, existingUiHints) { - const keys = new Set([ - ...Object.keys(existingUiHints ?? {}), - ...Object.keys(runtimeUiHints ?? {}), - ]); + const keys = Object.keys(runtimeUiHints ?? {}); return Object.fromEntries( [...keys].map((key) => [ @@ -44,6 +41,10 @@ if (!channelId || !channelSchema?.schema || typeof channelSchema.schema !== "obj const packageChannelMeta = packageJson?.openclaw?.channel?.id === channelId ? packageJson.openclaw.channel : {}; +if (packageJson?.description) { + manifest.description = packageJson.description; +} + manifest.channelConfigs = { ...(manifest.channelConfigs ?? {}), [channelId]: { diff --git a/src/actions/actions.test.ts b/src/actions/actions.test.ts index b0f10bc..731cad1 100644 --- a/src/actions/actions.test.ts +++ b/src/actions/actions.test.ts @@ -8,9 +8,7 @@ describe("simplex message tool discovery", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { - wsUrl: "ws://127.0.0.1:5225", - }, + dbFilePrefix: "/tmp/openclaw-simplex-test", }, }, } as OpenClawConfig; @@ -71,7 +69,7 @@ describe("simplex message tool discovery", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", reactionLevel: "ack", }, }, @@ -88,7 +86,7 @@ describe("simplex message tool discovery", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", actions: { polls: false }, }, }, @@ -103,11 +101,11 @@ describe("simplex message tool discovery", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", reactionLevel: "ack", accounts: { work: { - connection: { wsUrl: "ws://127.0.0.1:6225" }, + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex-work", reactionLevel: "minimal", }, }, diff --git a/src/actions/actions.ts b/src/actions/actions.ts index 735839a..3e84587 100644 --- a/src/actions/actions.ts +++ b/src/actions/actions.ts @@ -1,4 +1,5 @@ import type { ChannelMessageActionAdapter } from "openclaw/plugin-sdk/channel-contract"; +import { resolveSimplexRouteTarget } from "../channel/shared/simplex-common.js"; import { describeSimplexMessageActions } from "./discovery.js"; import { executeSimplexAction } from "./execute.js"; import { buildSimplexMessageToolSchema, SIMPLEX_SUPPORTED_ACTIONS } from "./schema.js"; @@ -17,9 +18,8 @@ function extractSimplexToolSend(args: Record) { return null; } const accountId = readString(args.accountId); - const threadId = - typeof args.threadId === "number" ? String(args.threadId) : readString(args.threadId); - return { to, accountId, threadId }; + const threadId = typeof args.threadId === "number" ? args.threadId : readString(args.threadId); + return resolveSimplexRouteTarget({ rawTarget: to, accountId, fallbackThreadId: threadId }); } export const simplexMessageActions: ChannelMessageActionAdapter = { diff --git a/src/actions/discovery.test.ts b/src/actions/discovery.test.ts index a61c1ee..e226536 100644 --- a/src/actions/discovery.test.ts +++ b/src/actions/discovery.test.ts @@ -11,7 +11,7 @@ describe("simplex action discovery helpers", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", }, }, } as OpenClawConfig; @@ -24,7 +24,7 @@ describe("simplex action discovery helpers", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", actions: { reactions: false }, }, }, @@ -39,7 +39,7 @@ describe("simplex action discovery helpers", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", reactionLevel: "ack", }, }, diff --git a/src/actions/discovery.ts b/src/actions/discovery.ts index cdece0a..c46b69c 100644 --- a/src/actions/discovery.ts +++ b/src/actions/discovery.ts @@ -1,10 +1,8 @@ import { createActionGate } from "openclaw/plugin-sdk/channel-actions"; import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; -import { type ReactionLevel, resolveReactionLevel } from "openclaw/plugin-sdk/text-runtime"; +import { resolveReactionLevel } from "openclaw/plugin-sdk/text-runtime"; import { listEnabledSimplexAccounts, resolveSimplexAccount } from "../config/accounts.js"; -export type SimplexReactionLevel = ReactionLevel; - function areSimplexPollsEnabled(params: { cfg: OpenClawConfig; accountId?: string | null }) { const account = resolveSimplexAccount(params); return createActionGate(account.config.actions)("polls"); diff --git a/src/actions/execute.ts b/src/actions/execute.ts index 24a4541..1db4096 100644 --- a/src/actions/execute.ts +++ b/src/actions/execute.ts @@ -1,105 +1,11 @@ import type { ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract"; import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; -import { buildComposedMessages } from "../channel/simplex-media.js"; import { resolveSimplexAccount } from "../config/accounts.js"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { - buildAddGroupMemberCommand, - buildDeleteChatItemCommand, - buildLeaveGroupCommand, - buildReactionCommand, - buildRemoveGroupMemberCommand, - buildSendMessagesCommand, - buildUpdateChatItemCommand, - buildUpdateGroupProfileCommand, - type SimplexComposedMessage, -} from "../simplex/simplex-commands.js"; -import { resolveSimplexCommandError } from "../simplex/simplex-errors.js"; -import { SimplexWsClient } from "../simplex/simplex-ws-client.js"; -import { assertSimplexReactActionAllowed } from "./discovery.js"; -import { - normalizeSimplexGroupRef, - readChatRef, - readDeleteMode, - readGroupTarget, - readMessageIds, - readNumberParam, - readStringParam, - readUploadMediaUrl, -} from "./params.js"; -import { jsonResult } from "./result.js"; +import type { SimplexActionParams, ToolResult } from "../types/actions.js"; +import { executeSimplexGroupAction } from "./group-actions.js"; +import { executeSimplexMessageAction } from "./message-actions.js"; +import { readChatRef } from "./params.js"; import { SIMPLEX_SUPPORTED_ACTIONS } from "./schema.js"; -import type { SimplexActionParams, ToolResult } from "./types.js"; - -async function withSimplexClient( - account: ResolvedSimplexAccount, - fn: (client: SimplexWsClient) => Promise -): Promise { - const client = new SimplexWsClient({ - url: account.wsUrl, - connectTimeoutMs: account.config.connection?.connectTimeoutMs, - }); - await client.connect(); - try { - return await fn(client); - } finally { - await client.close(); - } -} - -async function resolveEditMessage(params: { - cfg: OpenClawConfig; - account: ResolvedSimplexAccount; - text: string; -}): Promise { - const composed = await buildComposedMessages({ - cfg: params.cfg, - accountId: params.account.accountId, - text: params.text, - }); - if (composed.length === 0) { - throw new Error("text required"); - } - const first = composed[0]; - if (!first) { - throw new Error("text required"); - } - return first; -} - -async function sendActionComposedMessages(params: { - account: ResolvedSimplexAccount; - chatRef: string; - composedMessages: SimplexComposedMessage[]; -}): Promise<{ messageId?: string }> { - if (params.composedMessages.length === 0) { - return {}; - } - const cmd = buildSendMessagesCommand({ - chatRef: params.chatRef, - composedMessages: params.composedMessages, - }); - const response = await withSimplexClient(params.account, (client) => client.sendCommand(cmd)); - const resp = response.resp as { - type?: string; - chatError?: { errorType?: { type?: string; message?: string } }; - chatItems?: Array<{ chatItem?: { meta?: { itemId?: unknown } } }>; - itemId?: unknown; - messageId?: unknown; - }; - const commandError = resolveSimplexCommandError(resp); - if (commandError) { - throw new Error(commandError); - } - const rawMessageId = resp.chatItems?.[0]?.chatItem?.meta?.itemId ?? resp.messageId ?? resp.itemId; - if (typeof rawMessageId === "number" && Number.isFinite(rawMessageId)) { - return { messageId: String(rawMessageId) }; - } - if (typeof rawMessageId === "string" && rawMessageId.trim()) { - return { messageId: rawMessageId.trim() }; - } - return {}; -} export async function executeSimplexAction(params: { action: ChannelMessageActionName; @@ -127,175 +33,24 @@ export async function executeSimplexAction(params: { } const chatRef = readChatRef(toolParams); - - if (action === "upload-file") { - const mediaUrl = readUploadMediaUrl(toolParams); - if (!mediaUrl) { - throw new Error("mediaUrl, media, filePath, or path required"); - } - const text = - readStringParam(toolParams, "text", { allowEmpty: true }) ?? - readStringParam(toolParams, "message", { allowEmpty: true }) ?? - readStringParam(toolParams, "caption", { allowEmpty: true }) ?? - ""; - const audioAsVoice = - typeof toolParams.audioAsVoice === "boolean" - ? toolParams.audioAsVoice - : typeof toolParams.asVoice === "boolean" - ? toolParams.asVoice - : undefined; - const composedMessages = await buildComposedMessages({ - cfg, - accountId: account.accountId, - text, - mediaUrl, - audioAsVoice, - }); - const result = await sendActionComposedMessages({ account, chatRef, composedMessages }); - return jsonResult({ - ok: true, - uploaded: true, - to: chatRef, - mediaUrl, - messageId: result.messageId ?? null, - }); - } - - if (action === "react") { - assertSimplexReactActionAllowed({ cfg, accountId: account.accountId }); - const messageId = - readNumberParam(toolParams, "messageId", { integer: true }) ?? - readNumberParam(toolParams, "chatItemId", { integer: true }); - if (messageId === undefined) { - throw new Error("messageId required"); - } - const emoji = readStringParam(toolParams, "emoji", { allowEmpty: true }); - const remove = typeof toolParams.remove === "boolean" ? toolParams.remove : false; - const reaction = - typeof toolParams.reaction === "object" && toolParams.reaction !== null - ? (toolParams.reaction as Record) - : emoji - ? { emoji } - : null; - if (!reaction) { - throw new Error("reaction or emoji required"); - } - const cmd = buildReactionCommand({ - chatRef, - chatItemId: messageId, - add: !remove, - reaction, - }); - await withSimplexClient(account, (client) => client.sendCommand(cmd)); - return jsonResult({ ok: true, action: remove ? "removed" : "added", emoji }); - } - - if (action === "edit") { - const messageId = - readNumberParam(toolParams, "messageId", { integer: true }) ?? - readNumberParam(toolParams, "chatItemId", { integer: true }); - if (messageId === undefined) { - throw new Error("messageId required"); - } - const text = - readStringParam(toolParams, "text", { allowEmpty: false }) ?? - readStringParam(toolParams, "message", { allowEmpty: false }); - if (!text) { - throw new Error("text required"); - } - const updatedMessage = await resolveEditMessage({ cfg, account, text }); - const cmd = buildUpdateChatItemCommand({ - chatRef, - chatItemId: messageId, - updatedMessage, - }); - await withSimplexClient(account, (client) => client.sendCommand(cmd)); - return jsonResult({ ok: true, updated: messageId }); - } - - if (action === "delete" || action === "unsend") { - const messageIds = readMessageIds(toolParams); - const cmd = buildDeleteChatItemCommand({ - chatRef, - chatItemIds: messageIds, - deleteMode: readDeleteMode(toolParams), - }); - await withSimplexClient(account, (client) => client.sendCommand(cmd)); - return jsonResult({ ok: true, deleted: messageIds }); - } - - if (action === "renameGroup") { - const target = readGroupTarget(toolParams); - const rawProfile = - readStringParam(toolParams, "profile") ?? readStringParam(toolParams, "groupProfile"); - if (rawProfile) { - let profile: Record; - try { - profile = JSON.parse(rawProfile) as Record; - } catch (err) { - throw new Error(`Invalid profile JSON: ${String(err)}`, { cause: err }); - } - const cmd = buildUpdateGroupProfileCommand({ - groupId: normalizeSimplexGroupRef(target), - profile, - }); - await withSimplexClient(account, (client) => client.sendCommand(cmd)); - return jsonResult({ ok: true, group: target, profile }); - } - const displayName = - readStringParam(toolParams, "displayName") ?? - readStringParam(toolParams, "name") ?? - readStringParam(toolParams, "title"); - if (!displayName) { - throw new Error("displayName or name required"); - } - const cmd = buildUpdateGroupProfileCommand({ - groupId: normalizeSimplexGroupRef(target), - profile: { displayName }, - }); - await withSimplexClient(account, (client) => client.sendCommand(cmd)); - return jsonResult({ ok: true, group: target, displayName }); - } - - if (action === "addParticipant") { - const target = readGroupTarget(toolParams); - const participant = - readStringParam(toolParams, "participant") ?? - readStringParam(toolParams, "contactId") ?? - readStringParam(toolParams, "memberId"); - if (!participant) { - throw new Error("participant or contactId required"); - } - const cmd = buildAddGroupMemberCommand({ - groupId: normalizeSimplexGroupRef(target), - contactId: participant, - }); - await withSimplexClient(account, (client) => client.sendCommand(cmd)); - return jsonResult({ ok: true, group: target, added: participant }); - } - - if (action === "removeParticipant") { - const target = readGroupTarget(toolParams); - const participant = - readStringParam(toolParams, "participant") ?? - readStringParam(toolParams, "memberId") ?? - readStringParam(toolParams, "contactId"); - if (!participant) { - throw new Error("participant or memberId required"); - } - const cmd = buildRemoveGroupMemberCommand({ - groupId: normalizeSimplexGroupRef(target), - memberId: participant, - }); - await withSimplexClient(account, (client) => client.sendCommand(cmd)); - return jsonResult({ ok: true, group: target, removed: participant }); + const messageResult = await executeSimplexMessageAction({ + action, + cfg, + account, + chatRef, + toolParams, + }); + if (messageResult) { + return messageResult; } - if (action === "leaveGroup") { - const target = readGroupTarget(toolParams); - const cmd = buildLeaveGroupCommand(normalizeSimplexGroupRef(target)); - await withSimplexClient(account, (client) => client.sendCommand(cmd)); - return jsonResult({ ok: true, group: target, left: true }); + const groupResult = await executeSimplexGroupAction({ + action, + account, + toolParams, + }); + if (groupResult) { + return groupResult; } throw new Error(`Action ${action} not supported for simplex.`); diff --git a/src/actions/group-actions.ts b/src/actions/group-actions.ts new file mode 100644 index 0000000..c14a677 --- /dev/null +++ b/src/actions/group-actions.ts @@ -0,0 +1,113 @@ +import type { ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract"; +import { parseSimplexNumericId } from "../simplex/runtime/api.js"; +import { withSimplexApi } from "../simplex/runtime/transport.js"; +import type { SimplexActionParams, ToolResult } from "../types/actions.js"; +import type { ResolvedSimplexAccount } from "../types/config.js"; +import type { SimplexApiGroupMemberRole, SimplexApiGroupProfile } from "../types/simplex.js"; +import { normalizeSimplexGroupRef, readGroupTarget, readStringParam } from "./params.js"; +import { jsonResult } from "./result.js"; + +export async function executeSimplexGroupAction(params: { + action: ChannelMessageActionName; + account: ResolvedSimplexAccount; + toolParams: SimplexActionParams; +}): Promise { + const { action, account, toolParams } = params; + + if (action === "renameGroup") { + const target = readGroupTarget(toolParams); + const rawProfile = + readStringParam(toolParams, "profile") ?? readStringParam(toolParams, "groupProfile"); + if (rawProfile) { + let profile: Record; + try { + profile = JSON.parse(rawProfile) as Record; + } catch (err) { + throw new Error(`Invalid profile JSON: ${String(err)}`, { cause: err }); + } + const groupId = parseSimplexNumericId(normalizeSimplexGroupRef(target)); + if (groupId === null) { + throw new Error(`SimpleX group id must be numeric for runtime API: ${target}`); + } + await withSimplexApi({ + account, + run: (api) => + api.apiUpdateGroupProfile(groupId, profile as unknown as SimplexApiGroupProfile), + }); + return jsonResult({ ok: true, group: target, profile }); + } + const displayName = + readStringParam(toolParams, "displayName") ?? + readStringParam(toolParams, "name") ?? + readStringParam(toolParams, "title"); + if (!displayName) { + throw new Error("displayName or name required"); + } + const groupId = parseSimplexNumericId(normalizeSimplexGroupRef(target)); + if (groupId === null) { + throw new Error(`SimpleX group id must be numeric for runtime API: ${target}`); + } + await withSimplexApi({ + account, + run: (api) => api.apiUpdateGroupProfile(groupId, { displayName } as SimplexApiGroupProfile), + }); + return jsonResult({ ok: true, group: target, displayName }); + } + + if (action === "addParticipant") { + const target = readGroupTarget(toolParams); + const participant = + readStringParam(toolParams, "participant") ?? + readStringParam(toolParams, "contactId") ?? + readStringParam(toolParams, "memberId"); + if (!participant) { + throw new Error("participant or contactId required"); + } + const groupId = parseSimplexNumericId(normalizeSimplexGroupRef(target)); + const contactId = parseSimplexNumericId(participant); + if (groupId === null || contactId === null) { + throw new Error("SimpleX group and contact ids must be numeric for runtime API"); + } + await withSimplexApi({ + account, + run: (api) => api.apiAddMember(groupId, contactId, "member" as SimplexApiGroupMemberRole), + }); + return jsonResult({ ok: true, group: target, added: participant }); + } + + if (action === "removeParticipant") { + const target = readGroupTarget(toolParams); + const participant = + readStringParam(toolParams, "participant") ?? + readStringParam(toolParams, "memberId") ?? + readStringParam(toolParams, "contactId"); + if (!participant) { + throw new Error("participant or memberId required"); + } + const groupId = parseSimplexNumericId(normalizeSimplexGroupRef(target)); + const memberId = parseSimplexNumericId(participant); + if (groupId === null || memberId === null) { + throw new Error("SimpleX group and member ids must be numeric for runtime API"); + } + await withSimplexApi({ + account, + run: (api) => api.apiRemoveMembers(groupId, [memberId]), + }); + return jsonResult({ ok: true, group: target, removed: participant }); + } + + if (action === "leaveGroup") { + const target = readGroupTarget(toolParams); + const groupId = parseSimplexNumericId(normalizeSimplexGroupRef(target)); + if (groupId === null) { + throw new Error(`SimpleX group id must be numeric for runtime API: ${target}`); + } + await withSimplexApi({ + account, + run: (api) => api.apiLeaveGroup(groupId), + }); + return jsonResult({ ok: true, group: target, left: true }); + } + + return null; +} diff --git a/src/actions/message-actions.ts b/src/actions/message-actions.ts new file mode 100644 index 0000000..7d0ba07 --- /dev/null +++ b/src/actions/message-actions.ts @@ -0,0 +1,209 @@ +import type { ChannelMessageActionName } from "openclaw/plugin-sdk/channel-contract"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { buildComposedMessages } from "../channel/media/simplex-media.js"; +import { + parseSimplexApiChatRef, + resolveSimplexChatItemId, + toSimplexApiChatRef, + toSimplexApiChatType, +} from "../simplex/runtime/api.js"; +import { withSimplexApi } from "../simplex/runtime/transport.js"; +import type { SimplexActionParams, ToolResult } from "../types/actions.js"; +import type { ResolvedSimplexAccount } from "../types/config.js"; +import type { + SimplexApiComposedMessage, + SimplexApiDeleteMode, + SimplexApiMsgContent, + SimplexApiReaction, + SimplexComposedMessage, +} from "../types/simplex.js"; +import { assertSimplexReactActionAllowed } from "./discovery.js"; +import { + readDeleteMode, + readMessageIds, + readNumberParam, + readStringParam, + readUploadMediaUrl, +} from "./params.js"; +import { jsonResult } from "./result.js"; + +async function resolveEditMessage(params: { + cfg: OpenClawConfig; + account: ResolvedSimplexAccount; + text: string; +}): Promise { + const composed = await buildComposedMessages({ + cfg: params.cfg, + accountId: params.account.accountId, + text: params.text, + }); + if (composed.length === 0) { + throw new Error("text required"); + } + const first = composed[0]; + if (!first) { + throw new Error("text required"); + } + return first; +} + +async function sendActionComposedMessages(params: { + account: ResolvedSimplexAccount; + chatRef: string; + composedMessages: SimplexComposedMessage[]; +}): Promise<{ messageId?: string }> { + if (params.composedMessages.length === 0) { + return {}; + } + const apiChatRef = parseSimplexApiChatRef(params.chatRef); + if (!apiChatRef) { + throw new Error(`SimpleX chat ref must be numeric for runtime API: ${params.chatRef}`); + } + const chatItems = await withSimplexApi({ + account: params.account, + run: (api) => + api.apiSendMessages( + toSimplexApiChatRef(apiChatRef), + params.composedMessages as SimplexApiComposedMessage[] + ), + }); + return { messageId: resolveSimplexChatItemId(chatItems[0]) }; +} + +export async function executeSimplexMessageAction(params: { + action: ChannelMessageActionName; + cfg: OpenClawConfig; + account: ResolvedSimplexAccount; + chatRef: string; + toolParams: SimplexActionParams; +}): Promise { + const { action, cfg, account, chatRef, toolParams } = params; + + if (action === "upload-file") { + const mediaUrl = readUploadMediaUrl(toolParams); + if (!mediaUrl) { + throw new Error("mediaUrl, media, filePath, or path required"); + } + const text = + readStringParam(toolParams, "text", { allowEmpty: true }) ?? + readStringParam(toolParams, "message", { allowEmpty: true }) ?? + readStringParam(toolParams, "caption", { allowEmpty: true }) ?? + ""; + const audioAsVoice = + typeof toolParams.audioAsVoice === "boolean" + ? toolParams.audioAsVoice + : typeof toolParams.asVoice === "boolean" + ? toolParams.asVoice + : undefined; + const composedMessages = await buildComposedMessages({ + cfg, + accountId: account.accountId, + text, + mediaUrl, + audioAsVoice, + }); + const result = await sendActionComposedMessages({ account, chatRef, composedMessages }); + return jsonResult({ + ok: true, + uploaded: true, + to: chatRef, + mediaUrl, + messageId: result.messageId ?? null, + }); + } + + if (action === "react") { + assertSimplexReactActionAllowed({ cfg, accountId: account.accountId }); + const messageId = + readNumberParam(toolParams, "messageId", { integer: true }) ?? + readNumberParam(toolParams, "chatItemId", { integer: true }); + if (messageId === undefined) { + throw new Error("messageId required"); + } + const emoji = readStringParam(toolParams, "emoji", { allowEmpty: true }); + const remove = typeof toolParams.remove === "boolean" ? toolParams.remove : false; + const reaction = + typeof toolParams.reaction === "object" && toolParams.reaction !== null + ? (toolParams.reaction as Record) + : emoji + ? { emoji } + : null; + if (!reaction) { + throw new Error("reaction or emoji required"); + } + const apiChatRef = parseSimplexApiChatRef(chatRef); + if (!apiChatRef) { + throw new Error(`SimpleX chat ref must be numeric for runtime API: ${chatRef}`); + } + const apiReaction = + emoji && !("type" in reaction) + ? ({ type: "emoji", emoji } as unknown as SimplexApiReaction) + : (reaction as unknown as SimplexApiReaction); + await withSimplexApi({ + account, + run: (api) => + api.apiChatItemReaction( + toSimplexApiChatType(apiChatRef), + apiChatRef[1], + messageId, + !remove, + apiReaction + ), + }); + return jsonResult({ ok: true, action: remove ? "removed" : "added", emoji }); + } + + if (action === "edit") { + const messageId = + readNumberParam(toolParams, "messageId", { integer: true }) ?? + readNumberParam(toolParams, "chatItemId", { integer: true }); + if (messageId === undefined) { + throw new Error("messageId required"); + } + const text = + readStringParam(toolParams, "text", { allowEmpty: false }) ?? + readStringParam(toolParams, "message", { allowEmpty: false }); + if (!text) { + throw new Error("text required"); + } + const updatedMessage = await resolveEditMessage({ cfg, account, text }); + const apiChatRef = parseSimplexApiChatRef(chatRef); + if (!apiChatRef) { + throw new Error(`SimpleX chat ref must be numeric for runtime API: ${chatRef}`); + } + await withSimplexApi({ + account, + run: (api) => + api.apiUpdateChatItem( + toSimplexApiChatType(apiChatRef), + apiChatRef[1], + messageId, + updatedMessage.msgContent as SimplexApiMsgContent, + false + ), + }); + return jsonResult({ ok: true, updated: messageId }); + } + + if (action === "delete" || action === "unsend") { + const messageIds = readMessageIds(toolParams); + const deleteMode = readDeleteMode(toolParams); + const apiChatRef = parseSimplexApiChatRef(chatRef); + if (!apiChatRef) { + throw new Error(`SimpleX chat ref must be numeric for runtime API: ${chatRef}`); + } + await withSimplexApi({ + account, + run: (api) => + api.apiDeleteChatItems( + toSimplexApiChatType(apiChatRef), + apiChatRef[1], + messageIds.map((id) => Math.trunc(Number(id))), + (deleteMode ?? "broadcast") as SimplexApiDeleteMode + ), + }); + return jsonResult({ ok: true, deleted: messageIds }); + } + + return null; +} diff --git a/src/actions/params.ts b/src/actions/params.ts index 67b19a0..626715a 100644 --- a/src/actions/params.ts +++ b/src/actions/params.ts @@ -1,5 +1,5 @@ -import { stripSimplexPrefix } from "../channel/simplex-common.js"; -import type { DeleteMode, SimplexActionParams } from "./types.js"; +import { stripSimplexPrefix } from "../channel/shared/simplex-common.js"; +import type { DeleteMode, SimplexActionParams } from "../types/actions.js"; export function readStringParam( params: SimplexActionParams, diff --git a/src/actions/result.ts b/src/actions/result.ts index c2fc6c2..c50cfb5 100644 --- a/src/actions/result.ts +++ b/src/actions/result.ts @@ -1,4 +1,4 @@ -import type { ToolResult } from "./types.js"; +import type { ToolResult } from "../types/actions.js"; export function jsonResult(payload: unknown): ToolResult { return { diff --git a/src/actions/schema.ts b/src/actions/schema.ts index 26b7feb..f369960 100644 --- a/src/actions/schema.ts +++ b/src/actions/schema.ts @@ -16,19 +16,6 @@ export const SIMPLEX_SUPPORTED_ACTIONS = new Set([ "leaveGroup", ]); -export const SIMPLEX_MESSAGE_TOOL_ACTIONS = [ - "send", - "upload-file", - "react", - "edit", - "delete", - "unsend", - "renameGroup", - "addParticipant", - "removeParticipant", - "leaveGroup", -] as const satisfies readonly ChannelMessageActionName[]; - export function buildSimplexMessageToolSchema(): ChannelMessageToolSchemaContribution { return { properties: { diff --git a/src/channel/contacts/simplex-directory.test.ts b/src/channel/contacts/simplex-directory.test.ts new file mode 100644 index 0000000..c82c565 --- /dev/null +++ b/src/channel/contacts/simplex-directory.test.ts @@ -0,0 +1,120 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; +import { afterEach, describe, expect, it, vi } from "vitest"; +import type { SimplexChatApi } from "../../types/simplex.js"; + +const simplexApiMock = vi.hoisted(() => ({ + contacts: [] as unknown[], + groups: [] as unknown[], + members: [] as unknown[], + reset() { + this.contacts = []; + this.groups = []; + this.members = []; + }, +})); + +vi.mock("../../simplex/runtime/transport.js", () => ({ + withSimplexApi: async (params: { run: (api: SimplexChatApi) => Promise }): Promise => { + const api = { + apiGetActiveUser: vi.fn(async () => ({ + userId: 1, + profile: { displayName: "OpenClaw SimpleX" }, + })), + apiListContacts: vi.fn(async () => simplexApiMock.contacts), + apiListGroups: vi.fn(async () => simplexApiMock.groups), + apiListMembers: vi.fn(async () => simplexApiMock.members), + } as unknown as SimplexChatApi; + return await params.run(api); + }, +})); + +import { + listSimplexDirectoryGroups, + listSimplexDirectoryPeers, + listSimplexGroupMembers, +} from "./simplex-directory.js"; + +const cfg = { + channels: { + "openclaw-simplex": { + dbFilePrefix: "/tmp/openclaw-simplex-directory-test", + }, + }, +} as OpenClawConfig; + +const runtime = { + error: vi.fn(), +} as unknown as RuntimeEnv; + +describe("simplex directory mapping", () => { + afterEach(() => { + simplexApiMock.reset(); + vi.clearAllMocks(); + }); + + it("maps nested contact payloads and applies query filtering", async () => { + simplexApiMock.contacts = [ + { + contact: { + contactId: 7, + profile: { displayName: "Alice" }, + }, + }, + { + contact: { + contactId: 8, + localDisplayName: "Bob", + }, + }, + ]; + + await expect(listSimplexDirectoryPeers({ cfg, runtime, query: "ali" })).resolves.toEqual([ + expect.objectContaining({ + kind: "user", + id: "7", + name: "Alice", + }), + ]); + }); + + it("maps nested group payloads", async () => { + simplexApiMock.groups = [ + { + groupInfo: { + groupId: 42, + groupProfile: { displayName: "Ops" }, + }, + }, + ]; + + await expect(listSimplexDirectoryGroups({ cfg, runtime })).resolves.toEqual([ + expect.objectContaining({ + kind: "group", + id: "42", + name: "Ops", + }), + ]); + }); + + it("maps group member payloads", async () => { + simplexApiMock.members = [ + { + groupMember: { + groupMemberId: 101, + profile: { displayName: "Carol" }, + }, + }, + ]; + + await expect( + listSimplexGroupMembers({ cfg, runtime, groupId: "42", limit: 1 }) + ).resolves.toEqual([ + expect.objectContaining({ + kind: "user", + id: "101", + name: "Carol", + }), + ]); + }); +}); diff --git a/src/channel/simplex-directory.ts b/src/channel/contacts/simplex-directory.ts similarity index 68% rename from src/channel/simplex-directory.ts rename to src/channel/contacts/simplex-directory.ts index cfd3b47..9de4eb7 100644 --- a/src/channel/simplex-directory.ts +++ b/src/channel/contacts/simplex-directory.ts @@ -1,16 +1,11 @@ import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; import type { ChannelDirectoryEntry } from "openclaw/plugin-sdk/directory-runtime"; import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; -import { resolveSimplexAccount } from "../config/accounts.js"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { - buildListContactsCommand, - buildListGroupMembersCommand, - buildListGroupsCommand, - buildShowActiveUserCommand, -} from "../simplex/simplex-commands.js"; -import { SimplexWsClient } from "../simplex/simplex-ws-client.js"; -import { stripSimplexPrefix } from "./simplex-common.js"; +import { resolveSimplexAccount } from "../../config/accounts.js"; +import { parseSimplexNumericId } from "../../simplex/runtime/api.js"; +import { withSimplexApi } from "../../simplex/runtime/transport.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import { stripSimplexPrefix } from "../shared/simplex-common.js"; type SimplexDirectoryParams = { cfg: OpenClawConfig; @@ -159,44 +154,24 @@ function normalizeSimplexInputId(input: string): { id: string; explicit: boolean return { id: withoutPrefix, explicit: false }; } -async function withSimplexClient( - account: ResolvedSimplexAccount, - fn: (client: SimplexWsClient) => Promise -): Promise { - const client = new SimplexWsClient({ - url: account.wsUrl, - connectTimeoutMs: account.config.connection?.connectTimeoutMs, - }); - await client.connect(); - try { - return await fn(client); - } finally { - await client.close(); - } -} - async function fetchActiveUserInfo( account: ResolvedSimplexAccount, runtime: RuntimeEnv ): Promise { try { - return await withSimplexClient(account, async (client) => { - const response = await client.sendCommand(buildShowActiveUserCommand()); - const resp = response.resp as Record | undefined; - const user = - (resp?.user as Record | undefined) ?? - (resp?.activeUser as Record | undefined) ?? - (resp?.profile as Record | undefined) ?? - (resp?.userProfile as Record | undefined) ?? - resp; - if (!user || typeof user !== "object") { - return null; - } - const profile = (user.profile as Record | undefined) ?? {}; - const userId = toId(user.userId ?? user.id ?? profile.userId); - const displayName = - toId(profile.displayName) ?? toId(profile.fullName) ?? toId(user.displayName); - return { userId, displayName, raw: user }; + return await withSimplexApi({ + account, + run: async (api) => { + const user = (await api.apiGetActiveUser()) as Record | undefined; + if (!user || typeof user !== "object") { + return null; + } + const profile = (user.profile as Record | undefined) ?? {}; + const userId = toId(user.userId ?? user.id ?? profile.userId); + const displayName = + toId(profile.displayName) ?? toId(profile.fullName) ?? toId(user.displayName); + return { userId, displayName, raw: user }; + }, }); } catch (err) { runtime.error?.(`simplex: failed to read active user: ${String(err)}`); @@ -215,25 +190,25 @@ async function listContactsLive(params: { if (!activeUserId) { return []; } - return await withSimplexClient(params.account, async (client) => { - const response = await client.sendCommand(buildListContactsCommand(activeUserId)); - const resp = response.resp as Record | undefined; - const contacts = - (resp?.contacts as unknown[]) ?? - (resp?.contactList as unknown[]) ?? - (resp?.contactsList as unknown[]) ?? - (resp?.items as unknown[]) ?? - []; - const mapped = contacts.map(mapContactEntry).filter(Boolean) as ChannelDirectoryEntry[]; - const q = normalizeQuery(params.query); - const filtered = q - ? mapped.filter( - (entry) => - entry.id.toLowerCase().includes(q) || (entry.name?.toLowerCase().includes(q) ?? false) - ) - : mapped; - const limit = params.limit && params.limit > 0 ? params.limit : undefined; - return limit ? filtered.slice(0, limit) : filtered; + const userId = parseSimplexNumericId(activeUserId); + if (userId === null) { + return []; + } + return await withSimplexApi({ + account: params.account, + run: async (api) => { + const contacts = await api.apiListContacts(userId); + const mapped = contacts.map(mapContactEntry).filter(Boolean) as ChannelDirectoryEntry[]; + const q = normalizeQuery(params.query); + const filtered = q + ? mapped.filter( + (entry) => + entry.id.toLowerCase().includes(q) || (entry.name?.toLowerCase().includes(q) ?? false) + ) + : mapped; + const limit = params.limit && params.limit > 0 ? params.limit : undefined; + return limit ? filtered.slice(0, limit) : filtered; + }, }); } @@ -248,30 +223,25 @@ async function listGroupsLive(params: { if (!activeUserId) { return []; } - return await withSimplexClient(params.account, async (client) => { - const response = await client.sendCommand( - buildListGroupsCommand({ - userId: activeUserId, - search: params.query ?? undefined, - }) - ); - const resp = response.resp as Record | undefined; - const groups = - (resp?.groups as unknown[]) ?? - (resp?.groupList as unknown[]) ?? - (resp?.groupsList as unknown[]) ?? - (resp?.items as unknown[]) ?? - []; - const mapped = groups.map(mapGroupEntry).filter(Boolean) as ChannelDirectoryEntry[]; - const q = normalizeQuery(params.query); - const filtered = q - ? mapped.filter( - (entry) => - entry.id.toLowerCase().includes(q) || (entry.name?.toLowerCase().includes(q) ?? false) - ) - : mapped; - const limit = params.limit && params.limit > 0 ? params.limit : undefined; - return limit ? filtered.slice(0, limit) : filtered; + const userId = parseSimplexNumericId(activeUserId); + if (userId === null) { + return []; + } + return await withSimplexApi({ + account: params.account, + run: async (api) => { + const groups = await api.apiListGroups(userId, undefined, params.query ?? undefined); + const mapped = groups.map(mapGroupEntry).filter(Boolean) as ChannelDirectoryEntry[]; + const q = normalizeQuery(params.query); + const filtered = q + ? mapped.filter( + (entry) => + entry.id.toLowerCase().includes(q) || (entry.name?.toLowerCase().includes(q) ?? false) + ) + : mapped; + const limit = params.limit && params.limit > 0 ? params.limit : undefined; + return limit ? filtered.slice(0, limit) : filtered; + }, }); } @@ -281,24 +251,18 @@ async function listGroupMembersLive(params: { groupId: string; limit?: number | null; }): Promise { - return await withSimplexClient(params.account, async (client) => { - const response = await client.sendCommand( - buildListGroupMembersCommand({ - groupId: params.groupId, - }) - ); - const resp = response.resp as Record | undefined; - const members = - (resp?.members as unknown[]) ?? - (resp?.groupMembers as unknown[]) ?? - (resp?.items as unknown[]) ?? - (resp?.group as Record | undefined)?.members ?? - []; - const mapped = (Array.isArray(members) ? members : []) - .map(mapMemberEntry) - .filter(Boolean) as ChannelDirectoryEntry[]; - const limit = params.limit && params.limit > 0 ? params.limit : undefined; - return limit ? mapped.slice(0, limit) : mapped; + const groupId = parseSimplexNumericId(params.groupId); + if (groupId === null) { + return []; + } + return await withSimplexApi({ + account: params.account, + run: async (api) => { + const members = await api.apiListMembers(groupId); + const mapped = members.map(mapMemberEntry).filter(Boolean) as ChannelDirectoryEntry[]; + const limit = params.limit && params.limit > 0 ? params.limit : undefined; + return limit ? mapped.slice(0, limit) : mapped; + }, }); } diff --git a/src/channel/simplex-pairing.ts b/src/channel/contacts/simplex-pairing.ts similarity index 67% rename from src/channel/simplex-pairing.ts rename to src/channel/contacts/simplex-pairing.ts index 7861c90..2868fd2 100644 --- a/src/channel/simplex-pairing.ts +++ b/src/channel/contacts/simplex-pairing.ts @@ -1,19 +1,18 @@ import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; import { PAIRING_APPROVED_MESSAGE } from "openclaw/plugin-sdk/channel-status"; -import { resolveDefaultSimplexAccountId, resolveSimplexAccount } from "../config/accounts.js"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import type { SimplexClientRegistry } from "./simplex-client-registry.js"; +import { resolveDefaultSimplexAccountId, resolveSimplexAccount } from "../../config/accounts.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import { buildAndSendSimplexMessages } from "../messaging/simplex-send.js"; import { assertSimplexOutboundAccountReady, normalizeSimplexContactRef, stripLeadingAt, stripSimplexPrefix, -} from "./simplex-common.js"; -import { buildAndSendSimplexMessages } from "./simplex-send.js"; +} from "../shared/simplex-common.js"; -export function buildSimplexPairing( - registry: SimplexClientRegistry -): NonNullable["pairing"]> { +export function buildSimplexPairing(): NonNullable< + ChannelPlugin["pairing"] +> { return { idLabel: "simplexContactId", normalizeAllowEntry: (entry) => stripLeadingAt(stripSimplexPrefix(entry)), @@ -22,7 +21,6 @@ export function buildSimplexPairing( const account = resolveSimplexAccount({ cfg, accountId }); assertSimplexOutboundAccountReady(account); await buildAndSendSimplexMessages({ - registry, cfg, account, chatRef: normalizeSimplexContactRef(id), diff --git a/src/channel/simplex-doctor.test.ts b/src/channel/diagnostics/simplex-doctor.test.ts similarity index 69% rename from src/channel/simplex-doctor.test.ts rename to src/channel/diagnostics/simplex-doctor.test.ts index 32fa5c3..00cd5e0 100644 --- a/src/channel/simplex-doctor.test.ts +++ b/src/channel/diagnostics/simplex-doctor.test.ts @@ -11,27 +11,17 @@ describe("simplex doctor", () => { }); }); - it("warns about legacy config, invalid websocket URLs, and empty allowlists", async () => { + it("warns about legacy config and empty allowlists", async () => { const cfg = { channels: { - simplex: { - connection: { - wsUrl: "ws://127.0.0.1:5225", - }, - }, + simplex: {}, "openclaw-simplex": { - connection: { - wsUrl: "http://127.0.0.1:5225", - }, dmPolicy: "allowlist", allowFrom: [], groupPolicy: "allowlist", groupAllowFrom: [], accounts: { alt: { - connection: { - wsUrl: "tcp://127.0.0.1:5225", - }, dmPolicy: "allowlist", allowFrom: [], groupPolicy: "allowlist", @@ -48,11 +38,7 @@ describe("simplex doctor", () => { }) ?? []); expect(warnings.join("\n")).toContain("Legacy channels.simplex config is present"); - expect(warnings.join("\n")).toContain('connection.wsUrl="http://127.0.0.1:5225"'); expect(warnings.join("\n")).toContain('dmPolicy="allowlist" is configured with an empty'); expect(warnings.join("\n")).toContain('groupPolicy="allowlist" is configured with an empty'); - expect(warnings.join("\n")).toContain( - 'account "alt" has connection.wsUrl="tcp://127.0.0.1:5225"' - ); }); }); diff --git a/src/channel/simplex-doctor.ts b/src/channel/diagnostics/simplex-doctor.ts similarity index 80% rename from src/channel/simplex-doctor.ts rename to src/channel/diagnostics/simplex-doctor.ts index d878f44..bdc8bb7 100644 --- a/src/channel/simplex-doctor.ts +++ b/src/channel/diagnostics/simplex-doctor.ts @@ -1,6 +1,6 @@ import type { ChannelDoctorAdapter } from "openclaw/plugin-sdk/channel-contract"; -import type { SimplexAccountConfig, SimplexChannelConfig } from "../config/config-schema.js"; -import { LEGACY_SIMPLEX_CHANNEL_ID, SIMPLEX_CHANNEL_ID } from "../constants.js"; +import type { SimplexAccountConfig, SimplexChannelConfig } from "../../config/config-schema.js"; +import { LEGACY_SIMPLEX_CHANNEL_ID, SIMPLEX_CHANNEL_ID } from "../../constants.js"; function isEmptyArray(value: unknown): boolean { return Array.isArray(value) && value.length === 0; @@ -13,16 +13,9 @@ function readChannelConfig(cfg: { channels?: Record }): Simplex function collectAccountWarnings( channel: SimplexChannelConfig, accountId: string, - account: SimplexAccountConfig, - doctorFixCommand: string + account: SimplexAccountConfig ): string[] { const warnings: string[] = []; - const wsUrl = account.connection?.wsUrl ?? ""; - if (wsUrl && !/^wss?:\/\//i.test(wsUrl)) { - warnings.push( - `- SimpleX account "${accountId}" has connection.wsUrl="${wsUrl}". Use ws:// or wss://, then run ${doctorFixCommand}.` - ); - } const inheritedAllowFrom = account.allowFrom ?? channel.allowFrom; if (account.dmPolicy === "allowlist" && isEmptyArray(inheritedAllowFrom)) { @@ -54,11 +47,6 @@ export const simplexDoctor: ChannelDoctorAdapter = { } const channel = readChannelConfig(cfg); - const baseWsUrl = typeof channel.connection?.wsUrl === "string" ? channel.connection.wsUrl : ""; - if (baseWsUrl && !/^wss?:\/\//i.test(baseWsUrl)) { - warnings.push(`- SimpleX connection.wsUrl="${baseWsUrl}" must start with ws:// or wss://.`); - } - if (channel.dmPolicy === "allowlist" && isEmptyArray(channel.allowFrom)) { warnings.push( '- SimpleX dmPolicy="allowlist" is configured with an empty allowFrom list. New contacts will be dropped until allowFrom is populated.' @@ -75,7 +63,7 @@ export const simplexDoctor: ChannelDoctorAdapter = { if (!account) { continue; } - warnings.push(...collectAccountWarnings(channel, accountId, account, doctorFixCommand)); + warnings.push(...collectAccountWarnings(channel, accountId, account)); } return warnings; diff --git a/src/channel/simplex-status.ts b/src/channel/diagnostics/simplex-status.ts similarity index 58% rename from src/channel/simplex-status.ts rename to src/channel/diagnostics/simplex-status.ts index 3fcb19d..9c30d91 100644 --- a/src/channel/simplex-status.ts +++ b/src/channel/diagnostics/simplex-status.ts @@ -1,16 +1,10 @@ +import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { SIMPLEX_CHANNEL_ID } from "../constants.js"; -import type { SimplexClientRegistry } from "./simplex-client-registry.js"; -import { - DEFAULT_ACCOUNT_ID, - extractSimplexWsUrlFromApplication, - resolveSimplexHealthState, -} from "./simplex-common.js"; +import { SIMPLEX_CHANNEL_ID } from "../../constants.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import { resolveSimplexHealthState } from "../shared/simplex-common.js"; -export function buildSimplexStatus( - _registry: SimplexClientRegistry -): NonNullable["status"]> { +export function buildSimplexStatus(): NonNullable["status"]> { return { defaultRuntime: { accountId: DEFAULT_ACCOUNT_ID, @@ -21,40 +15,41 @@ export function buildSimplexStatus( }, collectStatusIssues: (accounts) => accounts.flatMap((account) => { + const issues = []; const lastError = typeof account.lastError === "string" ? account.lastError.trim() : ""; - if (!lastError) { - return []; - } - return [ - { + if (lastError) { + issues.push({ channel: SIMPLEX_CHANNEL_ID, accountId: account.accountId, kind: "runtime" as const, message: `Channel error: ${lastError}`, - }, - ]; + }); + } + + return issues; }), - buildChannelSummary: ({ snapshot, account }) => ({ - configured: snapshot.configured ?? false, - running: snapshot.running ?? false, - connected: snapshot.connected ?? false, - lastStartAt: snapshot.lastStartAt ?? null, - lastStopAt: snapshot.lastStopAt ?? null, - lastError: snapshot.lastError ?? null, - lastConnectedAt: snapshot.lastConnectedAt ?? null, - lastDisconnect: snapshot.lastDisconnect ?? null, - lastEventAt: snapshot.lastEventAt ?? null, - healthState: resolveSimplexHealthState({ + buildChannelSummary: ({ snapshot, account }) => { + return { configured: snapshot.configured ?? false, running: snapshot.running ?? false, connected: snapshot.connected ?? false, + lastStartAt: snapshot.lastStartAt ?? null, + lastStopAt: snapshot.lastStopAt ?? null, lastError: snapshot.lastError ?? null, - }), - mode: snapshot.mode ?? null, - wsUrl: extractSimplexWsUrlFromApplication(snapshot.application) ?? account.wsUrl ?? null, - }), + lastConnectedAt: snapshot.lastConnectedAt ?? null, + lastDisconnect: snapshot.lastDisconnect ?? null, + lastEventAt: snapshot.lastEventAt ?? null, + healthState: resolveSimplexHealthState({ + configured: snapshot.configured ?? false, + running: snapshot.running ?? false, + connected: snapshot.connected ?? false, + lastError: snapshot.lastError ?? null, + }), + mode: snapshot.mode ?? null, + dbFilePrefix: account.dbFilePrefix, + }; + }, buildAccountSnapshot: async ({ account, runtime }) => { - const wsUrl = extractSimplexWsUrlFromApplication(runtime?.application) ?? account.wsUrl; return { accountId: account.accountId, name: account.name, @@ -78,7 +73,7 @@ export function buildSimplexStatus( lastOutboundAt: runtime?.lastOutboundAt ?? null, lastEventAt: runtime?.lastEventAt ?? null, application: { - wsUrl, + dbFilePrefix: account.dbFilePrefix, }, }; }, diff --git a/src/channel/events/simplex-event-parser.ts b/src/channel/events/simplex-event-parser.ts new file mode 100644 index 0000000..0abd4de --- /dev/null +++ b/src/channel/events/simplex-event-parser.ts @@ -0,0 +1,113 @@ +import type { SimplexChatContext, SimplexChatItem } from "../../types/events.js"; +import { stripSimplexPrefix } from "../shared/simplex-common.js"; + +const INBOUND_DIRS = new Set(["directRcv", "groupRcv"]); + +export function normalizeSimplexSenderId(value?: string | null): string | undefined { + let trimmed = value?.trim(); + if (!trimmed) { + return undefined; + } + trimmed = stripSimplexPrefix(trimmed); + if (!trimmed) { + return undefined; + } + if (trimmed.startsWith("@")) { + trimmed = trimmed.slice(1).trim(); + } else { + const kindLower = trimmed.toLowerCase(); + if (kindLower.startsWith("contact:")) { + trimmed = trimmed.slice("contact:".length).trim(); + } else if (kindLower.startsWith("user:")) { + trimmed = trimmed.slice("user:".length).trim(); + } else if (kindLower.startsWith("member:")) { + trimmed = trimmed.slice("member:".length).trim(); + } + } + return trimmed || undefined; +} + +export function resolveSimplexMessageText( + content: { type?: string; text?: string } | undefined, + fileName?: string +): string { + if (!content) { + return ""; + } + const text = content.text?.trim() ?? ""; + if (text) { + return text; + } + switch (content.type) { + case "image": + return "[image]"; + case "video": + return "[video]"; + case "voice": + return "[voice message]"; + case "file": + return fileName ? `[file: ${fileName}]` : "[file]"; + case "link": + return "[link]"; + case "report": + return "[report]"; + case "chat": + return "[chat]"; + default: + return "[message]"; + } +} + +export function isInboundSimplexChatItem(item: SimplexChatItem): boolean { + const dir = item.chatItem?.chatDir?.type; + return Boolean(dir && INBOUND_DIRS.has(dir)); +} + +export function resolveSimplexChatContext(item: SimplexChatItem): SimplexChatContext | null { + const info = item.chatInfo; + if (!info || !item.chatItem) { + return null; + } + if (info.type === "direct") { + const contactId = info.contact?.contactId; + if (typeof contactId !== "number") { + return null; + } + const senderName = + info.contact?.localDisplayName?.trim() || + info.contact?.profile?.displayName?.trim() || + undefined; + return { + chatType: "direct", + chatId: contactId, + chatLabel: senderName || `contact:${contactId}`, + senderId: String(contactId), + senderName, + }; + } + if (info.type === "group") { + const groupId = info.groupInfo?.groupId; + if (typeof groupId !== "number") { + return null; + } + const member = item.chatItem?.chatDir?.groupMember; + const contactId = + typeof member?.contactId === "number" + ? String(member.contactId) + : member?.contactId?.trim() || undefined; + const senderId = + contactId ?? + member?.memberId?.trim() ?? + (typeof member?.groupMemberId === "number" ? String(member.groupMemberId) : undefined); + const senderName = member?.localDisplayName?.trim() || undefined; + const groupLabel = info.groupInfo?.localDisplayName?.trim() || `group:${groupId}`; + return { + chatType: "group", + chatId: groupId, + chatLabel: groupLabel, + senderId: senderId || undefined, + senderName, + }; + } + return null; +} diff --git a/src/channel/events/simplex-inbound-auth.test.ts b/src/channel/events/simplex-inbound-auth.test.ts new file mode 100644 index 0000000..940cb1c --- /dev/null +++ b/src/channel/events/simplex-inbound-auth.test.ts @@ -0,0 +1,140 @@ +import { describe, expect, it, vi } from "vitest"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { SimplexChatContext } from "../../types/events.js"; +import { resolveSimplexInboundAccess } from "./simplex-inbound-auth.js"; + +function account(config: ResolvedSimplexAccount["config"] = {}): ResolvedSimplexAccount { + return { + accountId: "default", + enabled: true, + configured: true, + mode: "node", + dbFilePrefix: "/tmp/simplex", + config, + }; +} + +function directContext(): SimplexChatContext { + return { + chatType: "direct", + chatId: 42, + chatLabel: "Alice", + senderId: "42", + senderName: "Alice", + }; +} + +function groupContext(): SimplexChatContext { + return { + chatType: "group", + chatId: 7, + chatLabel: "Ops", + senderId: "42", + senderName: "Alice", + }; +} + +function runtimeCore( + params: { + storeAllowFrom?: string[]; + shouldComputeAuth?: boolean; + commandAuthorized?: boolean; + mentioned?: boolean; + controlCommand?: boolean; + } = {} +) { + return { + channel: { + commands: { + shouldComputeCommandAuthorized: vi.fn(() => params.shouldComputeAuth ?? false), + resolveCommandAuthorizedFromAuthorizers: vi.fn(() => params.commandAuthorized ?? false), + shouldHandleTextCommands: vi.fn(() => true), + isControlCommandMessage: vi.fn(() => params.controlCommand ?? false), + }, + pairing: { + readAllowFromStore: vi.fn(async () => params.storeAllowFrom ?? []), + upsertPairingRequest: vi.fn(async () => ({ code: "123456", created: true })), + buildPairingReply: vi.fn(() => "pairing reply"), + }, + mentions: { + buildMentionRegexes: vi.fn(() => [/agent/i]), + matchesMentionPatterns: vi.fn(() => params.mentioned ?? false), + }, + text: { + hasControlCommand: vi.fn(() => params.controlCommand ?? false), + }, + }, + }; +} + +const runtime = { + log: vi.fn(), + error: vi.fn(), + exit: vi.fn(), +} as never; + +describe("resolveSimplexInboundAccess", () => { + it("creates a pairing request and rejects unknown DMs in pairing mode", async () => { + const core = runtimeCore(); + const replyToPairingRequest = vi.fn(async () => undefined); + + const result = await resolveSimplexInboundAccess({ + account: account({ dmPolicy: "pairing" }), + cfg: {}, + runtime, + core: core as never, + context: directContext(), + rawBody: "hello", + normalizedSenderId: "42", + routeAgentId: "agent", + replyToPairingRequest, + }); + + expect(result.allowed).toBe(false); + expect(core.channel.pairing.upsertPairingRequest).toHaveBeenCalledWith( + expect.objectContaining({ id: "42", accountId: "default" }) + ); + expect(replyToPairingRequest).toHaveBeenCalledWith("pairing reply"); + }); + + it("allows allowlisted group messages when mention policy is satisfied", async () => { + const result = await resolveSimplexInboundAccess({ + account: account({ groupPolicy: "allowlist", groupAllowFrom: ["group:7"] }), + cfg: {}, + runtime, + core: runtimeCore({ mentioned: true }) as never, + context: groupContext(), + rawBody: "@agent status", + normalizedSenderId: "42", + routeAgentId: "agent", + replyToPairingRequest: vi.fn(), + }); + + expect(result).toMatchObject({ + allowed: true, + effectiveWasMentioned: true, + }); + }); + + it("rejects unauthorized group control commands", async () => { + const result = await resolveSimplexInboundAccess({ + account: account({ groupPolicy: "open" }), + cfg: { commands: { useAccessGroups: true } }, + runtime, + core: runtimeCore({ + shouldComputeAuth: true, + commandAuthorized: false, + mentioned: true, + controlCommand: true, + }) as never, + context: groupContext(), + rawBody: "!approve", + normalizedSenderId: "42", + routeAgentId: "agent", + replyToPairingRequest: vi.fn(), + }); + + expect(result.allowed).toBe(false); + expect(result.commandAuthorized).toBe(false); + }); +}); diff --git a/src/channel/events/simplex-inbound-auth.ts b/src/channel/events/simplex-inbound-auth.ts new file mode 100644 index 0000000..1fe2642 --- /dev/null +++ b/src/channel/events/simplex-inbound-auth.ts @@ -0,0 +1,196 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-inbound"; +import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; +import { SIMPLEX_CHANNEL_ID } from "../../constants.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { SimplexChatContext } from "../../types/events.js"; +import type { getSimplexRuntime } from "../runtime.js"; +import { isSimplexAllowlisted } from "../security/simplex-security.js"; + +type SimplexRuntimeCore = ReturnType; + +export type SimplexInboundAccessResult = { + allowed: boolean; + commandAuthorized?: boolean; + effectiveWasMentioned?: boolean; +}; + +function resolveSimplexGroupRequireMention(params: { + account: ResolvedSimplexAccount; + groupId?: number | null; +}): boolean { + const groupId = params.groupId ? String(params.groupId) : undefined; + const groups = params.account.config.groups ?? {}; + const entry = groupId ? groups[groupId] : undefined; + const fallback = groups["*"]; + if (typeof entry?.requireMention === "boolean") { + return entry.requireMention; + } + if (typeof fallback?.requireMention === "boolean") { + return fallback.requireMention; + } + return true; +} + +export async function resolveSimplexInboundAccess(params: { + account: ResolvedSimplexAccount; + cfg: OpenClawConfig; + runtime: RuntimeEnv; + core: SimplexRuntimeCore; + context: SimplexChatContext; + rawBody: string; + normalizedSenderId?: string; + routeAgentId: string; + replyToPairingRequest: (text: string) => Promise; +}): Promise { + const { account, cfg, runtime, core, context, rawBody, normalizedSenderId } = params; + const isGroup = context.chatType === "group"; + const dmPolicy = account.config.dmPolicy ?? "pairing"; + const defaultGroupPolicy = cfg.channels?.defaults?.groupPolicy; + const groupPolicy = account.config.groupPolicy ?? defaultGroupPolicy ?? "allowlist"; + const configAllowFrom = (account.config.allowFrom ?? []).map((entry) => String(entry)); + const configGroupAllowFrom = (account.config.groupAllowFrom ?? []).map((entry) => String(entry)); + const shouldComputeAuth = core.channel.commands.shouldComputeCommandAuthorized(rawBody, cfg); + const shouldLoadAllowFromStore = + (!isGroup && (dmPolicy !== "open" || shouldComputeAuth)) || + (isGroup && (groupPolicy !== "open" || shouldComputeAuth)); + const storeAllowFrom = shouldLoadAllowFromStore + ? await core.channel.pairing + .readAllowFromStore({ + channel: SIMPLEX_CHANNEL_ID, + accountId: account.accountId, + }) + .catch(() => []) + : []; + const effectiveDmAllowFrom = [...configAllowFrom, ...storeAllowFrom]; + const baseGroupAllowFrom = + configGroupAllowFrom.length > 0 ? configGroupAllowFrom : configAllowFrom; + const effectiveGroupAllowFrom = [...baseGroupAllowFrom, ...storeAllowFrom]; + const allowlistForCommands = isGroup ? effectiveGroupAllowFrom : effectiveDmAllowFrom; + const senderAllowedForCommands = isSimplexAllowlisted({ + allowFrom: allowlistForCommands, + senderId: normalizedSenderId, + groupId: String(context.chatId), + allowGroupId: isGroup, + }); + const useAccessGroups = cfg.commands?.useAccessGroups !== false; + const commandAuthorized = shouldComputeAuth + ? core.channel.commands.resolveCommandAuthorizedFromAuthorizers({ + useAccessGroups, + authorizers: [ + { + configured: allowlistForCommands.length > 0, + allowed: senderAllowedForCommands, + }, + ], + }) + : undefined; + + if (isGroup) { + if (groupPolicy === "disabled") { + runtime.log?.(`[${account.accountId}] SimpleX drop group (groupPolicy=disabled)`); + return { allowed: false, commandAuthorized }; + } + if (groupPolicy === "allowlist") { + if (effectiveGroupAllowFrom.length === 0) { + runtime.log?.( + `[${account.accountId}] SimpleX drop group (groupPolicy=allowlist, empty allowlist)` + ); + return { allowed: false, commandAuthorized }; + } + const allowed = isSimplexAllowlisted({ + allowFrom: effectiveGroupAllowFrom, + senderId: normalizedSenderId, + groupId: String(context.chatId), + allowGroupId: true, + }); + if (!allowed) { + runtime.log?.( + `[${account.accountId}] SimpleX drop group sender ${context.senderId ?? "unknown"} (not allowlisted)` + ); + return { allowed: false, commandAuthorized }; + } + } + } else if (dmPolicy !== "open") { + const allowed = isSimplexAllowlisted({ + allowFrom: effectiveDmAllowFrom, + senderId: normalizedSenderId, + allowGroupId: false, + }); + if (!allowed) { + if (dmPolicy === "pairing") { + const senderId = normalizedSenderId ?? String(context.chatId); + const { code, created } = await core.channel.pairing.upsertPairingRequest({ + channel: SIMPLEX_CHANNEL_ID, + id: senderId, + accountId: account.accountId, + meta: { name: context.senderName }, + }); + if (created) { + runtime.log?.(`[${account.accountId}] SimpleX pairing request sender=${senderId}`); + try { + await params.replyToPairingRequest( + core.channel.pairing.buildPairingReply({ + channel: SIMPLEX_CHANNEL_ID, + idLine: `Your SimpleX contact id: ${senderId}`, + code, + }) + ); + } catch (err) { + runtime.error?.(`[${account.accountId}] SimpleX pairing reply failed: ${String(err)}`); + } + } + } else { + runtime.log?.( + `[${account.accountId}] SimpleX drop DM from ${context.senderId ?? "unknown"} (dmPolicy=${dmPolicy})` + ); + } + return { allowed: false, commandAuthorized }; + } + } + + let effectiveWasMentioned: boolean | undefined; + if (isGroup) { + const requireMention = resolveSimplexGroupRequireMention({ + account, + groupId: context.chatId, + }); + const mentionRegexes = core.channel.mentions.buildMentionRegexes(cfg, params.routeAgentId); + const wasMentioned = core.channel.mentions.matchesMentionPatterns(rawBody, mentionRegexes); + const allowTextCommands = core.channel.commands.shouldHandleTextCommands({ + cfg, + surface: SIMPLEX_CHANNEL_ID, + }); + const mentionGate = resolveInboundMentionDecision({ + facts: { + canDetectMention: mentionRegexes.length > 0, + wasMentioned, + }, + policy: { + isGroup: true, + requireMention, + allowTextCommands, + hasControlCommand: core.channel.text.hasControlCommand(rawBody, cfg), + commandAuthorized: commandAuthorized === true, + }, + }); + effectiveWasMentioned = mentionGate.effectiveWasMentioned; + if (mentionGate.shouldSkip) { + runtime.log?.( + `[${account.accountId}] SimpleX drop group ${context.chatId} (mention required)` + ); + return { allowed: false, commandAuthorized, effectiveWasMentioned }; + } + } + + if (isGroup && core.channel.commands.isControlCommandMessage(rawBody, cfg)) { + if (commandAuthorized !== true) { + runtime.log?.( + `[${account.accountId}] SimpleX drop control command from ${context.senderId ?? "unknown"}` + ); + return { allowed: false, commandAuthorized, effectiveWasMentioned }; + } + } + + return { allowed: true, commandAuthorized, effectiveWasMentioned }; +} diff --git a/src/channel/events/simplex-inbound-context.test.ts b/src/channel/events/simplex-inbound-context.test.ts new file mode 100644 index 0000000..623183c --- /dev/null +++ b/src/channel/events/simplex-inbound-context.test.ts @@ -0,0 +1,72 @@ +import { describe, expect, it, vi } from "vitest"; +import type { SimplexChatContext } from "../../types/events.js"; +import { buildSimplexInboundDispatchContext } from "./simplex-inbound-context.js"; + +function groupContext(): SimplexChatContext { + return { + chatType: "group", + chatId: 7, + chatLabel: "Ops", + senderId: "42", + senderName: "Alice", + }; +} + +function runtimeCore() { + return { + channel: { + session: { + resolveStorePath: vi.fn(() => "/tmp/session-store"), + readSessionUpdatedAt: vi.fn(() => 123), + }, + reply: { + resolveEnvelopeFormatOptions: vi.fn(() => ({ enabled: true })), + formatAgentEnvelope: vi.fn(({ body }) => `wrapped:${body}`), + finalizeInboundContext: vi.fn((ctx) => ctx), + }, + }, + }; +} + +describe("buildSimplexInboundDispatchContext", () => { + it("builds a group inbound context with route and authorization metadata", () => { + const core = runtimeCore(); + + const result = buildSimplexInboundDispatchContext({ + core: core as never, + cfg: {}, + context: groupContext(), + route: { + agentId: "agent", + accountId: "default", + sessionKey: "simplex:group:7", + }, + rawBody: "hello", + dmPeerId: "42", + currentMessageId: 99, + effectiveWasMentioned: true, + commandAuthorized: true, + }); + + expect(result.storePath).toBe("/tmp/session-store"); + expect(result.sessionKey).toBe("simplex:group:7"); + expect(result.ctxPayload).toMatchObject({ + Body: "wrapped:hello", + RawBody: "hello", + From: "openclaw-simplex:group:7", + To: "openclaw-simplex:group:7", + AccountId: "default", + ChatType: "group", + ConversationLabel: "group:7", + GroupSubject: "Ops", + MessageSid: "99", + CurrentMessageId: "99", + WasMentioned: true, + CommandAuthorized: true, + OriginatingTo: "openclaw-simplex:group:7", + }); + expect(core.channel.session.resolveStorePath).toHaveBeenCalledWith(undefined, { + agentId: "agent", + }); + }); +}); diff --git a/src/channel/events/simplex-inbound-context.ts b/src/channel/events/simplex-inbound-context.ts new file mode 100644 index 0000000..1dbf85e --- /dev/null +++ b/src/channel/events/simplex-inbound-context.ts @@ -0,0 +1,96 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { SIMPLEX_CHANNEL_ID } from "../../constants.js"; +import type { SimplexChatContext } from "../../types/events.js"; +import type { getSimplexRuntime } from "../runtime.js"; + +type SimplexRuntimeCore = ReturnType; + +type SimplexAgentRoute = { + agentId: string; + sessionKey: string; + accountId: string; +}; + +export function buildSimplexInboundDispatchContext(params: { + core: SimplexRuntimeCore; + cfg: OpenClawConfig; + context: SimplexChatContext; + route: SimplexAgentRoute; + rawBody: string; + dmPeerId: string; + currentMessageId?: number; + effectiveWasMentioned?: boolean; + commandAuthorized?: boolean; +}): { + ctxPayload: Record; + storePath: string; + sessionKey: string; +} { + const { + core, + cfg, + context, + route, + rawBody, + dmPeerId, + currentMessageId, + effectiveWasMentioned, + commandAuthorized, + } = params; + const storePath = core.channel.session.resolveStorePath(cfg.session?.store, { + agentId: route.agentId, + }); + + const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(cfg); + const previousTimestamp = core.channel.session.readSessionUpdatedAt({ + storePath, + sessionKey: route.sessionKey, + }); + + const fromLabel = + context.chatType === "group" + ? `group:${context.chatId}` + : context.senderName || `contact:${context.senderId ?? "unknown"}`; + + const body = core.channel.reply.formatAgentEnvelope({ + channel: "SimpleX", + from: fromLabel, + previousTimestamp, + envelope: envelopeOptions, + body: rawBody, + }); + + const conversationId = + context.chatType === "group" + ? `${SIMPLEX_CHANNEL_ID}:group:${context.chatId}` + : `${SIMPLEX_CHANNEL_ID}:${dmPeerId}`; + + const ctxPayload = core.channel.reply.finalizeInboundContext({ + Body: body, + RawBody: rawBody, + CommandBody: rawBody, + From: conversationId, + To: conversationId, + SessionKey: route.sessionKey, + AccountId: route.accountId, + ChatType: context.chatType === "group" ? "group" : "direct", + ConversationLabel: fromLabel, + GroupSubject: context.chatType === "group" ? context.chatLabel : undefined, + SenderName: context.senderName, + SenderId: context.senderId, + Provider: SIMPLEX_CHANNEL_ID, + Surface: SIMPLEX_CHANNEL_ID, + MessageSid: currentMessageId !== undefined ? String(currentMessageId) : undefined, + CurrentMessageId: currentMessageId !== undefined ? String(currentMessageId) : undefined, + WasMentioned: context.chatType === "group" ? effectiveWasMentioned : undefined, + CommandAuthorized: commandAuthorized, + OriginatingChannel: SIMPLEX_CHANNEL_ID, + OriginatingTo: conversationId, + }); + + return { + ctxPayload, + storePath, + sessionKey: route.sessionKey, + }; +} diff --git a/src/channel/events/simplex-inbound-files.ts b/src/channel/events/simplex-inbound-files.ts new file mode 100644 index 0000000..90963b4 --- /dev/null +++ b/src/channel/events/simplex-inbound-files.ts @@ -0,0 +1,168 @@ +import type { ChannelAccountSnapshot } from "openclaw/plugin-sdk/channel-contract"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; +import type { SimplexClient } from "../../simplex/runtime/client.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import { getSimplexRuntime } from "../runtime.js"; + +const PENDING_FILE_TIMEOUT_MS = 90_000; + +type SimplexReplyPayload = { + text?: string; + mediaUrl?: string; + mediaUrls?: string[]; + audioAsVoice?: boolean; + replyToId?: string | number | null; +}; + +export type PendingInboundFile = { + fileId: number; + ctxPayload: Record; + storePath: string; + sessionKey: string; + account: ResolvedSimplexAccount; + cfg: OpenClawConfig; + runtime: RuntimeEnv; + client: SimplexClient; + sendPayload: (payload: SimplexReplyPayload) => Promise; + statusSink?: (patch: Partial) => void; +}; + +const pendingFiles = new Map(); + +function pendingKey(accountId: string, fileId: number): string { + return `${accountId}:${fileId}`; +} + +export async function requestFileDownload(params: { + fileId: number; + account: ResolvedSimplexAccount; + client: SimplexClient; + runtime: RuntimeEnv; +}): Promise { + const { fileId, account, client, runtime } = params; + const autoAccept = account.config.autoAcceptFiles !== false; + if (!autoAccept) { + return false; + } + try { + await client.withApi((api) => api.apiReceiveFile(fileId)); + } catch (err) { + runtime.error?.(`[${account.accountId}] SimpleX receive file failed: ${String(err)}`); + return false; + } + return true; +} + +export function queuePendingFile(params: { + pending: PendingInboundFile; + accountId: string; + fileId: number; +}): void { + const { pending, accountId, fileId } = params; + pendingFiles.set(pendingKey(accountId, fileId), pending); + setTimeout(() => { + const key = pendingKey(accountId, fileId); + const current = pendingFiles.get(key); + if (!current) { + return; + } + pendingFiles.delete(key); + void current.client + .withApi((api) => api.apiCancelFile(fileId)) + .catch((err) => { + current.runtime.error?.( + `[${accountId}] SimpleX file timeout cancel failed: ${String(err)}` + ); + }); + void dispatchInbound({ + pending: current, + mediaPath: undefined, + mediaType: undefined, + }).catch((err) => { + current.runtime.error?.(`[${accountId}] SimpleX pending file timeout: ${String(err)}`); + }); + }, PENDING_FILE_TIMEOUT_MS); +} + +export async function finalizePendingFile(params: { + accountId: string; + fileId: number; + filePath?: string; +}): Promise { + const pending = pendingFiles.get(pendingKey(params.accountId, params.fileId)); + if (!pending) { + return; + } + pendingFiles.delete(pendingKey(params.accountId, params.fileId)); + const mediaPath = params.filePath?.trim() || undefined; + let mediaType: string | undefined; + if (mediaPath) { + mediaType = await getSimplexRuntime().media.detectMime({ filePath: mediaPath }); + } + await dispatchInbound({ pending, mediaPath, mediaType }); +} + +export function hasPendingFile(accountId: string, fileId: number): boolean { + return pendingFiles.has(pendingKey(accountId, fileId)); +} + +export async function dispatchInbound(params: { + pending: PendingInboundFile; + mediaPath?: string; + mediaType?: string; +}): Promise { + const { pending, mediaPath, mediaType } = params; + const core = getSimplexRuntime(); + const ctxPayload = { + ...pending.ctxPayload, + MediaPath: mediaPath, + MediaType: mediaType, + MediaUrl: mediaPath, + }; + + await core.channel.session.recordInboundSession({ + storePath: pending.storePath, + sessionKey: (ctxPayload as { SessionKey?: string }).SessionKey ?? pending.sessionKey, + ctx: ctxPayload, + onRecordError: (err) => { + pending.runtime.error?.(`simplex: failed updating session meta: ${String(err)}`); + }, + }); + + pending.statusSink?.({ lastInboundAt: Date.now() }); + + await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({ + ctx: ctxPayload, + cfg: pending.cfg, + dispatcherOptions: { + deliver: async (payload) => { + const hasMedia = + Boolean(payload.mediaUrl) || + (Array.isArray(payload.mediaUrls) && payload.mediaUrls.length > 0); + if (!payload.text && !hasMedia) { + return; + } + if (!pending.account.enabled || !pending.account.configured) { + pending.runtime.error?.( + `[${pending.account.accountId}] SimpleX reply skipped: account not ready (enabled=${pending.account.enabled}, configured=${pending.account.configured})` + ); + return; + } + await pending.sendPayload(payload); + pending.statusSink?.({ lastOutboundAt: Date.now() }); + }, + onError: (err) => { + pending.runtime.error?.( + `[${pending.account.accountId}] SimpleX reply failed: ${String(err)}` + ); + }, + }, + replyOptions: { + disableBlockStreaming: + typeof pending.account.config.blockStreaming === "boolean" + ? !pending.account.config.blockStreaming + : undefined, + }, + }); +} diff --git a/src/channel/events/simplex-monitor.ts b/src/channel/events/simplex-monitor.ts new file mode 100644 index 0000000..b32a197 --- /dev/null +++ b/src/channel/events/simplex-monitor.ts @@ -0,0 +1,333 @@ +import type { ChannelAccountSnapshot } from "openclaw/plugin-sdk/channel-contract"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; +import { SIMPLEX_CHANNEL_ID } from "../../constants.js"; +import { formatSimplexChatRef, parseSimplexNumericId } from "../../simplex/runtime/api.js"; +import { SimplexClient } from "../../simplex/runtime/client.js"; +import { recordSimplexContactRequest } from "../../simplex/state/contact-requests.js"; +import { markSimplexEventSeen } from "../../simplex/state/event-dedupe.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { SimplexChatItem } from "../../types/events.js"; +import type { SimplexChatEvent } from "../../types/simplex.js"; +import { buildComposedMessages, resolveSimplexMediaMaxBytes } from "../media/simplex-media.js"; +import { sendSimplexComposedMessages } from "../messaging/simplex-send.js"; +import { getSimplexRuntime } from "../runtime.js"; +import { connectSimplexWithRetry } from "../transport/simplex-connect.js"; +import { + isInboundSimplexChatItem, + normalizeSimplexSenderId, + resolveSimplexChatContext, + resolveSimplexMessageText, +} from "./simplex-event-parser.js"; +import { resolveSimplexInboundAccess } from "./simplex-inbound-auth.js"; +import { buildSimplexInboundDispatchContext } from "./simplex-inbound-context.js"; +import { + dispatchInbound, + finalizePendingFile, + hasPendingFile, + type PendingInboundFile, + queuePendingFile, + requestFileDownload, +} from "./simplex-inbound-files.js"; + +export type SimplexMonitorOpts = { + account: ResolvedSimplexAccount; + cfg: OpenClawConfig; + runtime: RuntimeEnv; + abortSignal: AbortSignal; + statusSink?: (patch: Partial) => void; +}; + +async function sendSimplexPayload(params: { + client: SimplexClient; + chatRef: string; + cfg: OpenClawConfig; + accountId: string; + payload: { + text?: string; + mediaUrl?: string; + mediaUrls?: string[]; + audioAsVoice?: boolean; + replyToId?: string | number | null; + }; +}): Promise<{ messageId?: string }> { + const quotedItemId = + params.payload.replyToId === undefined || params.payload.replyToId === null + ? undefined + : parseSimplexNumericId(params.payload.replyToId); + const composedMessages = await buildComposedMessages({ + cfg: params.cfg, + accountId: params.accountId, + text: params.payload.text, + mediaUrl: params.payload.mediaUrl, + mediaUrls: params.payload.mediaUrls, + audioAsVoice: params.payload.audioAsVoice, + quotedItemId: quotedItemId ?? undefined, + }); + if (composedMessages.length === 0) { + return {}; + } + return await sendSimplexComposedMessages({ + chatRef: params.chatRef, + composedMessages, + send: (apiChatRef, messages) => + params.client.withApi((api) => api.apiSendMessages(apiChatRef, messages)), + }); +} + +export async function startSimplexMonitor(params: SimplexMonitorOpts): Promise<{ + client: SimplexClient; +}> { + const { account, cfg, runtime, statusSink } = params; + const client = new SimplexClient({ + account, + logger: { + info: (message) => runtime?.log?.(message), + warn: (message) => runtime?.error?.(message), + error: (message) => runtime?.error?.(message), + }, + }); + + const stopConnectionState = client.onConnectionState((state) => { + if (state.connected) { + statusSink?.({ + connected: true, + running: true, + lastConnectedAt: state.at, + lastDisconnect: null, + lastError: null, + healthState: "healthy", + }); + return; + } + + statusSink?.({ + connected: false, + running: state.expected ? false : undefined, + lastDisconnect: state.error ? { at: state.at, error: state.error } : { at: state.at }, + ...(state.error ? { lastError: state.error } : {}), + healthState: state.expected ? "stopped" : "disconnected", + }); + }); + + await connectSimplexWithRetry({ + client, + runtime, + accountId: account.accountId, + abortSignal: params.abortSignal, + }); + + const stopListening = client.onEvent(async (event) => { + try { + await handleSimplexEvent({ event, account, cfg, runtime, statusSink, client }); + } catch (err) { + runtime.error?.(`[${account.accountId}] SimpleX event error: ${String(err)}`); + } + }); + + params.abortSignal.addEventListener( + "abort", + () => { + stopConnectionState(); + stopListening(); + client.close().catch((err) => { + runtime.error?.(`[${account.accountId}] SimpleX close failed: ${String(err)}`); + }); + }, + { once: true } + ); + + return { client }; +} + +async function handleSimplexEvent(params: { + event: SimplexChatEvent; + account: ResolvedSimplexAccount; + cfg: OpenClawConfig; + runtime: RuntimeEnv; + statusSink?: (patch: Partial) => void; + client: SimplexClient; +}): Promise { + const { event, account, cfg, runtime, statusSink, client } = params; + statusSink?.({ lastEventAt: Date.now() }); + if (event.type === "receivedContactRequest") { + await recordSimplexContactRequest({ + accountId: account.accountId, + contactRequest: (event as { contactRequest?: unknown }).contactRequest, + }); + return; + } + + if (event.type === "rcvFileDescrReady") { + const fileId = Number( + (event as { rcvFileTransfer?: { fileId?: number } })?.rcvFileTransfer?.fileId + ); + if (Number.isFinite(fileId)) { + await requestFileDownload({ fileId, account, client, runtime }); + } + return; + } + + if (event.type === "rcvFileComplete") { + const chatItem = (event as { chatItem?: SimplexChatItem })?.chatItem; + const file = chatItem?.chatItem?.file; + const fileId = typeof file?.fileId === "number" ? file.fileId : null; + if (fileId && hasPendingFile(account.accountId, fileId)) { + const filePath = file?.fileSource?.filePath?.trim(); + await finalizePendingFile({ + accountId: account.accountId, + fileId, + filePath, + }); + } + return; + } + + if (event.type !== "newChatItems") { + return; + } + + const chatItems = event.chatItems; + const items = Array.isArray(chatItems) ? (chatItems as SimplexChatItem[]) : []; + + for (const item of items) { + if (!isInboundSimplexChatItem(item)) { + continue; + } + + const context = resolveSimplexChatContext(item); + if (!context) { + continue; + } + + const content = + item.chatItem?.content?.type === "rcvMsgContent" + ? item.chatItem?.content?.msgContent + : undefined; + + if (!content) { + continue; + } + + const rawBody = resolveSimplexMessageText(content, item.chatItem?.file?.fileName); + if (!rawBody) { + continue; + } + + const currentMessageId = + typeof item.chatItem?.meta?.itemId === "number" ? item.chatItem.meta.itemId : undefined; + + const normalizedSenderId = normalizeSimplexSenderId(context.senderId); + const dmPeerId = normalizedSenderId ?? String(context.chatId); + const chatRef = formatSimplexChatRef({ + type: context.chatType, + id: context.chatType === "group" ? context.chatId : dmPeerId, + }); + + if ( + currentMessageId !== undefined && + !(await markSimplexEventSeen({ + accountId: account.accountId, + chatId: context.chatId, + messageId: currentMessageId, + })) + ) { + continue; + } + + const core = getSimplexRuntime(); + + const route = core.channel.routing.resolveAgentRoute({ + cfg, + channel: SIMPLEX_CHANNEL_ID, + accountId: account.accountId, + peer: { + kind: context.chatType === "group" ? "group" : "direct", + id: context.chatType === "group" ? String(context.chatId) : dmPeerId, + }, + }); + + const access = await resolveSimplexInboundAccess({ + account, + cfg, + runtime, + core, + context, + rawBody, + normalizedSenderId, + routeAgentId: route.agentId, + replyToPairingRequest: async (text) => { + await sendSimplexPayload({ + client, + chatRef, + cfg, + accountId: account.accountId, + payload: { + text, + replyToId: currentMessageId, + }, + }); + statusSink?.({ lastOutboundAt: Date.now() }); + }, + }); + if (!access.allowed) { + continue; + } + + const { ctxPayload, storePath } = buildSimplexInboundDispatchContext({ + core, + cfg, + context, + route, + rawBody, + dmPeerId, + currentMessageId, + effectiveWasMentioned: access.effectiveWasMentioned, + commandAuthorized: access.commandAuthorized, + }); + + const fileId = item.chatItem?.file?.fileId; + const fileSize = item.chatItem?.file?.fileSize; + const maxBytes = resolveSimplexMediaMaxBytes({ + cfg, + accountId: account.accountId, + }); + + const pending: PendingInboundFile = { + fileId: typeof fileId === "number" ? fileId : -1, + ctxPayload, + storePath, + sessionKey: route.sessionKey, + account, + cfg, + runtime, + client, + sendPayload: async (payload) => { + await sendSimplexPayload({ + client, + chatRef, + cfg, + accountId: account.accountId, + payload: { ...payload, replyToId: currentMessageId }, + }); + }, + statusSink, + }; + + if (typeof fileId === "number") { + if (typeof fileSize === "number" && fileSize > maxBytes) { + runtime.error?.( + `[${account.accountId}] SimpleX file ${fileId} exceeds limit (${fileSize} > ${maxBytes})` + ); + continue; + } + const accepted = await requestFileDownload({ fileId, account, client, runtime }); + if (accepted) { + queuePendingFile({ pending, accountId: account.accountId, fileId }); + continue; + } + } + + await dispatchInbound({ pending, mediaPath: undefined, mediaType: undefined }); + } +} diff --git a/src/channel/simplex-gateway-runtime.ts b/src/channel/gateway/simplex-gateway-runtime.ts similarity index 59% rename from src/channel/simplex-gateway-runtime.ts rename to src/channel/gateway/simplex-gateway-runtime.ts index 7ea1617..b35dead 100644 --- a/src/channel/simplex-gateway-runtime.ts +++ b/src/channel/gateway/simplex-gateway-runtime.ts @@ -1,19 +1,25 @@ import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import type { SimplexClientRegistry } from "./simplex-client-registry.js"; -import { startSimplexMonitor } from "./simplex-monitor.js"; +import { + getActiveSimplexClient, + registerActiveSimplexClient, + unregisterActiveSimplexClient, +} from "../../simplex/runtime/transport.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import { startSimplexMonitor } from "../events/simplex-monitor.js"; -export function buildSimplexGatewayRuntime( - activeClients: SimplexClientRegistry -): NonNullable["gateway"]> { +export function buildSimplexGatewayRuntime(): NonNullable< + ChannelPlugin["gateway"] +> { return { startAccount: async (ctx) => { const account = ctx.account; - ctx.log?.info?.(`[${account.accountId}] SimpleX start requested (wsUrl=${account.wsUrl})`); + ctx.log?.info?.(`[${account.accountId}] SimpleX start requested (mode=${account.mode})`); ctx.setStatus({ accountId: account.accountId, mode: account.mode, - application: { wsUrl: account.wsUrl }, + application: { + dbFilePrefix: account.dbFilePrefix, + }, }); ctx.log?.info?.(`[${account.accountId}] Starting SimpleX monitor`); @@ -26,7 +32,7 @@ export function buildSimplexGatewayRuntime( }); ctx.log?.info?.(`[${account.accountId}] SimpleX monitor started`); - activeClients.set(account.accountId, monitor.client); + await registerActiveSimplexClient(account, monitor.client); await new Promise((resolve) => { ctx.abortSignal.addEventListener( @@ -38,14 +44,14 @@ export function buildSimplexGatewayRuntime( ); }); - activeClients.delete(account.accountId); + unregisterActiveSimplexClient(account, monitor.client); await monitor.client.close().catch(() => undefined); }, stopAccount: async (ctx) => { - const client = activeClients.get(ctx.account.accountId); + const client = getActiveSimplexClient(ctx.account.accountId); if (client) { await client.close(); - activeClients.delete(ctx.account.accountId); + unregisterActiveSimplexClient(ctx.account, client); } }, }; diff --git a/src/channel/simplex-heartbeat.test.ts b/src/channel/gateway/simplex-heartbeat.test.ts similarity index 82% rename from src/channel/simplex-heartbeat.test.ts rename to src/channel/gateway/simplex-heartbeat.test.ts index 631fe98..6c09118 100644 --- a/src/channel/simplex-heartbeat.test.ts +++ b/src/channel/gateway/simplex-heartbeat.test.ts @@ -4,7 +4,7 @@ import { buildSimplexHeartbeat } from "./simplex-heartbeat.js"; describe("simplex heartbeat adapter", () => { it("reports not configured accounts as not ready", async () => { - const heartbeat = buildSimplexHeartbeat(new Map()); + const heartbeat = buildSimplexHeartbeat(); await expect( heartbeat.checkReady?.({ @@ -17,14 +17,14 @@ describe("simplex heartbeat adapter", () => { }); it("reports configured but stopped accounts as not running", async () => { - const heartbeat = buildSimplexHeartbeat(new Map()); + const heartbeat = buildSimplexHeartbeat(); await expect( heartbeat.checkReady?.({ cfg: { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", }, }, } as OpenClawConfig, @@ -36,14 +36,14 @@ describe("simplex heartbeat adapter", () => { }); it("resolves direct and group recipients from config", () => { - const heartbeat = buildSimplexHeartbeat(new Map()); + const heartbeat = buildSimplexHeartbeat(); expect( heartbeat.resolveRecipients?.({ cfg: { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", allowFrom: ["alice", "@bob"], groupAllowFrom: ["group:ops"], }, @@ -60,7 +60,7 @@ describe("simplex heartbeat adapter", () => { cfg: { channels: { "openclaw-simplex": { - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "/tmp/openclaw-simplex-test", allowFrom: ["alice"], groupAllowFrom: ["group:ops"], }, @@ -75,7 +75,7 @@ describe("simplex heartbeat adapter", () => { }); it("prefers an explicit recipient override", () => { - const heartbeat = buildSimplexHeartbeat(new Map()); + const heartbeat = buildSimplexHeartbeat(); expect( heartbeat.resolveRecipients?.({ diff --git a/src/channel/simplex-heartbeat.ts b/src/channel/gateway/simplex-heartbeat.ts similarity index 84% rename from src/channel/simplex-heartbeat.ts rename to src/channel/gateway/simplex-heartbeat.ts index c1e7038..b34fd81 100644 --- a/src/channel/simplex-heartbeat.ts +++ b/src/channel/gateway/simplex-heartbeat.ts @@ -1,7 +1,7 @@ import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; -import { resolveSimplexAccount } from "../config/accounts.js"; -import type { SimplexClientRegistry } from "./simplex-client-registry.js"; -import { parseSimplexAllowlistEntry } from "./simplex-security.js"; +import { resolveSimplexAccount } from "../../config/accounts.js"; +import { hasActiveSimplexClient } from "../../simplex/runtime/transport.js"; +import { parseSimplexAllowlistEntry } from "../security/simplex-security.js"; function normalizeHeartbeatRecipient(raw: string): string { const trimmed = raw.trim(); @@ -26,9 +26,7 @@ function collectHeartbeatRecipients(entries: Array | undefined) return [...recipients]; } -export function buildSimplexHeartbeat( - registry: SimplexClientRegistry -): NonNullable { +export function buildSimplexHeartbeat(): NonNullable { return { checkReady: async ({ cfg, accountId }) => { const account = resolveSimplexAccount({ cfg, accountId }); @@ -38,7 +36,7 @@ export function buildSimplexHeartbeat( if (!account.configured) { return { ok: false as const, reason: "simplex-not-configured" as const }; } - if (!registry.has(account.accountId)) { + if (!hasActiveSimplexClient(account.accountId)) { return { ok: false as const, reason: "simplex-not-running" as const }; } return { ok: true as const, reason: "ok" as const }; diff --git a/src/channel/simplex-media.ts b/src/channel/media/simplex-media.ts similarity index 91% rename from src/channel/simplex-media.ts rename to src/channel/media/simplex-media.ts index b9415e5..459af51 100644 --- a/src/channel/simplex-media.ts +++ b/src/channel/media/simplex-media.ts @@ -1,9 +1,9 @@ import path from "node:path"; import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; import { resolveChannelMediaMaxBytes } from "openclaw/plugin-sdk/media-runtime"; -import { SIMPLEX_CHANNEL_ID } from "../constants.js"; -import type { SimplexComposedMessage, SimplexMsgContent } from "../simplex/simplex-commands.js"; -import { getSimplexRuntime } from "./runtime.js"; +import { SIMPLEX_CHANNEL_ID } from "../../constants.js"; +import type { SimplexComposedMessage, SimplexMsgContent } from "../../types/simplex.js"; +import { getSimplexRuntime } from "../runtime.js"; const DEFAULT_MAX_BYTES = 5 * 1024 * 1024; @@ -22,7 +22,7 @@ export function resolveSimplexMediaMaxBytes(params: { ); } -export async function resolveMediaPath(params: { +async function resolveMediaPath(params: { mediaUrl: string; maxBytes: number; }): Promise<{ path: string; contentType?: string; fileName?: string }> { @@ -48,7 +48,7 @@ export async function resolveMediaPath(params: { return { path: params.mediaUrl, contentType, fileName }; } -export function buildMediaMsgContent(params: { +function buildMediaMsgContent(params: { text: string; mediaPath: string; contentType?: string; @@ -99,6 +99,7 @@ export async function buildComposedMessages(params: { mediaUrls?: string[]; mediaUrl?: string; audioAsVoice?: boolean; + quotedItemId?: number; }): Promise { const text = params.text ?? ""; const mediaList = params.mediaUrls?.length @@ -112,6 +113,8 @@ export async function buildComposedMessages(params: { if (text) { composedMessages.push({ msgContent: { type: "text", text }, + quotedItemId: params.quotedItemId, + mentions: {}, }); } return composedMessages; @@ -139,6 +142,8 @@ export async function buildComposedMessages(params: { composedMessages.push({ fileSource: { filePath: resolved.path }, msgContent, + quotedItemId: params.quotedItemId, + mentions: {}, }); } diff --git a/src/channel/simplex-outbound.test.ts b/src/channel/messaging/simplex-outbound.test.ts similarity index 91% rename from src/channel/simplex-outbound.test.ts rename to src/channel/messaging/simplex-outbound.test.ts index bd960c0..3a663a1 100644 --- a/src/channel/simplex-outbound.test.ts +++ b/src/channel/messaging/simplex-outbound.test.ts @@ -15,7 +15,7 @@ describe("simplex outbound presentation support", () => { }); it("advertises presentation support with text fallback only", () => { - const outbound = buildSimplexOutbound(new Map()); + const outbound = buildSimplexOutbound(); expect( outbound.shouldTreatDeliveredTextAsVisible?.({ @@ -40,7 +40,7 @@ describe("simplex outbound presentation support", () => { }); it("renders presentation payloads into fallback text", async () => { - const outbound = buildSimplexOutbound(new Map()); + const outbound = buildSimplexOutbound(); const rendered = await outbound.renderPresentation?.({ payload: { text: "Choose an option", @@ -70,15 +70,13 @@ describe("simplex outbound presentation support", () => { }); it("renders polls into numbered text prompts", async () => { - const outbound = buildSimplexOutbound(new Map()); + const outbound = buildSimplexOutbound(); const result = await outbound.sendPoll?.({ cfg: { channels: { "openclaw-simplex": { - connection: { - wsUrl: "ws://127.0.0.1:5225", - }, + dbFilePrefix: "/tmp/openclaw-simplex-test", }, }, }, diff --git a/src/channel/simplex-outbound.ts b/src/channel/messaging/simplex-outbound.ts similarity index 84% rename from src/channel/simplex-outbound.ts rename to src/channel/messaging/simplex-outbound.ts index 197d9bf..87fde69 100644 --- a/src/channel/simplex-outbound.ts +++ b/src/channel/messaging/simplex-outbound.ts @@ -1,11 +1,10 @@ import type { ChannelPlugin } from "openclaw/plugin-sdk/channel-core"; import { renderMessagePresentationFallbackText } from "openclaw/plugin-sdk/interactive-runtime"; import { normalizePollInput } from "openclaw/plugin-sdk/poll-runtime"; -import { resolveSimplexAccount } from "../config/accounts.js"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { SIMPLEX_CHANNEL_ID } from "../constants.js"; -import type { SimplexClientRegistry } from "./simplex-client-registry.js"; -import { assertSimplexOutboundAccountReady } from "./simplex-common.js"; +import { resolveSimplexAccount } from "../../config/accounts.js"; +import { SIMPLEX_CHANNEL_ID } from "../../constants.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import { assertSimplexOutboundAccountReady } from "../shared/simplex-common.js"; import { buildAndSendSimplexMessages } from "./simplex-send.js"; function renderSimplexPollText(params: { @@ -43,9 +42,9 @@ function renderSimplexPollText(params: { return lines.join("\n").trim(); } -export function buildSimplexOutbound( - registry: SimplexClientRegistry -): NonNullable["outbound"]> { +export function buildSimplexOutbound(): NonNullable< + ChannelPlugin["outbound"] +> { return { deliveryMode: "direct" as const, textChunkLimit: 4000, @@ -66,11 +65,10 @@ export function buildSimplexOutbound( presentation, }), }), - sendPayload: async ({ cfg, to, payload, accountId }) => { + sendPayload: async ({ cfg, to, payload, accountId, replyToId }) => { const account = resolveSimplexAccount({ cfg, accountId }); assertSimplexOutboundAccountReady(account); const result = await buildAndSendSimplexMessages({ - registry, cfg, account, chatRef: to, @@ -78,6 +76,7 @@ export function buildSimplexOutbound( mediaUrls: payload.mediaUrls, mediaUrl: payload.mediaUrl, audioAsVoice: payload.audioAsVoice, + replyToId, }); return { channel: SIMPLEX_CHANNEL_ID, @@ -85,15 +84,15 @@ export function buildSimplexOutbound( chatId: to, }; }, - sendText: async ({ cfg, to, text, accountId }) => { + sendText: async ({ cfg, to, text, accountId, replyToId }) => { const account = resolveSimplexAccount({ cfg, accountId }); assertSimplexOutboundAccountReady(account); const result = await buildAndSendSimplexMessages({ - registry, cfg, account, chatRef: to, text, + replyToId, }); return { channel: SIMPLEX_CHANNEL_ID, @@ -101,19 +100,19 @@ export function buildSimplexOutbound( chatId: to, }; }, - sendMedia: async ({ cfg, to, text, mediaUrl, accountId }) => { + sendMedia: async ({ cfg, to, text, mediaUrl, accountId, replyToId }) => { if (!mediaUrl) { return { channel: SIMPLEX_CHANNEL_ID, messageId: "empty", chatId: to }; } const account = resolveSimplexAccount({ cfg, accountId }); assertSimplexOutboundAccountReady(account); const result = await buildAndSendSimplexMessages({ - registry, cfg, account, chatRef: to, text, mediaUrl, + replyToId, }); return { channel: SIMPLEX_CHANNEL_ID, @@ -128,7 +127,6 @@ export function buildSimplexOutbound( const normalized = normalizePollInput(poll); const text = renderSimplexPollText(normalized); const result = await buildAndSendSimplexMessages({ - registry, cfg, account, chatRef: to, diff --git a/src/channel/messaging/simplex-send.ts b/src/channel/messaging/simplex-send.ts new file mode 100644 index 0000000..879ffb1 --- /dev/null +++ b/src/channel/messaging/simplex-send.ts @@ -0,0 +1,71 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { + parseSimplexApiChatRef, + parseSimplexNumericId, + resolveSimplexChatItemId, + toSimplexApiChatRef, +} from "../../simplex/runtime/api.js"; +import { withSimplexApi } from "../../simplex/runtime/transport.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { + SimplexApiChatRef, + SimplexApiComposedMessage, + SimplexComposedMessage, +} from "../../types/simplex.js"; +import { buildComposedMessages } from "../media/simplex-media.js"; + +export async function sendSimplexComposedMessages(params: { + chatRef: string; + composedMessages: SimplexComposedMessage[]; + send: ( + apiChatRef: SimplexApiChatRef, + composedMessages: SimplexApiComposedMessage[] + ) => Promise; +}): Promise<{ messageId?: string }> { + if (params.composedMessages.length === 0) { + return {}; + } + const apiChatRef = parseSimplexApiChatRef(params.chatRef); + if (!apiChatRef) { + throw new Error(`SimpleX chat ref must be numeric for runtime API: ${params.chatRef}`); + } + const chatItems = await params.send( + toSimplexApiChatRef(apiChatRef), + params.composedMessages as SimplexApiComposedMessage[] + ); + return { messageId: resolveSimplexChatItemId(chatItems[0]) }; +} + +export async function buildAndSendSimplexMessages(params: { + cfg: OpenClawConfig; + account: ResolvedSimplexAccount; + chatRef: string; + text?: string; + mediaUrl?: string; + mediaUrls?: string[]; + audioAsVoice?: boolean; + replyToId?: string | number | null; +}): Promise<{ messageId?: string }> { + const quotedItemId = + params.replyToId === undefined || params.replyToId === null + ? undefined + : parseSimplexNumericId(params.replyToId); + const composedMessages = await buildComposedMessages({ + cfg: params.cfg, + accountId: params.account.accountId, + text: params.text, + mediaUrl: params.mediaUrl, + mediaUrls: params.mediaUrls, + audioAsVoice: params.audioAsVoice, + quotedItemId: quotedItemId ?? undefined, + }); + return await sendSimplexComposedMessages({ + chatRef: params.chatRef, + composedMessages, + send: (apiChatRef, messages) => + withSimplexApi({ + account: params.account, + run: (api) => api.apiSendMessages(apiChatRef, messages), + }), + }); +} diff --git a/src/channel/plugin.ts b/src/channel/plugin.ts index 0d036e3..5c8160b 100644 --- a/src/channel/plugin.ts +++ b/src/channel/plugin.ts @@ -15,11 +15,24 @@ import { SIMPLEX_ACCOUNT_CONFIG_CLEAR_FIELDS, SimplexChannelConfigSchema, } from "../config/config-schema.js"; -import type { ResolvedSimplexAccount } from "../config/types.js"; import { SIMPLEX_CHANNEL_ID } from "../constants.js"; -import type { SimplexWsClient } from "../simplex/simplex-ws-client.js"; -import { simplexApprovalAuth } from "./approval-auth.js"; -import { simplexCommandPolicy } from "./command-policy.js"; +import type { ResolvedSimplexAccount } from "../types/config.js"; +import { + listSimplexDirectoryGroups, + listSimplexDirectoryPeers, + listSimplexGroupMembers, + resolveSimplexSelf, + resolveSimplexTargets, +} from "./contacts/simplex-directory.js"; +import { buildSimplexPairing } from "./contacts/simplex-pairing.js"; +import { simplexDoctor } from "./diagnostics/simplex-doctor.js"; +import { buildSimplexStatus } from "./diagnostics/simplex-status.js"; +import { buildSimplexGatewayRuntime } from "./gateway/simplex-gateway-runtime.js"; +import { buildSimplexHeartbeat } from "./gateway/simplex-heartbeat.js"; +import { buildSimplexOutbound } from "./messaging/simplex-outbound.js"; +import { simplexApprovalAuth } from "./security/approval-auth.js"; +import { simplexCommandPolicy } from "./security/command-policy.js"; +import { formatSimplexAllowFrom } from "./security/simplex-security.js"; import { simplexSetupAdapter } from "./setup.js"; import { formatSimplexTargetDisplay, @@ -27,25 +40,10 @@ import { parseSimplexExplicitTarget, resolveSimplexGroupRequireMention, resolveSimplexGroupToolPolicy, + resolveSimplexRouteTarget, stripLeadingAt, stripSimplexPrefix, -} from "./simplex-common.js"; -import { - listSimplexDirectoryGroups, - listSimplexDirectoryPeers, - listSimplexGroupMembers, - resolveSimplexSelf, - resolveSimplexTargets, -} from "./simplex-directory.js"; -import { simplexDoctor } from "./simplex-doctor.js"; -import { buildSimplexGatewayRuntime } from "./simplex-gateway-runtime.js"; -import { buildSimplexHeartbeat } from "./simplex-heartbeat.js"; -import { buildSimplexOutbound } from "./simplex-outbound.js"; -import { buildSimplexPairing } from "./simplex-pairing.js"; -import { formatSimplexAllowFrom } from "./simplex-security.js"; -import { buildSimplexStatus } from "./simplex-status.js"; - -const activeClients = new Map(); +} from "./shared/simplex-common.js"; const resolveSimplexDmSecurityPolicy = createScopedDmSecurityResolver({ channelKey: SIMPLEX_CHANNEL_ID, @@ -65,15 +63,15 @@ export const simplexPlugin: ChannelPlugin = { meta: { id: SIMPLEX_CHANNEL_ID, label: "SimpleX", - selectionLabel: "SimpleX (WebSocket)", + selectionLabel: "SimpleX", detailLabel: "SimpleX Chat", docsPath: "/channels/openclaw-simplex", docsLabel: SIMPLEX_CHANNEL_ID, - blurb: "SimpleX Chat via external WebSocket API", + blurb: "SimpleX Chat via the official Node runtime", aliases: ["simplex"], order: 95, systemImage: "link.badge.plus", - selectionExtras: ["Invite-based reachability", "External WebSocket runtime"], + selectionExtras: ["Invite-based reachability", "Official Node runtime"], markdownCapable: true, exposure: { configured: true, @@ -82,7 +80,7 @@ export const simplexPlugin: ChannelPlugin = { }, quickstartAllowFrom: true, }, - pairing: buildSimplexPairing(activeClients), + pairing: buildSimplexPairing(), capabilities: { chatTypes: ["direct", "group"], polls: true, @@ -116,7 +114,7 @@ export const simplexPlugin: ChannelPlugin = { configured: account.configured, mode: account.mode, application: { - wsUrl: account.wsUrl, + dbFilePrefix: account.dbFilePrefix, }, }), }, @@ -132,6 +130,13 @@ export const simplexPlugin: ChannelPlugin = { messaging: { normalizeTarget: (raw) => stripSimplexPrefix(raw), parseExplicitTarget: ({ raw }) => parseSimplexExplicitTarget(raw), + resolveSessionConversation: ({ kind, rawId }) => { + const target = + kind === "group" || kind === "channel" + ? resolveSimplexRouteTarget({ rawTarget: rawId }) + : null; + return target ? { id: target.to, threadId: target.threadId ?? null } : null; + }, inferTargetChatType: ({ to }) => inferSimplexTargetChatType(to), formatTargetDisplay: (params) => formatSimplexTargetDisplay(params), targetResolver: { @@ -184,10 +189,25 @@ export const simplexPlugin: ChannelPlugin = { resolveRequireMention: resolveSimplexGroupRequireMention, resolveToolPolicy: resolveSimplexGroupToolPolicy, }, - gatewayMethods: ["simplex.invite.create", "simplex.invite.list", "simplex.invite.revoke"], - outbound: buildSimplexOutbound(activeClients), - heartbeat: buildSimplexHeartbeat(activeClients), - status: buildSimplexStatus(activeClients), + gatewayMethods: [ + "simplex.invite.create", + "simplex.invite.list", + "simplex.invite.revoke", + "simplex.runtime.status", + "simplex.runtime.doctor", + "simplex.requests.list", + "simplex.requests.accept", + "simplex.requests.reject", + "simplex.groups.create", + "simplex.groups.link.create", + "simplex.groups.link.list", + "simplex.groups.link.revoke", + "simplex.connect.plan", + "simplex.connect", + ], + outbound: buildSimplexOutbound(), + heartbeat: buildSimplexHeartbeat(), + status: buildSimplexStatus(), doctor: simplexDoctor, - gateway: buildSimplexGatewayRuntime(activeClients), + gateway: buildSimplexGatewayRuntime(), }; diff --git a/src/channel/approval-auth.test.ts b/src/channel/security/approval-auth.test.ts similarity index 100% rename from src/channel/approval-auth.test.ts rename to src/channel/security/approval-auth.test.ts diff --git a/src/channel/approval-auth.ts b/src/channel/security/approval-auth.ts similarity index 85% rename from src/channel/approval-auth.ts rename to src/channel/security/approval-auth.ts index f8831a9..971dbec 100644 --- a/src/channel/approval-auth.ts +++ b/src/channel/security/approval-auth.ts @@ -2,8 +2,8 @@ import { createResolvedApproverActionAuthAdapter, resolveApprovalApprovers, } from "openclaw/plugin-sdk/approval-auth-runtime"; -import { resolveSimplexAccount } from "../config/accounts.js"; -import { normalizeSimplexContactRef } from "./simplex-common.js"; +import { resolveSimplexAccount } from "../../config/accounts.js"; +import { normalizeSimplexContactRef } from "../shared/simplex-common.js"; function normalizeSimplexApproverId(value: string | number): string | undefined { const normalized = normalizeSimplexContactRef(String(value)); diff --git a/src/channel/command-policy.ts b/src/channel/security/command-policy.ts similarity index 100% rename from src/channel/command-policy.ts rename to src/channel/security/command-policy.ts diff --git a/src/channel/simplex-security.test.ts b/src/channel/security/simplex-security.test.ts similarity index 93% rename from src/channel/simplex-security.test.ts rename to src/channel/security/simplex-security.test.ts index 1408a7c..3afd5de 100644 --- a/src/channel/simplex-security.test.ts +++ b/src/channel/security/simplex-security.test.ts @@ -1,6 +1,6 @@ import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; import { describe, expect, it } from "vitest"; -import type { ResolvedSimplexAccount } from "../config/types.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; import { formatSimplexAllowFrom, isSimplexAllowlisted, @@ -72,9 +72,7 @@ describe("simplex allowlist", () => { accounts: { beta: { allowFrom: ["beta-only"], - connection: { - wsUrl: "ws://127.0.0.1:7777", - }, + dbFilePrefix: "/tmp/openclaw-simplex-test", }, }, }, @@ -106,10 +104,8 @@ describe("simplex allowlist", () => { accountId: "alpha", enabled: true, configured: true, - mode: "external", - wsUrl: "ws://127.0.0.1:5225", - wsHost: "127.0.0.1", - wsPort: 5225, + mode: "node", + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex-alpha", config: { markdown: {}, dmPolicy: "open" }, }; const result = resolveSimplexDmPolicy({ diff --git a/src/channel/simplex-security.ts b/src/channel/security/simplex-security.ts similarity index 91% rename from src/channel/simplex-security.ts rename to src/channel/security/simplex-security.ts index f76dd4b..9a678b4 100644 --- a/src/channel/simplex-security.ts +++ b/src/channel/security/simplex-security.ts @@ -1,13 +1,9 @@ import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; -import { resolveDefaultSimplexAccountId } from "../config/accounts.js"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { SIMPLEX_CHANNEL_ID } from "../constants.js"; -import { stripSimplexPrefix } from "./simplex-common.js"; - -export type SimplexAllowlistEntry = { - kind: "any" | "sender" | "group"; - value: string; -}; +import { resolveDefaultSimplexAccountId } from "../../config/accounts.js"; +import { SIMPLEX_CHANNEL_ID } from "../../constants.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { SimplexAllowlistEntry } from "../../types/security.js"; +import { stripSimplexPrefix } from "../shared/simplex-common.js"; function normalizeSimplexId(value: string): string { return value.trim().toLowerCase(); diff --git a/src/channel/setup.ts b/src/channel/setup.ts index 6e9b498..279a611 100644 --- a/src/channel/setup.ts +++ b/src/channel/setup.ts @@ -30,33 +30,24 @@ export const simplexSetupAdapter: ChannelSetupAdapter = { name, }); }, - applyAccountConfig: ({ cfg, accountId, input }) => { - const wsUrl = input.url?.trim() || input.httpUrl?.trim(); + applyAccountConfig: ({ cfg, accountId }) => { return applySetupAccountConfigPatch({ cfg, channelKey: SIMPLEX_CHANNEL_ID, accountId, patch: { enabled: true, - ...(wsUrl - ? { - connection: { - mode: "external", - wsUrl, - }, - } - : {}), }, }); }, validateInput: ({ input }) => { const cliPath = input.cliPath?.trim(); if (cliPath) { - return "SimpleX managed mode is no longer supported; run simplex-chat separately and provide a ws:// or wss:// URL instead."; + return "SimpleX CLI path is no longer needed. This plugin uses the official Node runtime."; } - const wsUrl = input.url?.trim() || input.httpUrl?.trim(); - if (wsUrl && !/^wss?:\/\//i.test(wsUrl)) { - return "SimpleX external URL must start with ws:// or wss://"; + const runtimeUrl = input.url?.trim() || input.httpUrl?.trim(); + if (runtimeUrl) { + return "SimpleX runtime URLs are no longer supported. This plugin uses the official Node runtime."; } return null; }, diff --git a/src/channel/simplex-common.ts b/src/channel/shared/simplex-common.ts similarity index 79% rename from src/channel/simplex-common.ts rename to src/channel/shared/simplex-common.ts index b1b504b..f8058c6 100644 --- a/src/channel/simplex-common.ts +++ b/src/channel/shared/simplex-common.ts @@ -1,30 +1,10 @@ -import { DEFAULT_ACCOUNT_ID } from "openclaw/plugin-sdk/account-id"; import type { ChannelGroupContext } from "openclaw/plugin-sdk/channel-contract"; import type { GroupToolPolicyConfig } from "openclaw/plugin-sdk/channel-policy"; -import { resolveSimplexAccount } from "../config/accounts.js"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { stripSimplexProviderPrefix } from "../constants.js"; - -export { DEFAULT_ACCOUNT_ID }; - -export type SimplexExplicitTarget = { - to: string; - chatType: "direct" | "group"; -}; - -type SimplexTargetKind = SimplexExplicitTarget["chatType"] | null; - -export function extractSimplexWsUrlFromApplication(application: unknown): string | undefined { - if (!application || typeof application !== "object") { - return undefined; - } - const value = (application as { wsUrl?: unknown }).wsUrl; - if (typeof value !== "string") { - return undefined; - } - const trimmed = value.trim(); - return trimmed ? trimmed : undefined; -} +import { resolveChannelRouteTargetWithParser } from "openclaw/plugin-sdk/channel-route"; +import { resolveSimplexAccount } from "../../config/accounts.js"; +import { stripSimplexProviderPrefix } from "../../constants.js"; +import type { SimplexExplicitTarget, SimplexTargetKind } from "../../types/channel.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; export function resolveSimplexHealthState(params: { configured: boolean; @@ -48,17 +28,6 @@ export function resolveSimplexHealthState(params: { return "idle"; } -export function normalizeSimplexMessageId(value: unknown): string | undefined { - if (typeof value === "number" && Number.isFinite(value)) { - return String(value); - } - if (typeof value === "string") { - const trimmed = value.trim(); - return trimmed ? trimmed : undefined; - } - return undefined; -} - export function stripSimplexPrefix(value: string): string { return stripSimplexProviderPrefix(value); } @@ -105,6 +74,34 @@ export function parseSimplexExplicitTarget(raw: string): SimplexExplicitTarget | return null; } +export function resolveSimplexRouteTarget(params: { + rawTarget?: string | null; + accountId?: string | null; + fallbackThreadId?: string | number | null; +}): { + to: string; + accountId?: string; + threadId?: string; + chatType?: "direct" | "group"; +} | null { + const route = resolveChannelRouteTargetWithParser({ + channel: "openclaw-simplex", + rawTarget: params.rawTarget, + fallbackThreadId: params.fallbackThreadId, + parseExplicitTarget: (_channel, rawTarget) => parseSimplexExplicitTarget(rawTarget), + }); + if (!route) { + return null; + } + return { + to: route.to, + accountId: + params.accountId ?? (typeof route.accountId === "string" ? route.accountId : undefined), + threadId: route.threadId === undefined ? undefined : String(route.threadId), + chatType: route.chatType === "group" ? "group" : "direct", + }; +} + export function inferSimplexTargetChatType( raw: string ): SimplexExplicitTarget["chatType"] | undefined { diff --git a/src/channel/simplex-client-registry.ts b/src/channel/simplex-client-registry.ts deleted file mode 100644 index 8bdb26f..0000000 --- a/src/channel/simplex-client-registry.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { SimplexWsClient } from "../simplex/simplex-ws-client.js"; - -export type SimplexClientRegistry = Map; - -export async function withSimplexRegistryClient( - registry: SimplexClientRegistry, - account: ResolvedSimplexAccount, - fn: (client: SimplexWsClient) => Promise -): Promise { - const existing = registry.get(account.accountId); - if (existing) { - await existing.connect(); - return await fn(existing); - } - const client = new SimplexWsClient({ - url: account.wsUrl, - connectTimeoutMs: account.config.connection?.connectTimeoutMs, - }); - await client.connect(); - try { - return await fn(client); - } finally { - await client.close(); - } -} diff --git a/src/channel/simplex-monitor.ts b/src/channel/simplex-monitor.ts deleted file mode 100644 index ba71760..0000000 --- a/src/channel/simplex-monitor.ts +++ /dev/null @@ -1,840 +0,0 @@ -import type { ChannelAccountSnapshot } from "openclaw/plugin-sdk/channel-contract"; -import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; -import { resolveInboundMentionDecision } from "openclaw/plugin-sdk/channel-inbound"; -import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { SIMPLEX_CHANNEL_ID } from "../constants.js"; -import { - buildCancelFileCommand, - buildReceiveFileCommand, - buildSendMessagesCommand, - formatChatRef, -} from "../simplex/simplex-commands.js"; -import { resolveSimplexCommandError } from "../simplex/simplex-errors.js"; -import { SimplexWsClient, type SimplexWsEvent } from "../simplex/simplex-ws-client.js"; -import { getSimplexRuntime } from "./runtime.js"; -import { stripSimplexPrefix } from "./simplex-common.js"; -import { buildComposedMessages, resolveSimplexMediaMaxBytes } from "./simplex-media.js"; -import { isSimplexAllowlisted } from "./simplex-security.js"; - -export type SimplexMonitorOpts = { - account: ResolvedSimplexAccount; - cfg: OpenClawConfig; - runtime: RuntimeEnv; - abortSignal: AbortSignal; - statusSink?: (patch: Partial) => void; -}; - -type SimplexChatItem = { - chatInfo?: { - type?: string; - contact?: { contactId?: number; localDisplayName?: string; profile?: { displayName?: string } }; - groupInfo?: { groupId?: number; localDisplayName?: string }; - }; - chatItem?: { - chatDir?: { - type?: string; - groupMember?: { - memberId?: string; - groupMemberId?: number; - contactId?: number | string; - localDisplayName?: string; - }; - }; - meta?: { itemId?: number; itemTs?: string }; - content?: { type?: string; msgContent?: { type?: string; text?: string } }; - file?: { - fileId?: number; - fileName?: string; - fileSize?: number; - fileSource?: { filePath?: string }; - }; - }; -}; - -const INBOUND_DIRS = new Set(["directRcv", "groupRcv"]); -const PENDING_FILE_TIMEOUT_MS = 90_000; - -type PendingInboundFile = { - fileId: number; - ctxPayload: Record; - storePath: string; - sessionKey: string; - chatRef: string; - rawBody: string; - account: ResolvedSimplexAccount; - cfg: OpenClawConfig; - runtime: RuntimeEnv; - client: SimplexWsClient; - statusSink?: (patch: Partial) => void; -}; - -const pendingFiles = new Map(); - -function pendingKey(accountId: string, fileId: number): string { - return `${accountId}:${fileId}`; -} - -function normalizeSimplexSenderId(value?: string | null): string | undefined { - let trimmed = value?.trim(); - if (!trimmed) { - return undefined; - } - trimmed = stripSimplexPrefix(trimmed); - if (!trimmed) { - return undefined; - } - if (trimmed.startsWith("@")) { - trimmed = trimmed.slice(1).trim(); - } else { - const kindLower = trimmed.toLowerCase(); - if (kindLower.startsWith("contact:")) { - trimmed = trimmed.slice("contact:".length).trim(); - } else if (kindLower.startsWith("user:")) { - trimmed = trimmed.slice("user:".length).trim(); - } else if (kindLower.startsWith("member:")) { - trimmed = trimmed.slice("member:".length).trim(); - } - } - return trimmed || undefined; -} - -function resolveMessageText( - content: { type?: string; text?: string } | undefined, - fileName?: string -): string { - if (!content) { - return ""; - } - const text = content.text?.trim() ?? ""; - if (text) { - return text; - } - switch (content.type) { - case "image": - return "[image]"; - case "video": - return "[video]"; - case "voice": - return "[voice message]"; - case "file": - return fileName ? `[file: ${fileName}]` : "[file]"; - case "link": - return "[link]"; - case "report": - return "[report]"; - case "chat": - return "[chat]"; - default: - return "[message]"; - } -} - -function isInboundChatItem(item: SimplexChatItem): boolean { - const dir = item.chatItem?.chatDir?.type; - return Boolean(dir && INBOUND_DIRS.has(dir)); -} - -function resolveChatContext(item: SimplexChatItem): { - chatType: "direct" | "group"; - chatId: number; - chatLabel: string; - senderId?: string; - senderName?: string; -} | null { - const info = item.chatInfo; - if (!info || !item.chatItem) { - return null; - } - if (info.type === "direct") { - const contactId = info.contact?.contactId; - if (typeof contactId !== "number") { - return null; - } - const senderName = - info.contact?.localDisplayName?.trim() || - info.contact?.profile?.displayName?.trim() || - undefined; - return { - chatType: "direct", - chatId: contactId, - chatLabel: senderName || `contact:${contactId}`, - senderId: String(contactId), - senderName, - }; - } - if (info.type === "group") { - const groupId = info.groupInfo?.groupId; - if (typeof groupId !== "number") { - return null; - } - const member = item.chatItem?.chatDir?.groupMember; - const contactId = - typeof member?.contactId === "number" - ? String(member.contactId) - : member?.contactId?.trim() || undefined; - const senderId = - contactId ?? - member?.memberId?.trim() ?? - (typeof member?.groupMemberId === "number" ? String(member.groupMemberId) : undefined); - const senderName = member?.localDisplayName?.trim() || undefined; - const groupLabel = info.groupInfo?.localDisplayName?.trim() || `group:${groupId}`; - return { - chatType: "group", - chatId: groupId, - chatLabel: groupLabel, - senderId: senderId || undefined, - senderName, - }; - } - return null; -} - -function resolveSimplexGroupRequireMention(params: { - account: ResolvedSimplexAccount; - groupId?: number | null; -}): boolean { - const groupId = params.groupId ? String(params.groupId) : undefined; - const groups = params.account.config.groups ?? {}; - const entry = groupId ? groups[groupId] : undefined; - const fallback = groups["*"]; - if (typeof entry?.requireMention === "boolean") { - return entry.requireMention; - } - if (typeof fallback?.requireMention === "boolean") { - return fallback.requireMention; - } - return true; -} - -async function sendSimplexPayload(params: { - client: SimplexWsClient; - chatRef: string; - cfg: OpenClawConfig; - accountId: string; - payload: { - text?: string; - mediaUrl?: string; - mediaUrls?: string[]; - audioAsVoice?: boolean; - }; -}): Promise<{ messageId?: number }> { - const composedMessages = await buildComposedMessages({ - cfg: params.cfg, - accountId: params.accountId, - text: params.payload.text, - mediaUrl: params.payload.mediaUrl, - mediaUrls: params.payload.mediaUrls, - audioAsVoice: params.payload.audioAsVoice, - }); - if (composedMessages.length === 0) { - return {}; - } - const cmd = buildSendMessagesCommand({ - chatRef: params.chatRef, - composedMessages, - }); - const response = await params.client.sendCommand(cmd); - const resp = response.resp as { - type?: string; - chatError?: { errorType?: { type?: string; message?: string } }; - chatItems?: Array<{ chatItem?: { meta?: { itemId?: number } } }>; - }; - const commandError = resolveSimplexCommandError(resp); - if (commandError) { - throw new Error(commandError); - } - if (resp?.type === "newChatItems") { - const itemId = resp.chatItems?.[0]?.chatItem?.meta?.itemId; - return { messageId: typeof itemId === "number" ? itemId : undefined }; - } - return {}; -} - -export async function startSimplexMonitor(params: SimplexMonitorOpts): Promise<{ - client: SimplexWsClient; -}> { - const { account, cfg, runtime, statusSink } = params; - const client = new SimplexWsClient({ - url: account.wsUrl, - connectTimeoutMs: account.config.connection?.connectTimeoutMs, - logger: { - info: (message) => runtime?.log?.(message), - warn: (message) => runtime?.error?.(message), - error: (message) => runtime?.error?.(message), - }, - }); - - const stopConnectionState = client.onConnectionState((state) => { - if (state.connected) { - statusSink?.({ - connected: true, - running: true, - lastConnectedAt: state.at, - lastDisconnect: null, - lastError: null, - healthState: "healthy", - }); - return; - } - - statusSink?.({ - connected: false, - running: state.expected ? false : undefined, - lastDisconnect: state.error ? { at: state.at, error: state.error } : { at: state.at }, - ...(state.error ? { lastError: state.error } : {}), - healthState: state.expected ? "stopped" : "disconnected", - }); - }); - - await connectWithRetry({ - client, - runtime, - accountId: account.accountId, - abortSignal: params.abortSignal, - }); - - const stopListening = client.onEvent(async (event) => { - try { - await handleSimplexEvent({ event, account, cfg, runtime, statusSink, client }); - } catch (err) { - runtime.error?.(`[${account.accountId}] SimpleX event error: ${String(err)}`); - } - }); - - params.abortSignal.addEventListener( - "abort", - () => { - stopConnectionState(); - stopListening(); - client.close().catch((err) => { - runtime.error?.(`[${account.accountId}] SimpleX close failed: ${String(err)}`); - }); - }, - { once: true } - ); - - return { client }; -} - -async function connectWithRetry(params: { - client: SimplexWsClient; - runtime: RuntimeEnv; - accountId: string; - abortSignal: AbortSignal; - attempts?: number; - baseDelayMs?: number; - maxDelayMs?: number; -}): Promise { - const attempts = params.attempts ?? 10; - let delayMs = params.baseDelayMs ?? 500; - const maxDelayMs = params.maxDelayMs ?? 5_000; - - for (let attempt = 1; attempt <= attempts; attempt += 1) { - if (params.abortSignal.aborted) { - throw new Error("SimpleX connect aborted"); - } - try { - await params.client.connect(); - return; - } catch (err) { - if (attempt >= attempts) { - throw err; - } - params.runtime.error?.( - `[${params.accountId}] SimpleX connect failed (attempt ${attempt}/${attempts}): ${String(err)}; retrying in ${delayMs}ms` - ); - await sleep(delayMs, params.abortSignal); - delayMs = Math.min(maxDelayMs, delayMs * 2); - } - } -} - -function sleep(ms: number, abortSignal: AbortSignal): Promise { - if (abortSignal.aborted) { - return Promise.reject(new Error("SimpleX connect aborted")); - } - return new Promise((resolve, reject) => { - const timer = setTimeout(() => { - cleanup(); - resolve(); - }, ms); - const onAbort = () => { - cleanup(); - reject(new Error("SimpleX connect aborted")); - }; - const cleanup = () => { - clearTimeout(timer); - abortSignal.removeEventListener("abort", onAbort); - }; - abortSignal.addEventListener("abort", onAbort, { once: true }); - }); -} - -async function handleSimplexEvent(params: { - event: SimplexWsEvent; - account: ResolvedSimplexAccount; - cfg: OpenClawConfig; - runtime: RuntimeEnv; - statusSink?: (patch: Partial) => void; - client: SimplexWsClient; -}): Promise { - const { event, account, cfg, runtime, statusSink, client } = params; - statusSink?.({ lastEventAt: Date.now() }); - if (event.type === "rcvFileDescrReady") { - const fileId = Number( - (event as { rcvFileTransfer?: { fileId?: number } })?.rcvFileTransfer?.fileId - ); - if (Number.isFinite(fileId)) { - await requestFileDownload({ fileId, account, client, runtime }); - } - return; - } - - if (event.type === "rcvFileComplete") { - const chatItem = (event as { chatItem?: SimplexChatItem })?.chatItem; - const file = chatItem?.chatItem?.file; - const fileId = typeof file?.fileId === "number" ? file.fileId : null; - if (fileId && pendingFiles.has(pendingKey(account.accountId, fileId))) { - const filePath = file?.fileSource?.filePath?.trim(); - await finalizePendingFile({ - accountId: account.accountId, - fileId, - filePath, - }); - } - return; - } - - if (event.type !== "newChatItems") { - return; - } - - const chatItems = event.chatItems; - const items = Array.isArray(chatItems) ? (chatItems as SimplexChatItem[]) : []; - - for (const item of items) { - if (!isInboundChatItem(item)) { - continue; - } - - const context = resolveChatContext(item); - if (!context) { - continue; - } - - const content = - item.chatItem?.content?.type === "rcvMsgContent" - ? item.chatItem?.content?.msgContent - : undefined; - - if (!content) { - continue; - } - - const rawBody = resolveMessageText(content, item.chatItem?.file?.fileName); - if (!rawBody) { - continue; - } - - const normalizedSenderId = normalizeSimplexSenderId(context.senderId); - const dmPeerId = normalizedSenderId ?? String(context.chatId); - const chatRef = formatChatRef({ - type: context.chatType, - id: context.chatType === "group" ? context.chatId : dmPeerId, - }); - - const core = getSimplexRuntime(); - - const route = core.channel.routing.resolveAgentRoute({ - cfg, - channel: SIMPLEX_CHANNEL_ID, - accountId: account.accountId, - peer: { - kind: context.chatType === "group" ? "group" : "direct", - id: context.chatType === "group" ? String(context.chatId) : dmPeerId, - }, - }); - - const isGroup = context.chatType === "group"; - const dmPolicy = account.config.dmPolicy ?? "pairing"; - const defaultGroupPolicy = cfg.channels?.defaults?.groupPolicy; - const groupPolicy = account.config.groupPolicy ?? defaultGroupPolicy ?? "allowlist"; - const configAllowFrom = (account.config.allowFrom ?? []).map((entry) => String(entry)); - const configGroupAllowFrom = (account.config.groupAllowFrom ?? []).map((entry) => - String(entry) - ); - const shouldComputeAuth = core.channel.commands.shouldComputeCommandAuthorized(rawBody, cfg); - const shouldLoadAllowFromStore = - (!isGroup && (dmPolicy !== "open" || shouldComputeAuth)) || - (isGroup && (groupPolicy !== "open" || shouldComputeAuth)); - const storeAllowFrom = shouldLoadAllowFromStore - ? await core.channel.pairing - .readAllowFromStore({ - channel: SIMPLEX_CHANNEL_ID, - accountId: account.accountId, - }) - .catch(() => []) - : []; - const effectiveDmAllowFrom = [...configAllowFrom, ...storeAllowFrom]; - const baseGroupAllowFrom = - configGroupAllowFrom.length > 0 ? configGroupAllowFrom : configAllowFrom; - const effectiveGroupAllowFrom = [...baseGroupAllowFrom, ...storeAllowFrom]; - const allowlistForCommands = isGroup ? effectiveGroupAllowFrom : effectiveDmAllowFrom; - const senderAllowedForCommands = isSimplexAllowlisted({ - allowFrom: allowlistForCommands, - senderId: normalizedSenderId, - groupId: String(context.chatId), - allowGroupId: isGroup, - }); - const useAccessGroups = cfg.commands?.useAccessGroups !== false; - const commandAuthorized = shouldComputeAuth - ? core.channel.commands.resolveCommandAuthorizedFromAuthorizers({ - useAccessGroups, - authorizers: [ - { - configured: allowlistForCommands.length > 0, - allowed: senderAllowedForCommands, - }, - ], - }) - : undefined; - - if (isGroup) { - if (groupPolicy === "disabled") { - runtime.log?.(`[${account.accountId}] SimpleX drop group (groupPolicy=disabled)`); - continue; - } - if (groupPolicy === "allowlist") { - if (effectiveGroupAllowFrom.length === 0) { - runtime.log?.( - `[${account.accountId}] SimpleX drop group (groupPolicy=allowlist, empty allowlist)` - ); - continue; - } - const allowed = isSimplexAllowlisted({ - allowFrom: effectiveGroupAllowFrom, - senderId: normalizedSenderId, - groupId: String(context.chatId), - allowGroupId: true, - }); - if (!allowed) { - runtime.log?.( - `[${account.accountId}] SimpleX drop group sender ${context.senderId ?? "unknown"} (not allowlisted)` - ); - continue; - } - } - } else { - if (dmPolicy !== "open") { - const allowed = isSimplexAllowlisted({ - allowFrom: effectiveDmAllowFrom, - senderId: normalizedSenderId, - allowGroupId: false, - }); - if (!allowed) { - if (dmPolicy === "pairing") { - const senderId = normalizedSenderId ?? String(context.chatId); - const { code, created } = await core.channel.pairing.upsertPairingRequest({ - channel: SIMPLEX_CHANNEL_ID, - id: senderId, - accountId: account.accountId, - meta: { name: context.senderName }, - }); - if (created) { - runtime.log?.(`[${account.accountId}] SimpleX pairing request sender=${senderId}`); - try { - await sendSimplexPayload({ - client, - chatRef, - cfg, - accountId: account.accountId, - payload: { - text: core.channel.pairing.buildPairingReply({ - channel: SIMPLEX_CHANNEL_ID, - idLine: `Your SimpleX contact id: ${senderId}`, - code, - }), - }, - }); - statusSink?.({ lastOutboundAt: Date.now() }); - } catch (err) { - runtime.error?.( - `[${account.accountId}] SimpleX pairing reply failed: ${String(err)}` - ); - } - } - } else { - runtime.log?.( - `[${account.accountId}] SimpleX drop DM from ${context.senderId ?? "unknown"} (dmPolicy=${dmPolicy})` - ); - } - continue; - } - } - } - - let effectiveWasMentioned: boolean | undefined; - if (isGroup) { - const requireMention = resolveSimplexGroupRequireMention({ - account, - groupId: context.chatId, - }); - const mentionRegexes = core.channel.mentions.buildMentionRegexes(cfg, route.agentId); - const wasMentioned = core.channel.mentions.matchesMentionPatterns(rawBody, mentionRegexes); - const allowTextCommands = core.channel.commands.shouldHandleTextCommands({ - cfg, - surface: SIMPLEX_CHANNEL_ID, - }); - const mentionGate = resolveInboundMentionDecision({ - facts: { - canDetectMention: mentionRegexes.length > 0, - wasMentioned, - }, - policy: { - isGroup: true, - requireMention, - allowTextCommands, - hasControlCommand: core.channel.text.hasControlCommand(rawBody, cfg), - commandAuthorized: commandAuthorized === true, - }, - }); - effectiveWasMentioned = mentionGate.effectiveWasMentioned; - if (mentionGate.shouldSkip) { - runtime.log?.( - `[${account.accountId}] SimpleX drop group ${context.chatId} (mention required)` - ); - continue; - } - } - - if (isGroup && core.channel.commands.isControlCommandMessage(rawBody, cfg)) { - if (commandAuthorized !== true) { - runtime.log?.( - `[${account.accountId}] SimpleX drop control command from ${context.senderId ?? "unknown"}` - ); - continue; - } - } - - const storePath = core.channel.session.resolveStorePath(cfg.session?.store, { - agentId: route.agentId, - }); - - const envelopeOptions = core.channel.reply.resolveEnvelopeFormatOptions(cfg); - const previousTimestamp = core.channel.session.readSessionUpdatedAt({ - storePath, - sessionKey: route.sessionKey, - }); - - const fromLabel = - context.chatType === "group" - ? `group:${context.chatId}` - : context.senderName || `contact:${context.senderId ?? "unknown"}`; - - const body = core.channel.reply.formatAgentEnvelope({ - channel: "SimpleX", - from: fromLabel, - previousTimestamp, - envelope: envelopeOptions, - body: rawBody, - }); - - const ctxPayload = core.channel.reply.finalizeInboundContext({ - Body: body, - RawBody: rawBody, - CommandBody: rawBody, - From: - context.chatType === "group" - ? `${SIMPLEX_CHANNEL_ID}:group:${context.chatId}` - : `${SIMPLEX_CHANNEL_ID}:${dmPeerId}`, - To: - context.chatType === "group" - ? `${SIMPLEX_CHANNEL_ID}:group:${context.chatId}` - : `${SIMPLEX_CHANNEL_ID}:${dmPeerId}`, - SessionKey: route.sessionKey, - AccountId: route.accountId, - ChatType: context.chatType === "group" ? "group" : "direct", - ConversationLabel: fromLabel, - GroupSubject: context.chatType === "group" ? context.chatLabel : undefined, - SenderName: context.senderName, - SenderId: context.senderId, - Provider: SIMPLEX_CHANNEL_ID, - Surface: SIMPLEX_CHANNEL_ID, - MessageSid: - typeof item.chatItem?.meta?.itemId === "number" - ? String(item.chatItem.meta.itemId) - : undefined, - WasMentioned: context.chatType === "group" ? effectiveWasMentioned : undefined, - CommandAuthorized: commandAuthorized, - OriginatingChannel: SIMPLEX_CHANNEL_ID, - OriginatingTo: - context.chatType === "group" - ? `${SIMPLEX_CHANNEL_ID}:group:${context.chatId}` - : `${SIMPLEX_CHANNEL_ID}:${dmPeerId}`, - }); - - const fileId = item.chatItem?.file?.fileId; - const fileSize = item.chatItem?.file?.fileSize; - const maxBytes = resolveSimplexMediaMaxBytes({ - cfg, - accountId: account.accountId, - }); - - const pending: PendingInboundFile = { - fileId: typeof fileId === "number" ? fileId : -1, - ctxPayload, - storePath, - sessionKey: route.sessionKey, - chatRef, - rawBody, - account, - cfg, - runtime, - client, - statusSink, - }; - - if (typeof fileId === "number") { - if (typeof fileSize === "number" && fileSize > maxBytes) { - runtime.error?.( - `[${account.accountId}] SimpleX file ${fileId} exceeds limit (${fileSize} > ${maxBytes})` - ); - continue; - } - const accepted = await requestFileDownload({ fileId, account, client, runtime }); - if (accepted) { - pendingFiles.set(pendingKey(account.accountId, fileId), pending); - setTimeout(() => { - const key = pendingKey(account.accountId, fileId); - const current = pendingFiles.get(key); - if (current) { - pendingFiles.delete(key); - void current.client.sendCommand(buildCancelFileCommand(fileId)).catch((err) => { - runtime.error?.( - `[${account.accountId}] SimpleX file timeout cancel failed: ${String(err)}` - ); - }); - void dispatchInbound({ - pending: current, - mediaPath: undefined, - mediaType: undefined, - }).catch((err) => { - runtime.error?.( - `[${account.accountId}] SimpleX pending file timeout: ${String(err)}` - ); - }); - } - }, PENDING_FILE_TIMEOUT_MS); - continue; - } - } - - await dispatchInbound({ pending, mediaPath: undefined, mediaType: undefined }); - } -} - -async function requestFileDownload(params: { - fileId: number; - account: ResolvedSimplexAccount; - client: SimplexWsClient; - runtime: RuntimeEnv; -}): Promise { - const { fileId, account, client, runtime } = params; - const autoAccept = account.config.connection?.autoAcceptFiles !== false; - if (!autoAccept) { - return false; - } - const cmd = buildReceiveFileCommand({ fileId }); - try { - await client.sendCommand(cmd); - } catch (err) { - runtime.error?.(`[${account.accountId}] SimpleX receive file failed: ${String(err)}`); - return false; - } - return true; -} - -async function finalizePendingFile(params: { - accountId: string; - fileId: number; - filePath?: string; -}): Promise { - const pending = pendingFiles.get(pendingKey(params.accountId, params.fileId)); - if (!pending) { - return; - } - pendingFiles.delete(pendingKey(params.accountId, params.fileId)); - const mediaPath = params.filePath?.trim() || undefined; - let mediaType: string | undefined; - if (mediaPath) { - mediaType = await getSimplexRuntime().media.detectMime({ filePath: mediaPath }); - } - await dispatchInbound({ pending, mediaPath, mediaType }); -} - -async function dispatchInbound(params: { - pending: PendingInboundFile; - mediaPath?: string; - mediaType?: string; -}): Promise { - const { pending, mediaPath, mediaType } = params; - const core = getSimplexRuntime(); - const ctxPayload = { - ...pending.ctxPayload, - MediaPath: mediaPath, - MediaType: mediaType, - MediaUrl: mediaPath, - }; - - await core.channel.session.recordInboundSession({ - storePath: pending.storePath, - sessionKey: (ctxPayload as { SessionKey?: string }).SessionKey ?? pending.sessionKey, - ctx: ctxPayload, - onRecordError: (err) => { - pending.runtime.error?.(`simplex: failed updating session meta: ${String(err)}`); - }, - }); - - pending.statusSink?.({ lastInboundAt: Date.now() }); - - await core.channel.reply.dispatchReplyWithBufferedBlockDispatcher({ - ctx: ctxPayload, - cfg: pending.cfg, - dispatcherOptions: { - deliver: async (payload) => { - const hasMedia = - Boolean(payload.mediaUrl) || - (Array.isArray(payload.mediaUrls) && payload.mediaUrls.length > 0); - if (!payload.text && !hasMedia) { - return; - } - if (!pending.account.enabled || !pending.account.configured) { - pending.runtime.error?.( - `[${pending.account.accountId}] SimpleX reply skipped: account not ready (enabled=${pending.account.enabled}, configured=${pending.account.configured})` - ); - return; - } - await sendSimplexPayload({ - client: pending.client, - chatRef: pending.chatRef, - cfg: pending.cfg, - accountId: pending.account.accountId, - payload, - }); - pending.statusSink?.({ lastOutboundAt: Date.now() }); - }, - onError: (err) => { - pending.runtime.error?.( - `[${pending.account.accountId}] SimpleX reply failed: ${String(err)}` - ); - }, - }, - replyOptions: { - disableBlockStreaming: - typeof pending.account.config.blockStreaming === "boolean" - ? !pending.account.config.blockStreaming - : undefined, - }, - }); -} diff --git a/src/channel/simplex-send.ts b/src/channel/simplex-send.ts deleted file mode 100644 index 0664ed3..0000000 --- a/src/channel/simplex-send.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { - buildSendMessagesCommand, - type SimplexComposedMessage, -} from "../simplex/simplex-commands.js"; -import { resolveSimplexCommandError } from "../simplex/simplex-errors.js"; -import type { SimplexClientRegistry } from "./simplex-client-registry.js"; -import { withSimplexRegistryClient } from "./simplex-client-registry.js"; -import { normalizeSimplexMessageId } from "./simplex-common.js"; -import { buildComposedMessages } from "./simplex-media.js"; - -export async function sendComposedMessages(params: { - registry: SimplexClientRegistry; - account: ResolvedSimplexAccount; - chatRef: string; - composedMessages: SimplexComposedMessage[]; -}): Promise<{ messageId?: string }> { - if (params.composedMessages.length === 0) { - return {}; - } - const cmd = buildSendMessagesCommand({ - chatRef: params.chatRef, - composedMessages: params.composedMessages, - }); - const response = await withSimplexRegistryClient(params.registry, params.account, (client) => - client.sendCommand(cmd) - ); - const resp = response.resp as { - type?: string; - chatError?: { errorType?: { type?: string; message?: string } }; - chatItems?: Array<{ chatItem?: { meta?: { itemId?: unknown } } }>; - itemId?: unknown; - messageId?: unknown; - }; - const commandError = resolveSimplexCommandError(resp); - if (commandError) { - throw new Error(commandError); - } - const messageId = - normalizeSimplexMessageId(resp.chatItems?.[0]?.chatItem?.meta?.itemId) ?? - normalizeSimplexMessageId(resp.messageId) ?? - normalizeSimplexMessageId(resp.itemId); - return { messageId }; -} - -export async function buildAndSendSimplexMessages(params: { - registry: SimplexClientRegistry; - cfg: OpenClawConfig; - account: ResolvedSimplexAccount; - chatRef: string; - text?: string; - mediaUrl?: string; - mediaUrls?: string[]; - audioAsVoice?: boolean; -}): Promise<{ messageId?: string }> { - const composedMessages = await buildComposedMessages({ - cfg: params.cfg, - accountId: params.account.accountId, - text: params.text, - mediaUrl: params.mediaUrl, - mediaUrls: params.mediaUrls, - audioAsVoice: params.audioAsVoice, - }); - return await sendComposedMessages({ - registry: params.registry, - account: params.account, - chatRef: params.chatRef, - composedMessages, - }); -} diff --git a/src/channel/transport/simplex-connect.ts b/src/channel/transport/simplex-connect.ts new file mode 100644 index 0000000..6d8d2ab --- /dev/null +++ b/src/channel/transport/simplex-connect.ts @@ -0,0 +1,56 @@ +import type { RuntimeEnv } from "openclaw/plugin-sdk/runtime-env"; +import type { SimplexClient } from "../../simplex/runtime/client.js"; + +export async function connectSimplexWithRetry(params: { + client: SimplexClient; + runtime: RuntimeEnv; + accountId: string; + abortSignal: AbortSignal; + attempts?: number; + baseDelayMs?: number; + maxDelayMs?: number; +}): Promise { + const attempts = params.attempts ?? 10; + let delayMs = params.baseDelayMs ?? 500; + const maxDelayMs = params.maxDelayMs ?? 5_000; + + for (let attempt = 1; attempt <= attempts; attempt += 1) { + if (params.abortSignal.aborted) { + throw new Error("SimpleX connect aborted"); + } + try { + await params.client.connect(); + return; + } catch (err) { + if (attempt >= attempts) { + throw err; + } + params.runtime.error?.( + `[${params.accountId}] SimpleX connect failed (attempt ${attempt}/${attempts}): ${String(err)}; retrying in ${delayMs}ms` + ); + await sleep(delayMs, params.abortSignal); + delayMs = Math.min(maxDelayMs, delayMs * 2); + } + } +} + +function sleep(ms: number, abortSignal: AbortSignal): Promise { + if (abortSignal.aborted) { + return Promise.reject(new Error("SimpleX connect aborted")); + } + return new Promise((resolve, reject) => { + const timer = setTimeout(() => { + cleanup(); + resolve(); + }, ms); + const onAbort = () => { + cleanup(); + reject(new Error("SimpleX connect aborted")); + }; + const cleanup = () => { + clearTimeout(timer); + abortSignal.removeEventListener("abort", onAbort); + }; + abortSignal.addEventListener("abort", onAbort, { once: true }); + }); +} diff --git a/src/cli/migration.ts b/src/cli/migration.ts new file mode 100644 index 0000000..bc4326b --- /dev/null +++ b/src/cli/migration.ts @@ -0,0 +1,381 @@ +import { access, mkdir, readdir, rename } from "node:fs/promises"; +import path from "node:path"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/config-types"; +import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; +import { + LEGACY_SIMPLEX_CHANNEL_ID, + LEGACY_SIMPLEX_PLUGIN_ID, + SIMPLEX_CHANNEL_ID, + SIMPLEX_PLUGIN_ID, +} from "../constants.js"; + +const LEGACY_PLUGIN_ID = LEGACY_SIMPLEX_PLUGIN_ID; +const PLUGIN_ID = SIMPLEX_PLUGIN_ID; +const LEGACY_CHANNEL_ID = LEGACY_SIMPLEX_CHANNEL_ID; +const CHANNEL_ID = SIMPLEX_CHANNEL_ID; + +type MigrationResult = { + changed: string[]; + skipped: string[]; +}; + +type SimplexMigrationStateApi = { + runtime: { + state: { + resolveStateDir: () => string; + }; + }; +}; + +const RUNTIME_CONFIG_KEYS = new Set([ + "dbFilePrefix", + "displayName", + "fullName", + "migrationConfirmation", + "autoAcceptFiles", + "connectTimeoutMs", +]); + +const LEGACY_RUNTIME_KEYS = new Set([ + "authToken", + "cliPath", + "command", + "headers", + "host", + "httpUrl", + "managed", + "mode", + "path", + "port", + "process", + "reconnect", + "retry", + "token", + "url", + "wsUrl", +]); + +const LEGACY_DEFAULT_DB_PREFIX = "~/.openclaw/simplex/openclaw-simplex"; + +function dedupeStrings(values: unknown[] | undefined): string[] | undefined { + if (!Array.isArray(values)) { + return values as string[] | undefined; + } + return [ + ...new Set( + values.filter( + (value): value is string => typeof value === "string" && value.trim().length > 0 + ) + ), + ]; +} + +function mergeObjects>( + legacy: T | undefined, + next: T | undefined +): T | undefined { + if (!legacy && !next) { + return undefined; + } + if (!legacy) { + return next; + } + if (!next) { + return legacy; + } + const merged: Record = { ...legacy, ...next }; + if ("connection" in legacy || "connection" in next) { + merged.connection = { + ...((legacy.connection as Record | undefined) ?? {}), + ...((next.connection as Record | undefined) ?? {}), + }; + } + if ("accounts" in legacy || "accounts" in next) { + merged.accounts = { + ...((legacy.accounts as Record | undefined) ?? {}), + ...((next.accounts as Record | undefined) ?? {}), + }; + } + return merged as T; +} + +function defaultDbFilePrefixForAccount(accountId?: string): string { + return accountId ? `${LEGACY_DEFAULT_DB_PREFIX}-${accountId}` : LEGACY_DEFAULT_DB_PREFIX; +} + +function migrateConnectionConfig( + account: Record, + value: unknown, + pathLabel: string, + result: MigrationResult, + accountId?: string +): void { + if (value === undefined) { + return; + } + if (!value || typeof value !== "object" || Array.isArray(value)) { + if (account.dbFilePrefix === undefined) { + account.dbFilePrefix = defaultDbFilePrefixForAccount(accountId); + } + delete account.connection; + result.changed.push( + `config: replaced invalid ${pathLabel} with dbFilePrefix for the Node runtime` + ); + return; + } + + const connection = value as Record; + const moved: string[] = []; + const removed: string[] = []; + + for (const [key, fieldValue] of Object.entries(connection)) { + if (RUNTIME_CONFIG_KEYS.has(key)) { + if (account[key] === undefined) { + account[key] = fieldValue; + moved.push(key); + } + } else { + removed.push(key); + } + } + + if (account.dbFilePrefix === undefined) { + account.dbFilePrefix = defaultDbFilePrefixForAccount(accountId); + moved.push("dbFilePrefix"); + } + + delete account.connection; + + if (moved.length > 0) { + result.changed.push( + `config: moved runtime field(s) from ${pathLabel} to ${pathLabel.replace(/\.connection$/, "")}: ${[ + ...new Set(moved), + ] + .toSorted() + .join(", ")}` + ); + } + if (removed.length > 0) { + result.changed.push( + `config: removed legacy runtime field(s) from ${pathLabel}: ${removed.toSorted().join(", ")}` + ); + } +} + +function sanitizeSimplexAccountConfig( + value: unknown, + pathLabel: string, + result: MigrationResult, + accountId?: string +): Record | undefined { + if (!value || typeof value !== "object" || Array.isArray(value)) { + return value as Record | undefined; + } + const account = { ...(value as Record) }; + const removed: string[] = []; + + for (const key of Object.keys(account)) { + if (LEGACY_RUNTIME_KEYS.has(key)) { + delete account[key]; + removed.push(key); + } + } + if (removed.length > 0) { + result.changed.push( + `config: removed legacy runtime field(s) from ${pathLabel}: ${removed.toSorted().join(", ")}` + ); + } + + if ("connection" in account) { + migrateConnectionConfig( + account, + account.connection, + `${pathLabel}.connection`, + result, + accountId + ); + } + + return account; +} + +function sanitizeSimplexChannelConfig(channel: unknown, result: MigrationResult): unknown { + if (!channel || typeof channel !== "object" || Array.isArray(channel)) { + return channel; + } + + const next = sanitizeSimplexAccountConfig(channel, `channels.${CHANNEL_ID}`, result) as Record< + string, + unknown + >; + const accounts = + next.accounts && typeof next.accounts === "object" && !Array.isArray(next.accounts) + ? (next.accounts as Record) + : null; + + if (accounts) { + const sanitizedAccounts: Record = {}; + for (const [accountId, account] of Object.entries(accounts)) { + sanitizedAccounts[accountId] = sanitizeSimplexAccountConfig( + account, + `channels.${CHANNEL_ID}.accounts.${accountId}`, + result, + accountId + ); + } + next.accounts = sanitizedAccounts; + } + + return next; +} + +export function migrateConfigObject(rawConfig: Record): { + nextConfig: Record; + result: MigrationResult; +} { + const result: MigrationResult = { changed: [], skipped: [] }; + const nextConfig: Record = { + ...rawConfig, + plugins: { ...((rawConfig.plugins as Record | undefined) ?? {}) }, + channels: { ...((rawConfig.channels as Record | undefined) ?? {}) }, + }; + + const plugins = nextConfig.plugins as Record; + const channels = nextConfig.channels as Record; + + const entries = { ...((plugins.entries as Record | undefined) ?? {}) }; + if (LEGACY_PLUGIN_ID in entries) { + entries[PLUGIN_ID] = mergeObjects( + entries[LEGACY_PLUGIN_ID] as Record | undefined, + entries[PLUGIN_ID] as Record | undefined + ); + delete entries[LEGACY_PLUGIN_ID]; + plugins.entries = entries; + result.changed.push( + `config: plugins.entries.${LEGACY_PLUGIN_ID} -> plugins.entries.${PLUGIN_ID}` + ); + } + + const installs = { ...((plugins.installs as Record | undefined) ?? {}) }; + if (LEGACY_PLUGIN_ID in installs) { + installs[PLUGIN_ID] = mergeObjects( + installs[LEGACY_PLUGIN_ID] as Record | undefined, + installs[PLUGIN_ID] as Record | undefined + ); + delete installs[LEGACY_PLUGIN_ID]; + plugins.installs = installs; + result.changed.push( + `config: plugins.installs.${LEGACY_PLUGIN_ID} -> plugins.installs.${PLUGIN_ID}` + ); + } + + for (const key of ["allow", "deny"] as const) { + const values = dedupeStrings(plugins[key] as unknown[] | undefined); + if (!values?.includes(LEGACY_PLUGIN_ID)) { + continue; + } + const migrated = dedupeStrings( + values.map((value) => (value === LEGACY_PLUGIN_ID ? PLUGIN_ID : value)) + ); + plugins[key] = migrated; + result.changed.push( + `config: plugins.${key} replaced "${LEGACY_PLUGIN_ID}" with "${PLUGIN_ID}"` + ); + } + + if (LEGACY_CHANNEL_ID in channels) { + channels[CHANNEL_ID] = mergeObjects( + channels[LEGACY_CHANNEL_ID] as Record | undefined, + channels[CHANNEL_ID] as Record | undefined + ); + delete channels[LEGACY_CHANNEL_ID]; + result.changed.push(`config: channels.${LEGACY_CHANNEL_ID} -> channels.${CHANNEL_ID}`); + } + + if (CHANNEL_ID in channels) { + channels[CHANNEL_ID] = sanitizeSimplexChannelConfig(channels[CHANNEL_ID], result); + } + + return { nextConfig, result }; +} + +export async function migrateStateFiles( + api: SimplexMigrationStateApi, + dryRun: boolean +): Promise { + const result: MigrationResult = { changed: [], skipped: [] }; + const credentialsDir = path.join(api.runtime.state.resolveStateDir(), "credentials"); + await mkdir(credentialsDir, { recursive: true }); + const entries = await readdir(credentialsDir, { withFileTypes: true }); + + for (const entry of entries) { + if (!entry.isFile()) { + continue; + } + const source = entry.name; + let target: string | null = null; + if (source === `${LEGACY_CHANNEL_ID}-pairing.json`) { + target = `${CHANNEL_ID}-pairing.json`; + } else if (source === `${LEGACY_CHANNEL_ID}-allowFrom.json`) { + target = `${CHANNEL_ID}-allowFrom.json`; + } else { + const accountMatch = source.match(/^simplex-(.+)-allowFrom\.json$/); + if (accountMatch?.[1]) { + target = `${CHANNEL_ID}-${accountMatch[1]}-allowFrom.json`; + } + } + if (!target) { + continue; + } + const sourcePath = path.join(credentialsDir, source); + const targetPath = path.join(credentialsDir, target); + try { + await access(targetPath); + result.skipped.push(`state: skipped ${source} because ${target} already exists`); + continue; + } catch {} + if (!dryRun) { + await rename(sourcePath, targetPath); + } + result.changed.push(`state: ${source} -> ${target}`); + } + + return result; +} + +function printMigrationResult(result: MigrationResult, dryRun: boolean): void { + const title = dryRun + ? "OpenClaw SimpleX migration dry run" + : "OpenClaw SimpleX migration complete"; + console.log(title); + if (result.changed.length === 0) { + console.log("- No changes were needed."); + } else { + for (const line of result.changed) { + console.log(`- ${line}`); + } + } + for (const line of result.skipped) { + console.log(`- ${line}`); + } +} + +export async function runMigration(api: OpenClawPluginApi, dryRun: boolean): Promise { + const currentConfig = api.runtime.config.current() as OpenClawConfig; + const { nextConfig, result: configResult } = migrateConfigObject(currentConfig); + const stateResult = await migrateStateFiles(api, dryRun); + const result: MigrationResult = { + changed: [...configResult.changed, ...stateResult.changed], + skipped: [...configResult.skipped, ...stateResult.skipped], + }; + if (!dryRun && configResult.changed.length > 0) { + await api.runtime.config.replaceConfigFile({ + nextConfig: nextConfig as OpenClawConfig, + afterWrite: { + mode: "restart", + reason: "SimpleX migration updated plugin or channel configuration", + }, + }); + } + printMigrationResult(result, dryRun); +} diff --git a/src/cli/plugin-cli.test.ts b/src/cli/plugin-cli.test.ts index 7b4ee57..0f74547 100644 --- a/src/cli/plugin-cli.test.ts +++ b/src/cli/plugin-cli.test.ts @@ -1,16 +1,59 @@ import { mkdir, readdir, writeFile } from "node:fs/promises"; import os from "node:os"; import path from "node:path"; -import { describe, expect, it } from "vitest"; +import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; +import { describe, expect, it, vi } from "vitest"; +import { + LEGACY_SIMPLEX_CHANNEL_ID, + LEGACY_SIMPLEX_PLUGIN_ID, + SIMPLEX_CHANNEL_ID, + SIMPLEX_PLUGIN_ID, +} from "../constants.js"; +import { runMigration } from "./migration.js"; import { - CHANNEL_ID, - LEGACY_CHANNEL_ID, - LEGACY_PLUGIN_ID, migrateConfigObject, migrateStateFiles, - PLUGIN_ID, + registerSimplexCliMetadata, } from "./plugin-cli.js"; +const CHANNEL_ID = SIMPLEX_CHANNEL_ID; +const LEGACY_CHANNEL_ID = LEGACY_SIMPLEX_CHANNEL_ID; +const LEGACY_PLUGIN_ID = LEGACY_SIMPLEX_PLUGIN_ID; +const PLUGIN_ID = SIMPLEX_PLUGIN_ID; + +class FakeCliCommand { + constructor( + private readonly path: string[], + private readonly commands: string[][] + ) {} + + command(name: string): FakeCliCommand { + const commandPath = [...this.path, name]; + this.commands.push(commandPath); + return new FakeCliCommand(commandPath, this.commands); + } + + alias(): this { + return this; + } + + description(): this { + return this; + } + + option(): this { + return this; + } + + requiredOption(): this { + return this; + } + + action(): this { + return this; + } +} + describe("simplex migration config", () => { it("migrates legacy plugin and channel ids", () => { const { nextConfig, result } = migrateConfigObject({ @@ -27,7 +70,7 @@ describe("simplex migration config", () => { channels: { [LEGACY_CHANNEL_ID]: { enabled: true, - connection: { wsUrl: "ws://127.0.0.1:5225" }, + connection: {}, accounts: { ops: { allowFrom: ["*"], @@ -51,7 +94,7 @@ describe("simplex migration config", () => { channels: { [CHANNEL_ID]: { enabled: true, - connection: { wsUrl: "ws://127.0.0.1:5225" }, + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex", accounts: { ops: { allowFrom: ["*"], @@ -70,6 +113,113 @@ describe("simplex migration config", () => { `config: channels.${LEGACY_CHANNEL_ID} -> channels.${CHANNEL_ID}` ); }); + + it("removes legacy WebSocket and CLI runtime config while preserving policies and accounts", () => { + const { nextConfig, result } = migrateConfigObject({ + channels: { + [LEGACY_CHANNEL_ID]: { + enabled: true, + wsUrl: "ws://127.0.0.1:5225", + managed: true, + cliPath: "/usr/local/bin/simplex-chat", + connection: { + wsUrl: "ws://127.0.0.1:5225", + authToken: "legacy-token", + dbFilePrefix: "~/.openclaw/simplex/kept", + connectTimeoutMs: 7000, + }, + dmPolicy: "pairing", + allowFrom: ["alice"], + accounts: { + ops: { + name: "Ops", + allowFrom: ["bob"], + groupAllowFrom: ["group:ops"], + connection: { + wsUrl: "ws://127.0.0.1:5226", + displayName: "Ops Bot", + }, + }, + }, + }, + }, + }); + + expect(nextConfig.channels).toEqual({ + [CHANNEL_ID]: { + enabled: true, + dbFilePrefix: "~/.openclaw/simplex/kept", + connectTimeoutMs: 7000, + dmPolicy: "pairing", + allowFrom: ["alice"], + accounts: { + ops: { + name: "Ops", + allowFrom: ["bob"], + groupAllowFrom: ["group:ops"], + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex-ops", + displayName: "Ops Bot", + }, + }, + }, + }); + expect(result.changed).toContain( + `config: channels.${LEGACY_CHANNEL_ID} -> channels.${CHANNEL_ID}` + ); + expect(result.changed).toContain( + `config: removed legacy runtime field(s) from channels.${CHANNEL_ID}: cliPath, managed, wsUrl` + ); + expect(result.changed).toContain( + `config: removed legacy runtime field(s) from channels.${CHANNEL_ID}.connection: authToken, wsUrl` + ); + expect(result.changed).toContain( + `config: removed legacy runtime field(s) from channels.${CHANNEL_ID}.accounts.ops.connection: wsUrl` + ); + }); + + it("normalizes already-renamed configs when migrate is run after a partial manual upgrade", () => { + const { nextConfig, result } = migrateConfigObject({ + channels: { + [CHANNEL_ID]: { + connection: { + wsUrl: "ws://localhost:5225", + fullName: "SimpleX Agent", + }, + accounts: { + support: { + managed: false, + connection: { + token: "old", + autoAcceptFiles: false, + }, + }, + }, + }, + }, + }); + + expect(nextConfig.channels).toEqual({ + [CHANNEL_ID]: { + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex", + fullName: "SimpleX Agent", + accounts: { + support: { + autoAcceptFiles: false, + dbFilePrefix: "~/.openclaw/simplex/openclaw-simplex-support", + }, + }, + }, + }); + expect(result.changed).toContain( + `config: removed legacy runtime field(s) from channels.${CHANNEL_ID}.connection: wsUrl` + ); + expect(result.changed).toContain( + `config: removed legacy runtime field(s) from channels.${CHANNEL_ID}.accounts.support: managed` + ); + expect(result.changed).toContain( + `config: removed legacy runtime field(s) from channels.${CHANNEL_ID}.accounts.support.connection: token` + ); + }); }); describe("simplex migration state", () => { @@ -154,3 +304,104 @@ describe("simplex migration state", () => { expect(files).toEqual([`${LEGACY_CHANNEL_ID}-pairing.json`]); }); }); + +describe("simplex migration command", () => { + it("uses the runtime config snapshot and explicit replacement writer", async () => { + const stateDir = path.join(os.tmpdir(), `openclaw-simplex-test-${Date.now()}-runtime`); + const writes: unknown[] = []; + const api = { + runtime: { + config: { + current: () => ({ + channels: { + [CHANNEL_ID]: { + connection: { + wsUrl: "ws://127.0.0.1:5225", + dbFilePrefix: "~/.openclaw/simplex/kept", + }, + }, + }, + }), + replaceConfigFile: async (params: unknown) => { + writes.push(params); + }, + loadConfig: () => { + throw new Error("deprecated loadConfig() must not be used"); + }, + writeConfigFile: () => { + throw new Error("deprecated writeConfigFile() must not be used"); + }, + }, + state: { + resolveStateDir: () => stateDir, + }, + }, + } as unknown as OpenClawPluginApi; + const log = vi.spyOn(console, "log").mockImplementation(() => {}); + + try { + await runMigration(api, false); + } finally { + log.mockRestore(); + } + + expect(writes).toHaveLength(1); + expect(writes[0]).toEqual({ + nextConfig: { + plugins: {}, + channels: { + [CHANNEL_ID]: { + dbFilePrefix: "~/.openclaw/simplex/kept", + }, + }, + }, + afterWrite: { + mode: "restart", + reason: "SimpleX migration updated plugin or channel configuration", + }, + }); + }); +}); + +describe("simplex cli metadata", () => { + it("registers operator commands for runtime, requests, groups, links, and migration", () => { + const commands: string[][] = []; + const api = { + registerCli: (registrar: (ctx: { program: FakeCliCommand }) => void) => { + registrar({ program: new FakeCliCommand([], commands) }); + }, + } as unknown as OpenClawPluginApi; + + registerSimplexCliMetadata(api); + + expect(commands).toEqual( + expect.arrayContaining([ + [PLUGIN_ID], + [PLUGIN_ID, "migrate"], + [PLUGIN_ID, "invite"], + [PLUGIN_ID, "invite", "create"], + [PLUGIN_ID, "invite", "list"], + [PLUGIN_ID, "address"], + [PLUGIN_ID, "address", "show"], + [PLUGIN_ID, "address", "create"], + [PLUGIN_ID, "address", "revoke"], + [PLUGIN_ID, "runtime"], + [PLUGIN_ID, "runtime", "status"], + [PLUGIN_ID, "runtime", "doctor"], + [PLUGIN_ID, "requests"], + [PLUGIN_ID, "requests", "list"], + [PLUGIN_ID, "requests", "accept"], + [PLUGIN_ID, "requests", "reject"], + [PLUGIN_ID, "groups"], + [PLUGIN_ID, "groups", "create"], + [PLUGIN_ID, "groups", "link"], + [PLUGIN_ID, "groups", "link", "create"], + [PLUGIN_ID, "groups", "link", "list"], + [PLUGIN_ID, "groups", "link", "revoke"], + [PLUGIN_ID, "connect"], + [PLUGIN_ID, "connect", "plan"], + [PLUGIN_ID, "connect", "run"], + ]) + ); + }); +}); diff --git a/src/cli/plugin-cli.ts b/src/cli/plugin-cli.ts index 0278b76..9ce8b68 100644 --- a/src/cli/plugin-cli.ts +++ b/src/cli/plugin-cli.ts @@ -1,42 +1,66 @@ -import { access, mkdir, readdir, rename } from "node:fs/promises"; -import path from "node:path"; import { renderQrTerminal } from "openclaw/plugin-sdk/media-runtime"; import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; +import { LEGACY_SIMPLEX_PLUGIN_ID, SIMPLEX_PLUGIN_ID } from "../constants.js"; import { - LEGACY_SIMPLEX_CHANNEL_ID, - LEGACY_SIMPLEX_PLUGIN_ID, - SIMPLEX_CHANNEL_ID, - SIMPLEX_PLUGIN_ID, -} from "../constants.js"; + connectSimplexLink, + planSimplexConnectionLink, +} from "../simplex/services/connect-links.js"; +import { + acceptSimplexContactRequest, + listSimplexContactRequests, + rejectSimplexContactRequest, +} from "../simplex/services/contact-requests.js"; +import { + createSimplexGroup, + createSimplexGroupLink, + listSimplexGroupLink, + revokeSimplexGroupLink, +} from "../simplex/services/groups.js"; import { createSimplexInvite, listSimplexInvites, revokeSimplexInvite, -} from "../simplex/simplex-invite-service.js"; +} from "../simplex/services/invites.js"; +import { + doctorSimplexRuntime, + getSimplexRuntimeStatus, +} from "../simplex/services/runtime-status.js"; +import { runMigration } from "./migration.js"; -export const LEGACY_PLUGIN_ID = LEGACY_SIMPLEX_PLUGIN_ID; -export const PLUGIN_ID = SIMPLEX_PLUGIN_ID; -export const LEGACY_CHANNEL_ID = LEGACY_SIMPLEX_CHANNEL_ID; -export const CHANNEL_ID = SIMPLEX_CHANNEL_ID; +export { migrateConfigObject, migrateStateFiles } from "./migration.js"; -type MigrationResult = { - changed: string[]; - skipped: string[]; -}; +const LEGACY_PLUGIN_ID = LEGACY_SIMPLEX_PLUGIN_ID; +const PLUGIN_ID = SIMPLEX_PLUGIN_ID; -type SimplexMigrationStateApi = { - runtime: { - state: { - resolveStateDir: () => string; - }; - }; +type InviteCliOptions = { + accountId?: string; + qr?: boolean; }; -type InviteCliOptions = { +type AccountCliOptions = { accountId?: string; +}; + +type RequestCliOptions = AccountCliOptions & { + contactRequestId?: string; +}; + +type GroupCreateCliOptions = AccountCliOptions & { + displayName?: string; + fullName?: string; + description?: string; +}; + +type GroupLinkCliOptions = AccountCliOptions & { + groupId?: string; + role?: string; qr?: boolean; }; +type ConnectCliOptions = AccountCliOptions & { + link?: string; +}; + function readOptionalAccountId(value?: string): string | null { const trimmed = value?.trim(); return trimmed ? trimmed : null; @@ -51,6 +75,22 @@ function printJson(value: unknown): void { console.log(JSON.stringify(value, null, 2)); } +function readPositiveInteger(value: string | undefined, label: string): number { + const parsed = Number(value?.trim() ?? ""); + if (!Number.isInteger(parsed) || parsed <= 0) { + throw new Error(`${label} must be a positive integer`); + } + return parsed; +} + +function readRequiredString(value: string | undefined, label: string): string { + const trimmed = value?.trim(); + if (!trimmed) { + throw new Error(`${label} is required`); + } + return trimmed; +} + async function runInviteCreateCli( api: OpenClawPluginApi, mode: "connect" | "address", @@ -65,7 +105,7 @@ async function runInviteCreateCli( printJson({ accountId: result.accountId, mode: result.mode, - command: result.command, + operation: result.operation, link: result.link, }); if (opts.qr && result.link) { @@ -114,191 +154,140 @@ async function runAddressRevokeCli(api: OpenClawPluginApi, opts: InviteCliOption }); printJson({ accountId: result.accountId, - revoked: true, + revoked: result.revoked, }); } -function dedupeStrings(values: unknown[] | undefined): string[] | undefined { - if (!Array.isArray(values)) { - return values as string[] | undefined; - } - return [ - ...new Set( - values.filter( - (value): value is string => typeof value === "string" && value.trim().length > 0 - ) - ), - ]; +async function runRuntimeStatusCli(api: OpenClawPluginApi, opts: AccountCliOptions): Promise { + printJson( + await getSimplexRuntimeStatus({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + }) + ); } -function mergeObjects>( - legacy: T | undefined, - next: T | undefined -): T | undefined { - if (!legacy && !next) { - return undefined; - } - if (!legacy) { - return next; - } - if (!next) { - return legacy; - } - const merged: Record = { ...legacy, ...next }; - if ("connection" in legacy || "connection" in next) { - merged.connection = { - ...((legacy.connection as Record | undefined) ?? {}), - ...((next.connection as Record | undefined) ?? {}), - }; - } - if ("accounts" in legacy || "accounts" in next) { - merged.accounts = { - ...((legacy.accounts as Record | undefined) ?? {}), - ...((next.accounts as Record | undefined) ?? {}), - }; - } - return merged as T; +async function runRuntimeDoctorCli(api: OpenClawPluginApi, opts: AccountCliOptions): Promise { + printJson( + await doctorSimplexRuntime({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + }) + ); } -export function migrateConfigObject(rawConfig: Record): { - nextConfig: Record; - result: MigrationResult; -} { - const result: MigrationResult = { changed: [], skipped: [] }; - const nextConfig: Record = { - ...rawConfig, - plugins: { ...((rawConfig.plugins as Record | undefined) ?? {}) }, - channels: { ...((rawConfig.channels as Record | undefined) ?? {}) }, - }; - - const plugins = nextConfig.plugins as Record; - const channels = nextConfig.channels as Record; - - const entries = { ...((plugins.entries as Record | undefined) ?? {}) }; - if (LEGACY_PLUGIN_ID in entries) { - entries[PLUGIN_ID] = mergeObjects( - entries[LEGACY_PLUGIN_ID] as Record | undefined, - entries[PLUGIN_ID] as Record | undefined - ); - delete entries[LEGACY_PLUGIN_ID]; - plugins.entries = entries; - result.changed.push( - `config: plugins.entries.${LEGACY_PLUGIN_ID} -> plugins.entries.${PLUGIN_ID}` - ); - } +async function runRequestsListCli(api: OpenClawPluginApi, opts: AccountCliOptions): Promise { + printJson( + await listSimplexContactRequests({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + }) + ); +} - const installs = { ...((plugins.installs as Record | undefined) ?? {}) }; - if (LEGACY_PLUGIN_ID in installs) { - installs[PLUGIN_ID] = mergeObjects( - installs[LEGACY_PLUGIN_ID] as Record | undefined, - installs[PLUGIN_ID] as Record | undefined - ); - delete installs[LEGACY_PLUGIN_ID]; - plugins.installs = installs; - result.changed.push( - `config: plugins.installs.${LEGACY_PLUGIN_ID} -> plugins.installs.${PLUGIN_ID}` - ); - } +async function runRequestsAcceptCli( + api: OpenClawPluginApi, + opts: RequestCliOptions +): Promise { + printJson( + await acceptSimplexContactRequest({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + contactRequestId: readPositiveInteger(opts.contactRequestId, "contactRequestId"), + }) + ); +} - for (const key of ["allow", "deny"] as const) { - const values = dedupeStrings(plugins[key] as unknown[] | undefined); - if (!values?.includes(LEGACY_PLUGIN_ID)) { - continue; - } - const migrated = dedupeStrings( - values.map((value) => (value === LEGACY_PLUGIN_ID ? PLUGIN_ID : value)) - ); - plugins[key] = migrated; - result.changed.push( - `config: plugins.${key} replaced "${LEGACY_PLUGIN_ID}" with "${PLUGIN_ID}"` - ); - } +async function runRequestsRejectCli( + api: OpenClawPluginApi, + opts: RequestCliOptions +): Promise { + printJson( + await rejectSimplexContactRequest({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + contactRequestId: readPositiveInteger(opts.contactRequestId, "contactRequestId"), + }) + ); +} - if (LEGACY_CHANNEL_ID in channels) { - channels[CHANNEL_ID] = mergeObjects( - channels[LEGACY_CHANNEL_ID] as Record | undefined, - channels[CHANNEL_ID] as Record | undefined - ); - delete channels[LEGACY_CHANNEL_ID]; - result.changed.push(`config: channels.${LEGACY_CHANNEL_ID} -> channels.${CHANNEL_ID}`); - } +async function runGroupCreateCli( + api: OpenClawPluginApi, + opts: GroupCreateCliOptions +): Promise { + printJson( + await createSimplexGroup({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + displayName: readRequiredString(opts.displayName, "displayName"), + fullName: opts.fullName, + description: opts.description, + }) + ); +} - return { nextConfig, result }; +async function runGroupLinkCreateCli( + api: OpenClawPluginApi, + opts: GroupLinkCliOptions +): Promise { + const result = await createSimplexGroupLink({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + groupId: readPositiveInteger(opts.groupId, "groupId"), + role: opts.role, + }); + printJson(result); + if (opts.qr && result.link) { + await printTerminalQr(result.link); + } } -export async function migrateStateFiles( - api: SimplexMigrationStateApi, - dryRun: boolean -): Promise { - const result: MigrationResult = { changed: [], skipped: [] }; - const credentialsDir = path.join(api.runtime.state.resolveStateDir(), "credentials"); - await mkdir(credentialsDir, { recursive: true }); - const entries = await readdir(credentialsDir, { withFileTypes: true }); - - for (const entry of entries) { - if (!entry.isFile()) { - continue; - } - const source = entry.name; - let target: string | null = null; - if (source === `${LEGACY_CHANNEL_ID}-pairing.json`) { - target = `${CHANNEL_ID}-pairing.json`; - } else if (source === `${LEGACY_CHANNEL_ID}-allowFrom.json`) { - target = `${CHANNEL_ID}-allowFrom.json`; - } else { - const accountMatch = source.match(/^simplex-(.+)-allowFrom\.json$/); - if (accountMatch?.[1]) { - target = `${CHANNEL_ID}-${accountMatch[1]}-allowFrom.json`; - } - } - if (!target) { - continue; - } - const sourcePath = path.join(credentialsDir, source); - const targetPath = path.join(credentialsDir, target); - try { - await access(targetPath); - result.skipped.push(`state: skipped ${source} because ${target} already exists`); - continue; - } catch {} - if (!dryRun) { - await rename(sourcePath, targetPath); - } - result.changed.push(`state: ${source} -> ${target}`); +async function runGroupLinkListCli( + api: OpenClawPluginApi, + opts: GroupLinkCliOptions +): Promise { + const result = await listSimplexGroupLink({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + groupId: readPositiveInteger(opts.groupId, "groupId"), + }); + printJson(result); + if (opts.qr && result.link) { + await printTerminalQr(result.link); } +} - return result; +async function runGroupLinkRevokeCli( + api: OpenClawPluginApi, + opts: GroupLinkCliOptions +): Promise { + printJson( + await revokeSimplexGroupLink({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + groupId: readPositiveInteger(opts.groupId, "groupId"), + }) + ); } -function printMigrationResult(result: MigrationResult, dryRun: boolean): void { - const title = dryRun - ? "OpenClaw SimpleX migration dry run" - : "OpenClaw SimpleX migration complete"; - console.log(title); - if (result.changed.length === 0) { - console.log("- No changes were needed."); - } else { - for (const line of result.changed) { - console.log(`- ${line}`); - } - } - for (const line of result.skipped) { - console.log(`- ${line}`); - } +async function runConnectPlanCli(api: OpenClawPluginApi, opts: ConnectCliOptions): Promise { + printJson( + await planSimplexConnectionLink({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + link: readRequiredString(opts.link, "link"), + }) + ); } -export async function runMigration(api: OpenClawPluginApi, dryRun: boolean): Promise { - const currentConfig = api.runtime.config.loadConfig() as Record; - const { nextConfig, result: configResult } = migrateConfigObject(currentConfig); - const stateResult = await migrateStateFiles(api, dryRun); - const result: MigrationResult = { - changed: [...configResult.changed, ...stateResult.changed], - skipped: [...configResult.skipped, ...stateResult.skipped], - }; - if (!dryRun && configResult.changed.length > 0) { - await api.runtime.config.writeConfigFile(nextConfig); - } - printMigrationResult(result, dryRun); +async function runConnectCli(api: OpenClawPluginApi, opts: ConnectCliOptions): Promise { + printJson( + await connectSimplexLink({ + cfg: api.config, + accountId: readOptionalAccountId(opts.accountId), + link: readRequiredString(opts.link, "link"), + }) + ); } const SIMPLEX_CLI_COMMANDS = [PLUGIN_ID, LEGACY_PLUGIN_ID]; @@ -326,7 +315,7 @@ export function registerSimplexCliMetadata(api: OpenClawPluginApi): void { command .command("migrate") - .description("Migrate config and OpenClaw state from simplex -> openclaw-simplex ids") + .description("Migrate SimpleX ids and legacy WebSocket runtime config") .option("--dry-run", "Show planned changes without writing files", false) .action(async (opts: { dryRun?: boolean }) => { await runMigration(api, opts.dryRun === true); @@ -379,6 +368,117 @@ export function registerSimplexCliMetadata(api: OpenClawPluginApi): void { .action(async (opts: InviteCliOptions) => { await runAddressRevokeCli(api, opts); }); + + const runtime = command.command("runtime").description("SimpleX runtime diagnostics"); + + runtime + .command("status") + .description("Show SimpleX runtime status for an account") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: AccountCliOptions) => { + await runRuntimeStatusCli(api, opts); + }); + + runtime + .command("doctor") + .description("Run SimpleX runtime diagnostics for an account") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: AccountCliOptions) => { + await runRuntimeDoctorCli(api, opts); + }); + + const requests = command.command("requests").description("SimpleX contact request helpers"); + + requests + .command("list") + .description("List pending SimpleX contact requests seen by the runtime") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: AccountCliOptions) => { + await runRequestsListCli(api, opts); + }); + + requests + .command("accept") + .description("Accept a pending SimpleX contact request") + .requiredOption("--contact-request-id ", "SimpleX contact request id") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: RequestCliOptions) => { + await runRequestsAcceptCli(api, opts); + }); + + requests + .command("reject") + .description("Reject a pending SimpleX contact request") + .requiredOption("--contact-request-id ", "SimpleX contact request id") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: RequestCliOptions) => { + await runRequestsRejectCli(api, opts); + }); + + const groups = command.command("groups").description("SimpleX group helpers"); + + groups + .command("create") + .description("Create a SimpleX group") + .requiredOption("--display-name ", "SimpleX group display name") + .option("--full-name ", "SimpleX group full name") + .option("--description ", "SimpleX group description") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: GroupCreateCliOptions) => { + await runGroupCreateCli(api, opts); + }); + + const groupLink = groups.command("link").description("SimpleX group link helpers"); + + groupLink + .command("create") + .description("Create a SimpleX group invite link") + .requiredOption("--group-id ", "SimpleX group id") + .option("--role ", "Accepted member role for the group link", "member") + .option("--account-id ", "Use a specific SimpleX account") + .option("--qr", "Print a terminal QR code for the group link", false) + .action(async (opts: GroupLinkCliOptions) => { + await runGroupLinkCreateCli(api, opts); + }); + + groupLink + .command("list") + .description("Show the current SimpleX group invite link") + .requiredOption("--group-id ", "SimpleX group id") + .option("--account-id ", "Use a specific SimpleX account") + .option("--qr", "Print a terminal QR code for the group link", false) + .action(async (opts: GroupLinkCliOptions) => { + await runGroupLinkListCli(api, opts); + }); + + groupLink + .command("revoke") + .description("Revoke the current SimpleX group invite link") + .requiredOption("--group-id ", "SimpleX group id") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: GroupLinkCliOptions) => { + await runGroupLinkRevokeCli(api, opts); + }); + + const connect = command.command("connect").description("SimpleX link onboarding helpers"); + + connect + .command("plan") + .description("Inspect what connecting to a SimpleX link would do") + .requiredOption("--link ", "SimpleX contact, address, or group link") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: ConnectCliOptions) => { + await runConnectPlanCli(api, opts); + }); + + connect + .command("run") + .description("Connect the active SimpleX user to a contact, address, or group link") + .requiredOption("--link ", "SimpleX contact, address, or group link") + .option("--account-id ", "Use a specific SimpleX account") + .action(async (opts: ConnectCliOptions) => { + await runConnectCli(api, opts); + }); }, { commands: [...SIMPLEX_CLI_COMMANDS], diff --git a/src/config/accounts.test.ts b/src/config/accounts.test.ts index 96a916e..b73e615 100644 --- a/src/config/accounts.test.ts +++ b/src/config/accounts.test.ts @@ -6,6 +6,7 @@ import { listSimplexAccountIds, resolveDefaultSimplexAccountId, resolveSimplexAccount, + SIMPLEX_CLI_DEFAULT_DB_PREFIX, } from "./accounts.js"; describe("simplex accounts", () => { @@ -56,20 +57,18 @@ describe("simplex accounts", () => { expect(resolveDefaultSimplexAccountId(cfg)).toBe("beta"); }); - it("merges connection config across base and account", () => { + it("merges node runtime config across base and account", () => { const cfg = { channels: { "openclaw-simplex": { enabled: true, - connection: { - wsHost: "base-host", - wsPort: 4111, - }, + displayName: "Base", + connectTimeoutMs: 4111, + dbFilePrefix: "/tmp/simplex-base", accounts: { alpha: { - connection: { - wsPort: 5225, - }, + connectTimeoutMs: 5225, + dbFilePrefix: "/tmp/simplex-alpha", }, }, }, @@ -77,10 +76,10 @@ describe("simplex accounts", () => { } as OpenClawConfig; const account = resolveSimplexAccount({ cfg, accountId: "alpha" }); - expect(account.mode).toBe("external"); - expect(account.wsHost).toBe("base-host"); - expect(account.wsPort).toBe(5225); - expect(account.wsUrl).toBe("ws://base-host:5225"); + expect(account.mode).toBe("node"); + expect(account.config.displayName).toBe("Base"); + expect(account.config.connectTimeoutMs).toBe(5225); + expect(account.dbFilePrefix).toBe("/tmp/simplex-alpha"); expect(account.enabled).toBe(true); }); @@ -112,34 +111,71 @@ describe("simplex accounts", () => { expect(resolveSimplexAccount({ cfg: cfg2, accountId: "alpha" }).enabled).toBe(false); }); - it("uses explicit wsUrl for external mode configuration", () => { + it("uses explicit dbFilePrefix for node runtime storage", () => { + const cfg = { + channels: { + "openclaw-simplex": { + dbFilePrefix: "~/.simplex/openclaw-bot", + }, + }, + } as OpenClawConfig; + + const account = resolveSimplexAccount({ cfg, accountId: "default" }); + expect(account.mode).toBe("node"); + expect(account.configured).toBe(true); + expect(account.dbFilePrefix).toBe("~/.simplex/openclaw-bot"); + }); + + it("uses the SimpleX CLI default database prefix for the default account", () => { + const cfg = { + channels: { + "openclaw-simplex": { + enabled: true, + }, + }, + } as OpenClawConfig; + + const account = resolveSimplexAccount({ cfg, accountId: "default" }); + expect(account.configured).toBe(true); + expect(account.dbFilePrefix).toBe(SIMPLEX_CLI_DEFAULT_DB_PREFIX); + }); + + it("does not derive database prefixes for named accounts", () => { const cfg = { channels: { "openclaw-simplex": { accounts: { - alpha: { - connection: { - wsHost: "127.0.0.1", - wsPort: 5225, - }, - }, - beta: { - connection: { - mode: "external", - wsUrl: "ws://example.test:9999", - }, + ops: { + displayName: "Ops", }, }, }, }, } as OpenClawConfig; - const alpha = resolveSimplexAccount({ cfg, accountId: "alpha" }); - expect(alpha.wsUrl).toBe("ws://127.0.0.1:5225"); - expect(alpha.configured).toBe(true); + const account = resolveSimplexAccount({ cfg, accountId: "ops" }); + expect(account.mode).toBe("node"); + expect(account.configured).toBe(false); + expect(account.dbFilePrefix).toBeUndefined(); + }); - const beta = resolveSimplexAccount({ cfg, accountId: "beta" }); - expect(beta.configured).toBe(true); + it("allows named accounts to inherit an explicit base database prefix", () => { + const cfg = { + channels: { + "openclaw-simplex": { + dbFilePrefix: "/tmp/simplex-shared", + accounts: { + ops: { + displayName: "Ops", + }, + }, + }, + }, + } as OpenClawConfig; + + const account = resolveSimplexAccount({ cfg, accountId: "ops" }); + expect(account.configured).toBe(true); + expect(account.dbFilePrefix).toBe("/tmp/simplex-shared"); }); it("treats missing channel config as unconfigured", () => { @@ -149,19 +185,37 @@ describe("simplex accounts", () => { expect(resolveSimplexAccount({ cfg, accountId: "default" }).configured).toBe(false); }); - it("treats explicit ws connection config as configured", () => { + it("treats the default account as configured when the channel section exists", () => { const cfg = { channels: { "openclaw-simplex": { - connection: { - wsHost: "127.0.0.1", - wsPort: 5225, - }, + displayName: "OpenClaw SimpleX", }, }, } as OpenClawConfig; expect(hasMeaningfulSimplexConfig({ cfg })).toBe(true); expect(resolveSimplexAccount({ cfg, accountId: "default" }).configured).toBe(true); + expect(resolveSimplexAccount({ cfg, accountId: "default" }).dbFilePrefix).toBe( + SIMPLEX_CLI_DEFAULT_DB_PREFIX + ); + }); + + it("still reads legacy nested connection config before migration", () => { + const cfg = { + channels: { + "openclaw-simplex": { + connection: { + dbFilePrefix: "/tmp/legacy-simplex", + displayName: "Legacy", + }, + }, + }, + } as OpenClawConfig; + + const account = resolveSimplexAccount({ cfg, accountId: "default" }); + expect(account.configured).toBe(true); + expect(account.dbFilePrefix).toBe("/tmp/legacy-simplex"); + expect(account.config.displayName).toBe("Legacy"); }); }); diff --git a/src/config/accounts.ts b/src/config/accounts.ts index cc94bb9..6a041fa 100644 --- a/src/config/accounts.ts +++ b/src/config/accounts.ts @@ -1,23 +1,32 @@ import { DEFAULT_ACCOUNT_ID, normalizeAccountId } from "openclaw/plugin-sdk/account-id"; import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; import { SIMPLEX_CHANNEL_ID } from "../constants.js"; +import { resolveSimplexCliDefaultDbPrefix } from "../simplex/runtime/db-path.js"; +import type { ResolvedSimplexAccount, SimplexConnectionConfig } from "../types/config.js"; import type { SimplexAccountConfig, SimplexChannelConfig } from "./config-schema.js"; -import type { - ResolvedSimplexAccount, - SimplexConnectionConfig, - SimplexConnectionMode, -} from "./types.js"; -const DEFAULT_WS_HOST = "127.0.0.1"; -const DEFAULT_WS_PORT = 5225; +export const SIMPLEX_CLI_DEFAULT_DB_PREFIX = resolveSimplexCliDefaultDbPrefix(); -function hasMeaningfulConnectionConfig(connection: SimplexConnectionConfig | undefined): boolean { - if (!connection) { - return false; +type LegacySimplexAccountConfig = SimplexAccountConfig & { + connection?: SimplexConnectionConfig; +}; + +function flattenRuntimeConfig(config: LegacySimplexAccountConfig): SimplexAccountConfig { + const { connection, ...rest } = config; + const flattened: SimplexAccountConfig = { ...rest }; + for (const [key, value] of Object.entries({ + dbFilePrefix: rest.dbFilePrefix ?? connection?.dbFilePrefix, + displayName: rest.displayName ?? connection?.displayName, + fullName: rest.fullName ?? connection?.fullName, + migrationConfirmation: rest.migrationConfirmation ?? connection?.migrationConfirmation, + autoAcceptFiles: rest.autoAcceptFiles ?? connection?.autoAcceptFiles, + connectTimeoutMs: rest.connectTimeoutMs ?? connection?.connectTimeoutMs, + }) as Array<[keyof SimplexAccountConfig, unknown]>) { + if (value !== undefined) { + flattened[key] = value as never; + } } - return Boolean( - connection.wsUrl?.trim() || connection.wsHost?.trim() || connection.wsPort !== undefined - ); + return flattened; } function resolveRawSimplexAccountConfig( @@ -26,10 +35,12 @@ function resolveRawSimplexAccountConfig( ): SimplexAccountConfig { if (accountId === DEFAULT_ACCOUNT_ID) { const { accounts: _ignored, ...base } = (cfg.channels?.[SIMPLEX_CHANNEL_ID] ?? - {}) as SimplexChannelConfig; - return base; + {}) as LegacySimplexAccountConfig & SimplexChannelConfig; + return flattenRuntimeConfig(base); } - return (cfg.channels?.[SIMPLEX_CHANNEL_ID]?.accounts?.[accountId] ?? {}) as SimplexAccountConfig; + return flattenRuntimeConfig( + (cfg.channels?.[SIMPLEX_CHANNEL_ID]?.accounts?.[accountId] ?? {}) as LegacySimplexAccountConfig + ); } function listConfiguredAccountIds(cfg: OpenClawConfig): string[] { @@ -60,48 +71,42 @@ export function hasMeaningfulSimplexConfig(params: { cfg: OpenClawConfig; accountId?: string | null; }): boolean { + if (!params.cfg.channels || !(SIMPLEX_CHANNEL_ID in params.cfg.channels)) { + return false; + } const accountId = normalizeAccountId(params.accountId); const raw = resolveRawSimplexAccountConfig(params.cfg, accountId); - return hasMeaningfulConnectionConfig(raw.connection); -} - -function mergeConnection( - base: SimplexConnectionConfig = {}, - account: SimplexConnectionConfig = {} -): SimplexConnectionConfig { - return { - ...base, - ...account, - }; + if (raw.dbFilePrefix?.trim()) { + return true; + } + if (accountId === DEFAULT_ACCOUNT_ID) { + return true; + } + return Boolean( + resolveRawSimplexAccountConfig(params.cfg, DEFAULT_ACCOUNT_ID).dbFilePrefix?.trim() + ); } function mergeSimplexAccountConfig(cfg: OpenClawConfig, accountId: string): SimplexAccountConfig { const { accounts: _ignored, ...base } = (cfg.channels?.[SIMPLEX_CHANNEL_ID] ?? - {}) as SimplexChannelConfig; + {}) as LegacySimplexAccountConfig & SimplexChannelConfig; const account = (cfg.channels?.[SIMPLEX_CHANNEL_ID]?.accounts?.[accountId] ?? - {}) as SimplexAccountConfig; + {}) as LegacySimplexAccountConfig; return { - ...base, - ...account, - connection: mergeConnection(base.connection, account.connection), + ...flattenRuntimeConfig(base), + ...flattenRuntimeConfig(account), }; } -function resolveWsHost(connection: SimplexConnectionConfig): string { - return connection.wsHost?.trim() || DEFAULT_WS_HOST; -} - -function resolveWsPort(connection: SimplexConnectionConfig): number { - return connection.wsPort ?? DEFAULT_WS_PORT; -} - -function resolveWsUrl(connection: SimplexConnectionConfig): string { - if (connection.wsUrl?.trim()) { - return connection.wsUrl.trim(); +function resolveNodeDbFilePrefix( + config: SimplexAccountConfig, + accountId: string +): string | undefined { + const configured = config.dbFilePrefix?.trim(); + if (configured) { + return configured; } - const host = resolveWsHost(connection); - const port = resolveWsPort(connection); - return `ws://${host}:${port}`; + return accountId === DEFAULT_ACCOUNT_ID ? SIMPLEX_CLI_DEFAULT_DB_PREFIX : undefined; } export function resolveSimplexAccount(params: { @@ -113,21 +118,14 @@ export function resolveSimplexAccount(params: { const hasMeaningfulConfig = hasMeaningfulSimplexConfig({ cfg: params.cfg, accountId }); const baseEnabled = params.cfg.channels?.[SIMPLEX_CHANNEL_ID]?.enabled !== false; const enabled = baseEnabled && merged.enabled !== false; - const connection = merged.connection ?? {}; - const mode: SimplexConnectionMode = "external"; - const wsUrl = resolveWsUrl(connection); - const wsHost = resolveWsHost(connection); - const wsPort = resolveWsPort(connection); const configured = hasMeaningfulConfig; return { accountId, enabled, name: merged.name?.trim() || undefined, configured, - mode, - wsUrl, - wsHost, - wsPort, + mode: "node", + dbFilePrefix: resolveNodeDbFilePrefix(merged, accountId), config: merged, }; } diff --git a/src/config/config-schema.test.ts b/src/config/config-schema.test.ts index 25b73e1..66a605c 100644 --- a/src/config/config-schema.test.ts +++ b/src/config/config-schema.test.ts @@ -6,6 +6,11 @@ import { simplexChannelConfigUiHints } from "./config-ui-hints.js"; const manifest = JSON.parse( readFileSync(new URL("../../openclaw.plugin.json", import.meta.url), "utf8") ) as { + activation?: { + onStartup?: unknown; + onChannels?: unknown; + onCapabilities?: unknown; + }; commandAliases?: unknown; contracts?: { tools?: unknown; @@ -66,13 +71,13 @@ describe("simplex config schema manifest", () => { expect(channelManifest?.description).toBe(packageJson.openclaw?.channel?.blurb); }); - it("advertises the 2026.4.23 channel selection metadata", () => { - expect(packageJson.openclaw?.install?.minHostVersion).toBe(">=2026.4.23"); + it("advertises the 2026.4.29 channel selection metadata", () => { + expect(packageJson.openclaw?.install?.minHostVersion).toBe(">=2026.4.29"); expect(packageJson.openclaw?.channel).toMatchObject({ detailLabel: "SimpleX Chat", aliases: ["simplex"], systemImage: "link.badge.plus", - selectionExtras: ["Invite-based reachability", "External WebSocket runtime"], + selectionExtras: ["Invite-based reachability", "Official Node runtime"], markdownCapable: true, exposure: { configured: true, @@ -106,6 +111,14 @@ describe("simplex config schema manifest", () => { expect(manifest.commandAliases).toEqual(expect.arrayContaining(["simplex"])); }); + it("opts out of deprecated implicit startup loading", () => { + expect(manifest.activation).toMatchObject({ + onStartup: false, + onChannels: ["openclaw-simplex"], + onCapabilities: ["channel", "tool"], + }); + }); + it("does not advertise a setup entry that would suppress plugin CLI loading", () => { expect(packageJson.openclaw?.setupEntry).toBeUndefined(); }); diff --git a/src/config/config-schema.ts b/src/config/config-schema.ts index 35127c2..695f76a 100644 --- a/src/config/config-schema.ts +++ b/src/config/config-schema.ts @@ -28,21 +28,16 @@ const SimplexActionConfigSchema = z const SimplexReactionLevelSchema = z.enum(["off", "ack", "minimal", "extensive"]).optional(); -const SimplexConnectionSchema = z - .object({ - mode: z.literal("external").optional(), - wsUrl: z.string().url().optional(), - wsHost: z.string().optional(), - wsPort: z.number().int().positive().optional(), - autoAcceptFiles: z.boolean().optional(), - connectTimeoutMs: z.number().int().positive().optional(), - }) - .strict(); - export const SimplexAccountConfigSchema = z .object({ name: z.string().optional(), enabled: z.boolean().optional(), + dbFilePrefix: z.string().optional(), + displayName: z.string().optional(), + fullName: z.string().optional(), + migrationConfirmation: z.enum(["yesUp", "yesUpDown", "console", "error"]).optional(), + autoAcceptFiles: z.boolean().optional(), + connectTimeoutMs: z.number().int().positive().optional(), markdown: MarkdownConfigSchema, mediaMaxMb: z.number().int().positive().optional(), actions: SimplexActionConfigSchema.optional(), @@ -56,7 +51,6 @@ export const SimplexAccountConfigSchema = z groupPolicy: GroupPolicySchema.optional(), groupAllowFrom: SimplexAllowFromListSchema, groups: z.object({}).catchall(groupConfigSchema).optional(), - connection: SimplexConnectionSchema.optional(), }) .strict(); diff --git a/src/config/config-ui-hints.ts b/src/config/config-ui-hints.ts index d43919a..512507d 100644 --- a/src/config/config-ui-hints.ts +++ b/src/config/config-ui-hints.ts @@ -20,6 +20,40 @@ const accountScopedUiHints = withAccountScope({ label: "Enabled", help: "Disable an account without deleting its SimpleX configuration.", }, + dbFilePrefix: { + label: "SimpleX DB File Prefix", + help: "SQLite database file prefix for the SimpleX Node runtime. Defaults to the SimpleX terminal CLI prefix: ~/.simplex/simplex_v1 on Linux/macOS or %APPDATA%/simplex/simplex_v1 on Windows.", + placeholder: "~/.simplex/simplex_v1", + tags: ["runtime", "storage"], + }, + displayName: { + label: "SimpleX Profile Name", + help: "Display name used when the Node runtime creates a SimpleX profile for this database.", + advanced: true, + }, + fullName: { + label: "SimpleX Full Name", + help: "Full name used when the Node runtime creates a SimpleX profile for this database.", + advanced: true, + }, + migrationConfirmation: { + label: "DB Migration Mode", + help: "SimpleX database migration confirmation mode for the Node runtime.", + advanced: true, + tags: ["runtime", "storage"], + }, + autoAcceptFiles: { + label: "Auto Accept Files", + help: "Automatically accept incoming file transfers from the SimpleX runtime.", + advanced: true, + tags: ["media"], + }, + connectTimeoutMs: { + label: "Connect Timeout (ms)", + help: "Runtime connection/start timeout in milliseconds.", + advanced: true, + tags: ["transport"], + }, mediaMaxMb: { label: "Max Media Size (MB)", help: "Optional media size cap for files sent through this SimpleX account.", @@ -114,53 +148,12 @@ const accountScopedUiHints = withAccountScope({ help: "Optional per-group tool policy override for this SimpleX group.", advanced: true, }, - connection: { - label: "Connection", - help: "Transport settings for the external simplex-chat WebSocket runtime.", - }, - "connection.mode": { - label: "Connection Mode", - help: "SimpleX currently supports only the external runtime mode in this plugin.", - advanced: true, - }, - "connection.wsUrl": { - label: "WebSocket URL", - help: "WebSocket URL for the running simplex-chat API, for example ws://127.0.0.1:5225.", - placeholder: "ws://127.0.0.1:5225", - tags: ["transport"], - }, - "connection.wsHost": { - label: "WebSocket Host", - help: "Host override used when wsUrl is not set explicitly.", - placeholder: "127.0.0.1", - advanced: true, - tags: ["transport"], - }, - "connection.wsPort": { - label: "WebSocket Port", - help: "Port override used when wsUrl is not set explicitly.", - placeholder: "5225", - advanced: true, - tags: ["transport"], - }, - "connection.autoAcceptFiles": { - label: "Auto Accept Files", - help: "Automatically accept incoming file transfers from the SimpleX runtime.", - advanced: true, - tags: ["media"], - }, - "connection.connectTimeoutMs": { - label: "Connect Timeout (ms)", - help: "WebSocket connection timeout in milliseconds.", - advanced: true, - tags: ["transport"], - }, }); export const simplexChannelConfigUiHints = { "": { label: "SimpleX", - help: "Connect OpenClaw to a separately running simplex-chat WebSocket runtime. Reachability starts from SimpleX invite or address links, while OpenClaw still applies pairing, allowlists, and group policy.", + help: "Connect OpenClaw to SimpleX through the official Node runtime. Reachability starts from SimpleX invite or address links, while OpenClaw still applies pairing, allowlists, and group policy.", }, defaultAccount: { label: "Default Account", diff --git a/src/config/types.ts b/src/config/types.ts deleted file mode 100644 index 91194e1..0000000 --- a/src/config/types.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { SimplexAccountConfig } from "./config-schema.js"; - -export type SimplexConnectionMode = "external"; - -export type SimplexConnectionConfig = { - mode?: SimplexConnectionMode; - wsUrl?: string; - wsHost?: string; - wsPort?: number; - autoAcceptFiles?: boolean; - connectTimeoutMs?: number; -}; - -export type ResolvedSimplexAccount = { - accountId: string; - enabled: boolean; - name?: string; - configured: boolean; - mode: SimplexConnectionMode; - wsUrl: string; - wsHost: string; - wsPort: number; - config: SimplexAccountConfig; -}; diff --git a/src/constants.ts b/src/constants.ts index f3c1bb7..bdce6d9 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -15,8 +15,3 @@ export function stripSimplexProviderPrefix(value: string): string { } return trimmed; } - -export function hasSimplexProviderPrefix(value: string): boolean { - const lower = value.trim().toLowerCase(); - return SIMPLEX_PROVIDER_PREFIXES.some((prefix) => lower.startsWith(`${prefix}:`)); -} diff --git a/src/gateway/methods.ts b/src/gateway/methods.ts index 855f853..cd82295 100644 --- a/src/gateway/methods.ts +++ b/src/gateway/methods.ts @@ -1,26 +1,34 @@ +import { renderQrPngDataUrl } from "openclaw/plugin-sdk/media-runtime"; import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; -import { toDataURL as toQrDataUrl } from "qrcode"; -import { resolveDefaultSimplexAccountId } from "../config/accounts.js"; -import { SIMPLEX_CHANNEL_ID } from "../constants.js"; -import { resolveInviteMode } from "../simplex/simplex-invite.js"; +import { + connectSimplexLink, + planSimplexConnectionLink, +} from "../simplex/services/connect-links.js"; +import { + acceptSimplexContactRequest, + listSimplexContactRequests, + rejectSimplexContactRequest, +} from "../simplex/services/contact-requests.js"; +import { + createSimplexGroup, + createSimplexGroupLink, + listSimplexGroupLink, + revokeSimplexGroupLink, +} from "../simplex/services/groups.js"; import { createSimplexInvite, listSimplexInvites, + resolveInviteMode, revokeSimplexInvite, -} from "../simplex/simplex-invite-service.js"; +} from "../simplex/services/invites.js"; +import { + doctorSimplexRuntime, + getSimplexRuntimeStatus, +} from "../simplex/services/runtime-status.js"; const INVALID_REQUEST = "INVALID_REQUEST"; const UNAVAILABLE = "UNAVAILABLE"; -type RuntimeChannelState = { - running?: boolean; -}; - -type RuntimeSnapshot = { - channelAccounts?: Record | undefined>; - channels?: Record; -}; - type GatewayError = { code: string; message: string; @@ -31,7 +39,7 @@ function createError(code: string, message: string): GatewayError { } async function renderQrDataUrl(value: string): Promise { - return await toQrDataUrl(value, { errorCorrectionLevel: "M", margin: 1, scale: 8 }); + return await renderQrPngDataUrl(value, { marginModules: 1, scale: 8 }); } function readAccountId(params: Record | undefined): string | null { @@ -39,21 +47,31 @@ function readAccountId(params: Record | undefined): string | nu return rawAccountId || null; } -function createRuntimeChecker( - context: { getRuntimeSnapshot: () => RuntimeSnapshot }, - accountId: string -): () => boolean { - return () => { - const runtime = context.getRuntimeSnapshot(); - const accountRuntime = runtime.channelAccounts?.[SIMPLEX_CHANNEL_ID]?.[accountId]; - return Boolean(accountRuntime?.running ?? runtime.channels?.[SIMPLEX_CHANNEL_ID]?.running); - }; +function readRequiredString(params: Record | undefined, key: string): string { + const value = typeof params?.[key] === "string" ? params[key].trim() : ""; + if (!value) { + throw new Error(`${key} is required`); + } + return value; +} + +function readRequiredInteger(params: Record | undefined, key: string): number { + const raw = params?.[key]; + const value = typeof raw === "number" ? raw : Number(String(raw ?? "").trim()); + if (!Number.isInteger(value) || value <= 0) { + throw new Error(`${key} must be a positive integer`); + } + return value; +} + +function unavailable(prefix: string, err: unknown): GatewayError { + return createError(UNAVAILABLE, `${prefix}: ${err instanceof Error ? err.message : String(err)}`); } export function registerSimplexGatewayMethods(api: OpenClawPluginApi): void { api.registerGatewayMethod( "simplex.invite.create", - async ({ params, respond, context }) => { + async ({ params, respond }) => { const mode = resolveInviteMode(params?.mode); if (!mode) { respond( @@ -71,23 +89,11 @@ export function registerSimplexGatewayMethods(api: OpenClawPluginApi): void { accountId, mode, logger: api.logger, - startChannel: () => context.startChannel(SIMPLEX_CHANNEL_ID, accountId ?? undefined), - isRunning: createRuntimeChecker( - context, - accountId ?? resolveDefaultSimplexAccountId(api.config) - ), }); const qrDataUrl = result.link ? await renderQrDataUrl(result.link) : null; respond(true, { ...result, qrDataUrl }); } catch (err) { - respond( - false, - undefined, - createError( - UNAVAILABLE, - `SimpleX invite failed: ${err instanceof Error ? err.message : String(err)}` - ) - ); + respond(false, undefined, unavailable("SimpleX invite failed", err)); } }, { scope: "operator.write" } @@ -95,18 +101,13 @@ export function registerSimplexGatewayMethods(api: OpenClawPluginApi): void { api.registerGatewayMethod( "simplex.invite.list", - async ({ params, respond, context }) => { + async ({ params, respond }) => { const accountId = readAccountId(params); try { const result = await listSimplexInvites({ cfg: api.config, accountId, logger: api.logger, - startChannel: () => context.startChannel(SIMPLEX_CHANNEL_ID, accountId ?? undefined), - isRunning: createRuntimeChecker( - context, - accountId ?? resolveDefaultSimplexAccountId(api.config) - ), }); const addressQrDataUrl = result.addressLink ? await renderQrDataUrl(result.addressLink) @@ -116,14 +117,7 @@ export function registerSimplexGatewayMethods(api: OpenClawPluginApi): void { addressQrDataUrl, }); } catch (err) { - respond( - false, - undefined, - createError( - UNAVAILABLE, - `SimpleX invite list failed: ${err instanceof Error ? err.message : String(err)}` - ) - ); + respond(false, undefined, unavailable("SimpleX invite list failed", err)); } }, { scope: "operator.read" } @@ -131,29 +125,219 @@ export function registerSimplexGatewayMethods(api: OpenClawPluginApi): void { api.registerGatewayMethod( "simplex.invite.revoke", - async ({ params, respond, context }) => { + async ({ params, respond }) => { const accountId = readAccountId(params); try { const result = await revokeSimplexInvite({ cfg: api.config, accountId, logger: api.logger, - startChannel: () => context.startChannel(SIMPLEX_CHANNEL_ID, accountId ?? undefined), - isRunning: createRuntimeChecker( - context, - accountId ?? resolveDefaultSimplexAccountId(api.config) - ), }); respond(true, result); } catch (err) { + respond(false, undefined, unavailable("SimpleX invite revoke failed", err)); + } + }, + { scope: "operator.admin" } + ); + + api.registerGatewayMethod( + "simplex.runtime.status", + async ({ params, respond }) => { + try { respond( - false, - undefined, - createError( - UNAVAILABLE, - `SimpleX invite revoke failed: ${err instanceof Error ? err.message : String(err)}` - ) + true, + await getSimplexRuntimeStatus({ cfg: api.config, accountId: readAccountId(params) }) + ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX runtime status failed", err)); + } + }, + { scope: "operator.read" } + ); + + api.registerGatewayMethod( + "simplex.runtime.doctor", + async ({ params, respond }) => { + try { + respond( + true, + await doctorSimplexRuntime({ cfg: api.config, accountId: readAccountId(params) }) + ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX runtime doctor failed", err)); + } + }, + { scope: "operator.read" } + ); + + api.registerGatewayMethod( + "simplex.requests.list", + async ({ params, respond }) => { + try { + respond( + true, + await listSimplexContactRequests({ cfg: api.config, accountId: readAccountId(params) }) + ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX request list failed", err)); + } + }, + { scope: "operator.read" } + ); + + api.registerGatewayMethod( + "simplex.requests.accept", + async ({ params, respond }) => { + try { + respond( + true, + await acceptSimplexContactRequest({ + cfg: api.config, + accountId: readAccountId(params), + contactRequestId: readRequiredInteger(params, "contactRequestId"), + }) + ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX request accept failed", err)); + } + }, + { scope: "operator.admin" } + ); + + api.registerGatewayMethod( + "simplex.requests.reject", + async ({ params, respond }) => { + try { + respond( + true, + await rejectSimplexContactRequest({ + cfg: api.config, + accountId: readAccountId(params), + contactRequestId: readRequiredInteger(params, "contactRequestId"), + }) + ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX request reject failed", err)); + } + }, + { scope: "operator.admin" } + ); + + api.registerGatewayMethod( + "simplex.groups.create", + async ({ params, respond }) => { + try { + respond( + true, + await createSimplexGroup({ + cfg: api.config, + accountId: readAccountId(params), + displayName: readRequiredString(params, "displayName"), + fullName: typeof params?.fullName === "string" ? params.fullName : undefined, + description: typeof params?.description === "string" ? params.description : undefined, + }) + ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX group create failed", err)); + } + }, + { scope: "operator.admin" } + ); + + api.registerGatewayMethod( + "simplex.groups.link.create", + async ({ params, respond }) => { + try { + const result = await createSimplexGroupLink({ + cfg: api.config, + accountId: readAccountId(params), + groupId: params?.groupId, + role: params?.role, + }); + respond(true, { + ...result, + qrDataUrl: result.link ? await renderQrDataUrl(result.link) : null, + }); + } catch (err) { + respond(false, undefined, unavailable("SimpleX group link create failed", err)); + } + }, + { scope: "operator.admin" } + ); + + api.registerGatewayMethod( + "simplex.groups.link.list", + async ({ params, respond }) => { + try { + const result = await listSimplexGroupLink({ + cfg: api.config, + accountId: readAccountId(params), + groupId: params?.groupId, + }); + respond(true, { + ...result, + qrDataUrl: result.link ? await renderQrDataUrl(result.link) : null, + }); + } catch (err) { + respond(false, undefined, unavailable("SimpleX group link list failed", err)); + } + }, + { scope: "operator.read" } + ); + + api.registerGatewayMethod( + "simplex.groups.link.revoke", + async ({ params, respond }) => { + try { + respond( + true, + await revokeSimplexGroupLink({ + cfg: api.config, + accountId: readAccountId(params), + groupId: params?.groupId, + }) + ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX group link revoke failed", err)); + } + }, + { scope: "operator.admin" } + ); + + api.registerGatewayMethod( + "simplex.connect.plan", + async ({ params, respond }) => { + try { + respond( + true, + await planSimplexConnectionLink({ + cfg: api.config, + accountId: readAccountId(params), + link: readRequiredString(params, "link"), + }) ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX connect plan failed", err)); + } + }, + { scope: "operator.read" } + ); + + api.registerGatewayMethod( + "simplex.connect", + async ({ params, respond }) => { + try { + respond( + true, + await connectSimplexLink({ + cfg: api.config, + accountId: readAccountId(params), + link: readRequiredString(params, "link"), + }) + ); + } catch (err) { + respond(false, undefined, unavailable("SimpleX connect failed", err)); } }, { scope: "operator.admin" } diff --git a/src/simplex/runtime/account.ts b/src/simplex/runtime/account.ts new file mode 100644 index 0000000..847ad03 --- /dev/null +++ b/src/simplex/runtime/account.ts @@ -0,0 +1,52 @@ +import { createRequire } from "node:module"; +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { resolveDefaultSimplexAccountId, resolveSimplexAccount } from "../../config/accounts.js"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { SimplexChatApi, SimplexLogger } from "../../types/simplex.js"; +import { withSimplexApi } from "../runtime/transport.js"; + +const require = createRequire(import.meta.url); + +export function resolveRuntimeAccount( + cfg: OpenClawConfig, + rawAccountId?: string | null +): ResolvedSimplexAccount { + const explicit = rawAccountId?.trim(); + const accountId = explicit || resolveDefaultSimplexAccountId(cfg); + const account = resolveSimplexAccount({ cfg, accountId }); + if (!account.enabled) { + throw new Error(`SimpleX account "${accountId}" is disabled`); + } + if (!account.configured) { + throw new Error(`SimpleX account "${accountId}" is not configured`); + } + return account; +} + +export async function withActiveSimplexUser(params: { + account: ResolvedSimplexAccount; + logger?: SimplexLogger; + run: (userId: number, api: SimplexChatApi) => Promise; +}): Promise { + return await withSimplexApi({ + account: params.account, + logger: params.logger, + run: async (api) => { + const user = await api.apiGetActiveUser(); + const userId = user?.userId; + if (typeof userId !== "number") { + throw new Error(`SimpleX account "${params.account.accountId}" has no active user`); + } + return await params.run(userId, api); + }, + }); +} + +export function readSimplexPackageVersion(): string | null { + try { + const pkg = require("simplex-chat/package.json") as { version?: unknown }; + return typeof pkg.version === "string" ? pkg.version : null; + } catch { + return null; + } +} diff --git a/src/simplex/runtime/api.ts b/src/simplex/runtime/api.ts new file mode 100644 index 0000000..051ad1d --- /dev/null +++ b/src/simplex/runtime/api.ts @@ -0,0 +1,78 @@ +import { stripSimplexProviderPrefix } from "../../constants.js"; +import type { + SimplexApiChatRef, + SimplexApiChatType, + SimplexApiNumericChatRef, + SimplexChatRef, +} from "../../types/simplex.js"; + +export function formatSimplexChatRef(ref: SimplexChatRef): string { + if (ref.type === "local") { + throw new Error("local SimpleX chat refs are not supported"); + } + if (ref.scope) { + throw new Error("scoped SimpleX chat refs are not supported"); + } + const prefix = ref.type === "direct" ? "@" : "#"; + return `${prefix}${ref.id}`; +} + +export function parseSimplexApiChatRef(value: string): SimplexApiNumericChatRef | null { + const raw = stripSimplexProviderPrefix(value.trim()); + if (!raw) { + return null; + } + const lowered = raw.toLowerCase(); + if (raw.startsWith("#") || lowered.startsWith("group:")) { + const id = Number.parseInt(raw.startsWith("#") ? raw.slice(1) : raw.slice("group:".length), 10); + return Number.isFinite(id) ? ["group", id] : null; + } + if ( + raw.startsWith("@") || + lowered.startsWith("contact:") || + lowered.startsWith("user:") || + lowered.startsWith("member:") + ) { + const body = raw.startsWith("@") ? raw.slice(1) : raw.slice(raw.indexOf(":") + 1); + const id = Number.parseInt(body, 10); + return Number.isFinite(id) ? ["direct", id] : null; + } + const id = Number.parseInt(raw, 10); + return Number.isFinite(id) ? ["direct", id] : null; +} + +export function toSimplexApiChatRef(ref: SimplexApiNumericChatRef): SimplexApiChatRef { + return ref as unknown as SimplexApiChatRef; +} + +export function toSimplexApiChatType(ref: SimplexApiNumericChatRef): SimplexApiChatType { + return ref[0] as unknown as SimplexApiChatType; +} + +export function parseSimplexNumericId(value: number | string): number | null { + if (typeof value === "number") { + return Number.isFinite(value) ? Math.trunc(value) : null; + } + const raw = stripSimplexProviderPrefix(value.trim()); + const normalized = raw.startsWith("@") + ? raw.slice(1) + : raw.startsWith("#") + ? raw.slice(1) + : raw.includes(":") + ? raw.slice(raw.indexOf(":") + 1) + : raw; + const id = Number.parseInt(normalized, 10); + return Number.isFinite(id) ? id : null; +} + +export function resolveSimplexChatItemId(chatItem: unknown): string | undefined { + const item = chatItem as { chatItem?: { meta?: { itemId?: unknown } } } | undefined; + const raw = item?.chatItem?.meta?.itemId; + if (typeof raw === "number" && Number.isFinite(raw)) { + return String(raw); + } + if (typeof raw === "string" && raw.trim()) { + return raw.trim(); + } + return undefined; +} diff --git a/src/simplex/runtime/client.ts b/src/simplex/runtime/client.ts new file mode 100644 index 0000000..85f1e96 --- /dev/null +++ b/src/simplex/runtime/client.ts @@ -0,0 +1,198 @@ +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { + SimplexChatApi, + SimplexChatEvent, + SimplexLogger, + SimplexMigrationConfirmation, + SimplexMigrationConfirmationSetting, +} from "../../types/simplex.js"; +import { resolveSimplexDbFilePrefix } from "./db-path.js"; + +type SimplexConnectionState = { + connected: boolean; + at: number; + expected?: boolean; + error?: string | null; +}; + +type SimplexClientParams = { + account: ResolvedSimplexAccount; + logger?: SimplexLogger; +}; + +export class SimplexClient { + private readonly account: ResolvedSimplexAccount; + private readonly logger: SimplexClientParams["logger"]; + private chat: SimplexChatApi | null = null; + private connectPromise: Promise | null = null; + private eventReceiver: ((event: SimplexChatEvent) => void) | null = null; + private readonly eventHandlers = new Set<(event: SimplexChatEvent) => void>(); + private readonly connectionHandlers = new Set<(state: SimplexConnectionState) => void>(); + private lastConnectionState: SimplexConnectionState = { + connected: false, + at: Date.now(), + expected: true, + error: null, + }; + private closing = false; + + constructor(params: SimplexClientParams) { + this.account = params.account; + this.logger = params.logger; + } + + onEvent(handler: (event: SimplexChatEvent) => void): () => void { + this.eventHandlers.add(handler); + return () => { + this.eventHandlers.delete(handler); + }; + } + + onConnectionState(handler: (state: SimplexConnectionState) => void): () => void { + this.connectionHandlers.add(handler); + return () => { + this.connectionHandlers.delete(handler); + }; + } + + getConnectionState(): SimplexConnectionState { + return { ...this.lastConnectionState }; + } + + async connect(): Promise { + if (this.chat?.started) { + return; + } + if (this.connectPromise) { + await this.connectPromise; + return; + } + const inFlight = withTimeout( + this.connectInternal(), + this.account.config.connectTimeoutMs ?? 15_000, + `SimpleX Node runtime connect timed out for account "${this.account.accountId}"` + ).finally(() => { + if (this.connectPromise === inFlight) { + this.connectPromise = null; + } + }); + this.connectPromise = inFlight; + await inFlight; + } + + async close(): Promise { + this.closing = true; + const chat = this.chat; + if (chat && this.eventReceiver) { + chat.offAny(this.eventReceiver as never); + } + this.eventReceiver = null; + this.chat = null; + if (chat) { + await chat.stopChat().catch(() => undefined); + await chat.close().catch(() => undefined); + } + this.emitConnectionState({ connected: false, expected: true, at: Date.now(), error: null }); + this.closing = false; + } + + async withApi(fn: (api: SimplexChatApi) => Promise): Promise { + await this.connect(); + if (!this.chat) { + throw new Error("SimpleX Node runtime is not connected"); + } + return await fn(this.chat); + } + + private async connectInternal(): Promise { + const simplex = await import("simplex-chat"); + const confirm = resolveMigrationConfirmation(simplex.core.MigrationConfirmation, { + value: this.account.config.migrationConfirmation, + }); + if (!this.account.dbFilePrefix) { + throw new Error( + `SimpleX account "${this.account.accountId}" is missing dbFilePrefix; the official SimpleX Node API requires an explicit database file prefix` + ); + } + const chat = await simplex.api.ChatApi.init( + { type: "sqlite", filePrefix: resolveSimplexDbFilePrefix(this.account.dbFilePrefix) }, + confirm + ); + this.chat = chat; + this.eventReceiver = (event) => { + this.emitEvent(event as SimplexChatEvent); + }; + chat.onAny(this.eventReceiver as never); + await ensureActiveUser({ + chat, + displayName: this.account.config.displayName ?? this.account.name ?? "OpenClaw SimpleX", + fullName: this.account.config.fullName ?? "", + }); + await chat.startChat(); + this.logger?.info?.("SimpleX Node runtime started"); + this.emitConnectionState({ connected: true, at: Date.now(), error: null }); + } + + private emitEvent(event: SimplexChatEvent): void { + for (const handler of [...this.eventHandlers]) { + handler(event); + } + } + + private emitConnectionState(state: SimplexConnectionState): void { + if (!state.connected && this.closing) { + state.expected = true; + } + this.lastConnectionState = { ...state }; + for (const handler of [...this.connectionHandlers]) { + handler(state); + } + } +} + +function resolveMigrationConfirmation( + migrationConfirmation: SimplexMigrationConfirmation, + params: { value?: SimplexMigrationConfirmationSetting } +) { + switch (params.value) { + case "yesUpDown": + return migrationConfirmation.YesUpDown; + case "console": + return migrationConfirmation.Console; + case "error": + return migrationConfirmation.Error; + default: + return migrationConfirmation.YesUp; + } +} + +async function ensureActiveUser(params: { + chat: SimplexChatApi; + displayName: string; + fullName: string; +}): Promise { + const existing = await params.chat.apiGetActiveUser(); + if (existing) { + return; + } + await params.chat.apiCreateActiveUser({ + displayName: params.displayName, + fullName: params.fullName, + }); +} + +async function withTimeout(promise: Promise, timeoutMs: number, message: string): Promise { + let timeout: ReturnType | undefined; + try { + return await Promise.race([ + promise, + new Promise((_, reject) => { + timeout = setTimeout(() => reject(new Error(message)), timeoutMs); + }), + ]); + } finally { + if (timeout) { + clearTimeout(timeout); + } + } +} diff --git a/src/simplex/runtime/db-path.test.ts b/src/simplex/runtime/db-path.test.ts new file mode 100644 index 0000000..b2a7c18 --- /dev/null +++ b/src/simplex/runtime/db-path.test.ts @@ -0,0 +1,25 @@ +import path from "node:path"; +import { describe, expect, it } from "vitest"; +import { resolveSimplexCliDefaultDbPrefix, resolveSimplexDbFilePrefix } from "./db-path.js"; + +describe("simplex database path helpers", () => { + it("uses the SimpleX CLI default on unix platforms", () => { + expect(resolveSimplexCliDefaultDbPrefix({ platform: "linux" })).toBe("~/.simplex/simplex_v1"); + expect(resolveSimplexCliDefaultDbPrefix({ platform: "darwin" })).toBe("~/.simplex/simplex_v1"); + }); + + it("uses AppData for the SimpleX CLI default on Windows", () => { + expect( + resolveSimplexCliDefaultDbPrefix({ + platform: "win32", + env: { APPDATA: "C:\\Users\\alice\\AppData\\Roaming" }, + }) + ).toBe(path.join("C:\\Users\\alice\\AppData\\Roaming", "simplex", "simplex_v1")); + }); + + it("expands home-relative db prefixes", () => { + expect(resolveSimplexDbFilePrefix("~/.simplex/simplex_v1")).toContain( + path.join(".simplex", "simplex_v1") + ); + }); +}); diff --git a/src/simplex/runtime/db-path.ts b/src/simplex/runtime/db-path.ts new file mode 100644 index 0000000..615da54 --- /dev/null +++ b/src/simplex/runtime/db-path.ts @@ -0,0 +1,45 @@ +import os from "node:os"; +import path from "node:path"; + +type SimplexDbPathPlatform = NodeJS.Platform; + +export function resolveSimplexCliDefaultDbPrefix( + params: { platform?: SimplexDbPathPlatform; env?: NodeJS.ProcessEnv } = {} +): string { + const platform = params.platform ?? process.platform; + const env = params.env ?? process.env; + if (platform === "win32") { + return path.join(resolveWindowsAppData(env), "simplex", "simplex_v1"); + } + return "~/.simplex/simplex_v1"; +} + +export function resolveSimplexDbFilePrefix(value: string): string { + const expanded = expandHome(value); + if (process.platform === "win32") { + return path.resolve(expandWindowsEnvPrefix(expanded, process.env)); + } + return path.resolve(expanded); +} + +function resolveWindowsAppData(env: NodeJS.ProcessEnv): string { + return env.APPDATA ?? path.join(os.homedir(), "AppData", "Roaming"); +} + +function expandHome(value: string): string { + if (value === "~") { + return os.homedir(); + } + if (value.startsWith("~/") || value.startsWith("~\\")) { + return path.join(os.homedir(), value.slice(2)); + } + return value; +} + +function expandWindowsEnvPrefix(value: string, env: NodeJS.ProcessEnv): string { + return value.replace(/^%([^%]+)%[/\\]?/, (_match, rawName: string) => { + const name = rawName.toUpperCase(); + const resolved = env[name] ?? env[rawName]; + return resolved ? `${resolved}${path.sep}` : ""; + }); +} diff --git a/src/simplex/runtime/transport.test.ts b/src/simplex/runtime/transport.test.ts new file mode 100644 index 0000000..921cd98 --- /dev/null +++ b/src/simplex/runtime/transport.test.ts @@ -0,0 +1,120 @@ +import { afterEach, describe, expect, it, vi } from "vitest"; +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { SimplexChatApi } from "../../types/simplex.js"; + +const clientMock = vi.hoisted(() => ({ + constructed: 0, + reset() { + this.constructed = 0; + }, +})); + +vi.mock("./client.js", () => ({ + SimplexClient: class { + constructor() { + clientMock.constructed += 1; + } + async connect() {} + async close() {} + async withApi(fn: (api: SimplexChatApi) => Promise) { + return await fn({ source: "constructed" } as unknown as SimplexChatApi); + } + }, +})); + +import type { SimplexClient } from "./client.js"; +import { + getActiveSimplexClient, + registerActiveSimplexClient, + unregisterActiveSimplexClient, + withSimplexApi, +} from "./transport.js"; + +const registeredAccounts: Array<{ account: ResolvedSimplexAccount; client: SimplexClient }> = []; + +function account(accountId = "default"): ResolvedSimplexAccount { + const dbFilePrefix = `/tmp/openclaw-simplex-${accountId}`; + return accountWithDb(accountId, dbFilePrefix); +} + +function accountWithDb(accountId: string, dbFilePrefix: string): ResolvedSimplexAccount { + return { + accountId, + name: accountId, + enabled: true, + configured: true, + mode: "node", + dbFilePrefix, + config: { + dbFilePrefix, + }, + }; +} + +function activeClient(source: string): SimplexClient { + return { + async connect() {}, + async close() {}, + async withApi(fn: (api: SimplexChatApi) => Promise) { + return await fn({ source } as unknown as SimplexChatApi); + }, + } as SimplexClient; +} + +describe("simplex runtime transport", () => { + afterEach(() => { + for (const registered of registeredAccounts) { + unregisterActiveSimplexClient(registered.account, registered.client); + } + registeredAccounts.length = 0; + clientMock.reset(); + }); + + it("prefers the active monitor client for shared API calls", async () => { + const cfg = account("alpha"); + const client = activeClient("active"); + registeredAccounts.push({ account: cfg, client }); + await registerActiveSimplexClient(cfg, client); + + const result = await withSimplexApi({ + account: cfg, + run: async (api) => (api as unknown as { source: string }).source, + }); + + expect(result).toBe("active"); + expect(clientMock.constructed).toBe(0); + }); + + it("reuses an active monitor client for another account with the same runtime database", async () => { + const dbFilePrefix = "/tmp/openclaw-simplex-shared"; + const monitored = accountWithDb("alpha", dbFilePrefix); + const alias = accountWithDb("alias", dbFilePrefix); + const client = activeClient("active"); + registeredAccounts.push({ account: monitored, client }); + await registerActiveSimplexClient(monitored, client); + + const result = await withSimplexApi({ + account: alias, + run: async (api) => (api as unknown as { source: string }).source, + }); + + expect(result).toBe("active"); + expect(clientMock.constructed).toBe(0); + }); + + it("does not unregister a newer active client with an older handle", async () => { + const cfg = account("gamma"); + const oldClient = activeClient("old"); + const newClient = activeClient("new"); + registeredAccounts.push( + { account: cfg, client: oldClient }, + { account: cfg, client: newClient } + ); + await registerActiveSimplexClient(cfg, oldClient); + await registerActiveSimplexClient(cfg, newClient); + + unregisterActiveSimplexClient(cfg, oldClient); + + expect(getActiveSimplexClient("gamma")).toBe(newClient); + }); +}); diff --git a/src/simplex/runtime/transport.ts b/src/simplex/runtime/transport.ts new file mode 100644 index 0000000..5436a71 --- /dev/null +++ b/src/simplex/runtime/transport.ts @@ -0,0 +1,80 @@ +import type { ResolvedSimplexAccount } from "../../types/config.js"; +import type { SimplexChatApi, SimplexLogger } from "../../types/simplex.js"; +import { SimplexClient } from "./client.js"; + +type SharedSimplexClientKey = `${string}|${string}|${number}`; + +const activeSimplexClients = new Map(); +const activeSimplexClientsByKey = new Map(); +const sharedSimplexClients = new Map(); + +function sharedClientKey(account: ResolvedSimplexAccount): SharedSimplexClientKey { + const timeoutMs = account.config.connectTimeoutMs ?? 15_000; + return `${account.mode}|${account.dbFilePrefix ?? "unconfigured"}|${timeoutMs}`; +} + +export async function registerActiveSimplexClient( + account: ResolvedSimplexAccount, + client: SimplexClient +): Promise { + const key = sharedClientKey(account); + const shared = sharedSimplexClients.get(key); + if (shared && shared !== client) { + sharedSimplexClients.delete(key); + await shared.close().catch(() => undefined); + } + activeSimplexClients.set(account.accountId, client); + activeSimplexClientsByKey.set(key, client); +} + +export function unregisterActiveSimplexClient( + account: ResolvedSimplexAccount, + client: SimplexClient +): void { + if (activeSimplexClients.get(account.accountId) === client) { + activeSimplexClients.delete(account.accountId); + } + const key = sharedClientKey(account); + if (activeSimplexClientsByKey.get(key) === client) { + activeSimplexClientsByKey.delete(key); + } +} + +export function getActiveSimplexClient(accountId: string): SimplexClient | undefined { + return activeSimplexClients.get(accountId); +} + +export function hasActiveSimplexClient(accountId: string): boolean { + return activeSimplexClients.has(accountId); +} + +function getSharedSimplexClient(params: { + account: ResolvedSimplexAccount; + logger?: SimplexLogger; +}): SimplexClient { + const key = sharedClientKey(params.account); + const existing = sharedSimplexClients.get(key); + if (existing) { + return existing; + } + const created = new SimplexClient({ account: params.account, logger: params.logger }); + sharedSimplexClients.set(key, created); + return created; +} + +export async function withSimplexApi(params: { + account: ResolvedSimplexAccount; + logger?: SimplexLogger; + run: (api: SimplexChatApi) => Promise; +}): Promise { + const activeClient = activeSimplexClients.get(params.account.accountId); + if (activeClient) { + return await activeClient.withApi(params.run); + } + const sharedActiveClient = activeSimplexClientsByKey.get(sharedClientKey(params.account)); + if (sharedActiveClient) { + return await sharedActiveClient.withApi(params.run); + } + const client = getSharedSimplexClient(params); + return await client.withApi(params.run); +} diff --git a/src/simplex/services/connect-links.ts b/src/simplex/services/connect-links.ts new file mode 100644 index 0000000..f777659 --- /dev/null +++ b/src/simplex/services/connect-links.ts @@ -0,0 +1,36 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { resolveRuntimeAccount, withActiveSimplexUser } from "../runtime/account.js"; + +export async function planSimplexConnectionLink(params: { + cfg: OpenClawConfig; + accountId?: string | null; + link: string; +}): Promise<{ accountId: string; plan: unknown; preparedLink: unknown }> { + const link = params.link.trim(); + if (!link) { + throw new Error("link is required"); + } + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const [plan, preparedLink] = await withActiveSimplexUser({ + account, + run: (userId, api) => api.apiConnectPlan(userId, link), + }); + return { accountId: account.accountId, plan, preparedLink }; +} + +export async function connectSimplexLink(params: { + cfg: OpenClawConfig; + accountId?: string | null; + link: string; +}): Promise<{ accountId: string; connected: boolean; result: unknown }> { + const link = params.link.trim(); + if (!link) { + throw new Error("link is required"); + } + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const result = await withActiveSimplexUser({ + account, + run: (_userId, api) => api.apiConnectActiveUser(link), + }); + return { accountId: account.accountId, connected: true, result }; +} diff --git a/src/simplex/services/contact-requests.ts b/src/simplex/services/contact-requests.ts new file mode 100644 index 0000000..b645b3f --- /dev/null +++ b/src/simplex/services/contact-requests.ts @@ -0,0 +1,66 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { resolveRuntimeAccount, withActiveSimplexUser } from "../runtime/account.js"; +import { + deleteStoredSimplexContactRequest, + listStoredSimplexContactRequests, + type StoredSimplexContactRequest, +} from "../state/contact-requests.js"; + +export async function listSimplexContactRequests(params: { + cfg: OpenClawConfig; + accountId?: string | null; +}): Promise<{ accountId: string; requests: StoredSimplexContactRequest[] }> { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + return { + accountId: account.accountId, + requests: await listStoredSimplexContactRequests({ accountId: account.accountId }), + }; +} + +export async function acceptSimplexContactRequest(params: { + cfg: OpenClawConfig; + accountId?: string | null; + contactRequestId: number; +}): Promise<{ + accountId: string; + contactRequestId: number; + accepted: boolean; + contact: unknown; +}> { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const contact = await withActiveSimplexUser({ + account, + run: (_userId, api) => api.apiAcceptContactRequest(params.contactRequestId), + }); + await deleteStoredSimplexContactRequest({ + accountId: account.accountId, + contactRequestId: params.contactRequestId, + }); + return { + accountId: account.accountId, + contactRequestId: params.contactRequestId, + accepted: true, + contact, + }; +} + +export async function rejectSimplexContactRequest(params: { + cfg: OpenClawConfig; + accountId?: string | null; + contactRequestId: number; +}): Promise<{ accountId: string; contactRequestId: number; rejected: boolean }> { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + await withActiveSimplexUser({ + account, + run: (_userId, api) => api.apiRejectContactRequest(params.contactRequestId), + }); + await deleteStoredSimplexContactRequest({ + accountId: account.accountId, + contactRequestId: params.contactRequestId, + }); + return { + accountId: account.accountId, + contactRequestId: params.contactRequestId, + rejected: true, + }; +} diff --git a/src/simplex/services/groups.ts b/src/simplex/services/groups.ts new file mode 100644 index 0000000..1b29efa --- /dev/null +++ b/src/simplex/services/groups.ts @@ -0,0 +1,118 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import type { SimplexApiGroupMemberRole, SimplexApiGroupProfile } from "../../types/simplex.js"; +import { resolveRuntimeAccount, withActiveSimplexUser } from "../runtime/account.js"; + +const GROUP_MEMBER_ROLES = new Set(["observer", "author", "member", "moderator", "admin", "owner"]); + +function readRole(value: unknown, fallback: string): SimplexApiGroupMemberRole { + const role = typeof value === "string" ? value.trim().toLowerCase() : fallback; + if (!GROUP_MEMBER_ROLES.has(role)) { + throw new Error(`role must be one of ${[...GROUP_MEMBER_ROLES].join(", ")}`); + } + return role as SimplexApiGroupMemberRole; +} + +function readGroupId(value: unknown): number { + const groupId = typeof value === "number" ? value : Number(String(value ?? "").trim()); + if (!Number.isInteger(groupId) || groupId <= 0) { + throw new Error("groupId must be a positive integer"); + } + return groupId; +} + +function linkToString(link: unknown): string | null { + if (typeof link === "string" && link.trim()) { + return link; + } + if (!link || typeof link !== "object") { + return null; + } + const record = link as Record; + const nested = (record.connLinkContact as Record | undefined) ?? record; + const short = nested.connShortLink; + const full = nested.connFullLink; + return typeof short === "string" && short + ? short + : typeof full === "string" && full + ? full + : null; +} + +export async function createSimplexGroup(params: { + cfg: OpenClawConfig; + accountId?: string | null; + displayName: string; + fullName?: string; + description?: string; +}): Promise<{ accountId: string; group: unknown }> { + const displayName = params.displayName.trim(); + if (!displayName) { + throw new Error("displayName is required"); + } + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const profile: SimplexApiGroupProfile = { + displayName, + fullName: params.fullName?.trim() ?? "", + description: params.description?.trim() || undefined, + }; + const group = await withActiveSimplexUser({ + account, + run: (userId, api) => api.apiNewGroup(userId, profile), + }); + return { accountId: account.accountId, group }; +} + +export async function createSimplexGroupLink(params: { + cfg: OpenClawConfig; + accountId?: string | null; + groupId: unknown; + role?: unknown; +}): Promise<{ accountId: string; groupId: number; role: SimplexApiGroupMemberRole; link: string }> { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const groupId = readGroupId(params.groupId); + const role = readRole(params.role, "member"); + const link = await withActiveSimplexUser({ + account, + run: (_userId, api) => api.apiCreateGroupLink(groupId, role), + }); + return { accountId: account.accountId, groupId, role, link }; +} + +export async function listSimplexGroupLink(params: { + cfg: OpenClawConfig; + accountId?: string | null; + groupId: unknown; +}): Promise<{ accountId: string; groupId: number; link: string | null; linkInfo: unknown }> { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const groupId = readGroupId(params.groupId); + const result = await withActiveSimplexUser({ + account, + run: async (_userId, api) => { + const [link, linkInfo] = await Promise.all([ + api.apiGetGroupLinkStr(groupId), + api.apiGetGroupLink(groupId).catch(() => null), + ]); + return { link, linkInfo }; + }, + }); + return { + accountId: account.accountId, + groupId, + link: linkToString(result.link), + linkInfo: result.linkInfo, + }; +} + +export async function revokeSimplexGroupLink(params: { + cfg: OpenClawConfig; + accountId?: string | null; + groupId: unknown; +}): Promise<{ accountId: string; groupId: number; revoked: boolean }> { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const groupId = readGroupId(params.groupId); + await withActiveSimplexUser({ + account, + run: (_userId, api) => api.apiDeleteGroupLink(groupId), + }); + return { accountId: account.accountId, groupId, revoked: true }; +} diff --git a/src/simplex/services/invites.ts b/src/simplex/services/invites.ts new file mode 100644 index 0000000..91ace0a --- /dev/null +++ b/src/simplex/services/invites.ts @@ -0,0 +1,103 @@ +import type { + SimplexInviteCreateResult, + SimplexInviteListResult, + SimplexInviteMode, + SimplexInviteRevokeResult, + SimplexInviteServiceOptions, +} from "../../types/invite.js"; +import { resolveRuntimeAccount, withActiveSimplexUser } from "../runtime/account.js"; + +function contactLinkToString(link: unknown): string | null { + if (!link || typeof link !== "object") { + return null; + } + const record = link as Record; + const nested = (record.connLinkContact as Record | undefined) ?? record; + const short = nested.connShortLink; + const full = nested.connFullLink; + return typeof short === "string" && short + ? short + : typeof full === "string" && full + ? full + : null; +} + +export function resolveInviteMode(value: unknown): SimplexInviteMode | null { + if (value === "connect" || value === "address") { + return value; + } + return null; +} + +export async function createSimplexInvite( + params: SimplexInviteServiceOptions & { mode: SimplexInviteMode } +): Promise { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const result = await withActiveSimplexUser({ + account, + logger: params.logger, + run: async (userId, api) => { + if (params.mode === "connect") { + const link = await api.apiCreateLink(userId); + return { link }; + } + const existing = await api.apiGetUserAddress(userId); + const address = existing ?? (await api.apiCreateUserAddress(userId)); + const link = contactLinkToString(address); + return { link }; + }, + }); + return { + accountId: account.accountId, + operation: params.mode === "connect" ? "create-link" : "create-address", + mode: params.mode, + link: result.link, + }; +} + +export async function listSimplexInvites( + params: SimplexInviteServiceOptions +): Promise { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const { addressResponse, contactsResponse, addressLink } = await withActiveSimplexUser({ + account, + logger: params.logger, + run: async (userId, api) => { + const [address, contacts] = await Promise.all([ + api.apiGetUserAddress(userId), + api.apiListContacts(userId), + ]); + return { + addressResponse: address, + contactsResponse: contacts, + addressLink: contactLinkToString(address), + }; + }, + }); + return { + accountId: account.accountId, + addressLink, + links: addressLink ? [addressLink] : [], + pendingHints: [], + addressResponse, + contactsResponse, + }; +} + +export async function revokeSimplexInvite( + params: SimplexInviteServiceOptions +): Promise { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const revoked = await withActiveSimplexUser({ + account, + logger: params.logger, + run: async (userId, api) => { + await api.apiDeleteUserAddress(userId); + return true; + }, + }); + return { + accountId: account.accountId, + revoked, + }; +} diff --git a/src/simplex/services/runtime-status.ts b/src/simplex/services/runtime-status.ts new file mode 100644 index 0000000..175145a --- /dev/null +++ b/src/simplex/services/runtime-status.ts @@ -0,0 +1,93 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import { + readSimplexPackageVersion, + resolveRuntimeAccount, + withActiveSimplexUser, +} from "../runtime/account.js"; +import { getActiveSimplexClient } from "../runtime/transport.js"; + +export type SimplexRuntimeStatusResult = { + accountId: string; + enabled: boolean; + configured: boolean; + mode: string; + dbFilePrefix: string | null; + packageVersion: string | null; + runtime: { + activeClient: boolean; + connected: boolean; + lastStateAt: number | null; + expectedDisconnect: boolean | null; + lastError: string | null; + }; + activeUser: unknown; + address: unknown; + counts: { + contacts: number; + groups: number; + users: number; + }; +}; + +export async function getSimplexRuntimeStatus(params: { + cfg: OpenClawConfig; + accountId?: string | null; +}): Promise { + const account = resolveRuntimeAccount(params.cfg, params.accountId); + const activeClient = getActiveSimplexClient(account.accountId); + const connection = activeClient?.getConnectionState(); + const details = await withActiveSimplexUser({ + account, + run: async (userId, api) => { + const [activeUser, address, contacts, groups, users] = await Promise.all([ + api.apiGetActiveUser(), + api.apiGetUserAddress(userId).catch(() => undefined), + api.apiListContacts(userId).catch(() => []), + api.apiListGroups(userId).catch(() => []), + api.apiListUsers().catch(() => []), + ]); + return { activeUser, address, contacts, groups, users }; + }, + }); + + return { + accountId: account.accountId, + enabled: account.enabled, + configured: account.configured, + mode: account.mode, + dbFilePrefix: account.dbFilePrefix ?? null, + packageVersion: readSimplexPackageVersion(), + runtime: { + activeClient: Boolean(activeClient), + connected: connection?.connected ?? true, + lastStateAt: connection?.at ?? null, + expectedDisconnect: connection?.expected ?? null, + lastError: connection?.error ?? null, + }, + activeUser: details.activeUser ?? null, + address: details.address ?? null, + counts: { + contacts: details.contacts.length, + groups: details.groups.length, + users: details.users.length, + }, + }; +} + +export async function doctorSimplexRuntime(params: { + cfg: OpenClawConfig; + accountId?: string | null; +}): Promise { + const status = await getSimplexRuntimeStatus(params); + const issues: string[] = []; + if (!status.configured) { + issues.push("SimpleX account is not configured."); + } + if (!status.activeUser) { + issues.push("SimpleX runtime has no active user profile."); + } + if (status.runtime.lastError) { + issues.push(`SimpleX runtime error: ${status.runtime.lastError}`); + } + return { ...status, ok: issues.length === 0, issues }; +} diff --git a/src/simplex/simplex-commands.test.ts b/src/simplex/simplex-commands.test.ts deleted file mode 100644 index 6d08c3a..0000000 --- a/src/simplex/simplex-commands.test.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { describe, expect, it, test } from "vitest"; -import { - buildDeleteChatItemCommand, - buildReceiveFileCommand, - buildSendMessagesCommand, - buildUpdateGroupProfileCommand, - formatChatRef, -} from "./simplex-commands.js"; - -describe("simplex commands", () => { - it("rejects unsafe chat refs in send command", () => { - expect(() => - buildSendMessagesCommand({ - chatRef: "@123 ttl=on", - composedMessages: [], - }) - ).toThrow("invalid SimpleX chat ref"); - }); - - it("rejects unsafe chat item ids in delete command", () => { - expect(() => - buildDeleteChatItemCommand({ - chatRef: "@123", - chatItemIds: ["1,2"], - }) - ).toThrow("invalid SimpleX chat item id"); - }); - - it("quotes file paths for receive command", () => { - expect( - buildReceiveFileCommand({ - fileId: 7, - filePath: "/tmp/My File's Name.png", - }) - ).toBe("/freceive 7 '/tmp/My File\\'s Name.png'"); - }); - - it("emits raw JSON payload in send command", () => { - expect( - buildSendMessagesCommand({ - chatRef: "@123", - composedMessages: [ - { - msgContent: { - type: "text", - text: "hello world", - }, - }, - ], - }) - ).toBe('/_send @123 json [{"msgContent":{"type":"text","text":"hello world"}}]'); - }); - - it("normalizes scoped SimpleX group refs in send command", () => { - expect( - buildSendMessagesCommand({ - chatRef: "simplex:group:1", - composedMessages: [ - { - msgContent: { - type: "text", - text: "hello group", - }, - }, - ], - }) - ).toBe('/_send #1 json [{"msgContent":{"type":"text","text":"hello group"}}]'); - }); - - test.each([ - "simplex:4", - "simplex:contact:4", - "simplex:user:4", - "simplex:member:4", - ])("normalizes scoped SimpleX direct ref %s in delete command", (chatRef) => { - expect( - buildDeleteChatItemCommand({ - chatRef, - chatItemIds: [12], - }) - ).toBe("/_delete item @4 12 broadcast"); - }); - - it("emits raw JSON payload in update group profile command", () => { - expect( - buildUpdateGroupProfileCommand({ - groupId: "my-group", - profile: { displayName: "Team Room" }, - }) - ).toBe('/_group_profile #my-group {"displayName":"Team Room"}'); - }); - - it("rejects unsupported local/scoped chat refs", () => { - expect(() => formatChatRef({ type: "local", id: "abc" })).toThrow( - "local SimpleX chat refs are not supported" - ); - expect(() => formatChatRef({ type: "direct", id: "abc", scope: "team" })).toThrow( - "scoped SimpleX chat refs are not supported" - ); - }); -}); diff --git a/src/simplex/simplex-commands.ts b/src/simplex/simplex-commands.ts deleted file mode 100644 index 692d4db..0000000 --- a/src/simplex/simplex-commands.ts +++ /dev/null @@ -1,331 +0,0 @@ -import { hasSimplexProviderPrefix, stripSimplexProviderPrefix } from "../constants.js"; - -export type SimplexChatType = "direct" | "group" | "local"; - -export type SimplexChatRef = { - type: SimplexChatType; - id: number | string; - scope?: string | null; -}; - -export type SimplexMsgContent = { - type: "text" | "link" | "image" | "video" | "voice" | "file" | "report" | "chat" | "unknown"; - text: string; - [key: string]: unknown; -}; - -export type SimplexComposedMessage = { - msgContent: SimplexMsgContent; - quotedItemId?: number; - fileSource?: { - filePath: string; - cryptoArgs?: { fileKey: string; fileNonce: string }; - }; - mentions?: Record; -}; - -function isAsciiAlnumUnderscoreOrHyphen(value: string): boolean { - for (const ch of value) { - const code = ch.charCodeAt(0); - const isDigit = code >= 48 && code <= 57; - const isUpper = code >= 65 && code <= 90; - const isLower = code >= 97 && code <= 122; - if (!isDigit && !isUpper && !isLower && ch !== "_" && ch !== "-") { - return false; - } - } - return value.length > 0; -} - -function isSignedIntegerToken(value: string): boolean { - if (!value) { - return false; - } - const start = value[0] === "-" ? 1 : 0; - if (start === value.length) { - return false; - } - for (let i = start; i < value.length; i += 1) { - const code = value.charCodeAt(i); - if (code < 48 || code > 57) { - return false; - } - } - return true; -} - -function normalizeSimplexChatRef(raw: string): string { - const trimmed = raw.trim(); - if (!trimmed) { - return trimmed; - } - - const withoutPrefix = stripSimplexProviderPrefix(trimmed); - if (!withoutPrefix) { - return withoutPrefix; - } - if (withoutPrefix.startsWith("#") || withoutPrefix.toLowerCase().startsWith("group:")) { - return normalizeGroupRef(withoutPrefix); - } - if (withoutPrefix.startsWith("@")) { - return normalizeContactRef(withoutPrefix); - } - - const lowered = withoutPrefix.toLowerCase(); - if ( - lowered.startsWith("contact:") || - lowered.startsWith("user:") || - lowered.startsWith("member:") - ) { - return normalizeContactRef(withoutPrefix); - } - - return normalizeContactRef(withoutPrefix); -} - -function normalizeChatRefToken(value: string): string { - const trimmed = value.trim(); - const lowered = trimmed.toLowerCase(); - const normalized = - hasSimplexProviderPrefix(trimmed) || - lowered.startsWith("group:") || - lowered.startsWith("contact:") || - lowered.startsWith("user:") || - lowered.startsWith("member:") - ? normalizeSimplexChatRef(trimmed) - : trimmed; - const prefix = normalized[0]; - const body = normalized.slice(1); - if ((prefix !== "@" && prefix !== "#") || !isAsciiAlnumUnderscoreOrHyphen(body)) { - throw new Error(`invalid SimpleX chat ref: ${value}`); - } - return normalized; -} - -function normalizeChatItemIdToken(value: number | string): string { - const normalized = normalizeCommandId(value); - if (!isSignedIntegerToken(normalized)) { - throw new Error(`invalid SimpleX chat item id: ${value}`); - } - return normalized; -} - -function quoteCliArg(value: string): string { - const trimmed = value.trim(); - const hasControlNewline = - trimmed.includes("\n") || trimmed.includes("\r") || trimmed.includes("\u0000"); - if (!trimmed || hasControlNewline) { - throw new Error("invalid SimpleX CLI argument"); - } - return `'${trimmed.replaceAll("\\", "\\\\").replaceAll("'", "\\'")}'`; -} - -function hasWhitespace(value: string): boolean { - for (const ch of value) { - if (ch.trim() === "") { - return true; - } - } - return false; -} - -export function formatChatRef(ref: SimplexChatRef): string { - if (ref.type === "local") { - throw new Error("local SimpleX chat refs are not supported for message commands"); - } - if (ref.scope) { - throw new Error("scoped SimpleX chat refs are not supported for message commands"); - } - const prefix = ref.type === "direct" ? "@" : "#"; - return `${prefix}${ref.id}`; -} - -export function buildSendMessagesCommand(params: { - chatRef: string; - composedMessages: SimplexComposedMessage[]; - liveMessage?: boolean; - ttl?: number; -}): string { - const chatRef = normalizeChatRefToken(params.chatRef); - const liveFlag = params.liveMessage ? " live=on" : ""; - const ttlFlag = typeof params.ttl === "number" ? ` ttl=${params.ttl}` : ""; - const json = JSON.stringify(params.composedMessages); - return `/_send ${chatRef}${liveFlag}${ttlFlag} json ${json}`; -} - -export function buildUpdateChatItemCommand(params: { - chatRef: string; - chatItemId: number; - updatedMessage: SimplexComposedMessage; - liveMessage?: boolean; -}): string { - const chatRef = normalizeChatRefToken(params.chatRef); - const chatItemId = normalizeChatItemIdToken(params.chatItemId); - const liveFlag = params.liveMessage ? " live=on" : ""; - const json = JSON.stringify(params.updatedMessage); - return `/_update item ${chatRef} ${chatItemId}${liveFlag} json ${json}`; -} - -export function buildDeleteChatItemCommand(params: { - chatRef: string; - chatItemIds: Array; - deleteMode?: "broadcast" | "internal" | "internalMark"; -}): string { - const chatRef = normalizeChatRefToken(params.chatRef); - const deleteMode = params.deleteMode ?? "broadcast"; - const ids = params.chatItemIds.map((id) => normalizeChatItemIdToken(id)).join(","); - return `/_delete item ${chatRef} ${ids} ${deleteMode}`; -} - -export function buildReactionCommand(params: { - chatRef: string; - chatItemId: number; - add: boolean; - reaction: Record; -}): string { - const chatRef = normalizeChatRefToken(params.chatRef); - const chatItemId = normalizeChatItemIdToken(params.chatItemId); - const toggle = params.add ? "on" : "off"; - const json = JSON.stringify(params.reaction); - return `/_reaction ${chatRef} ${chatItemId} ${toggle} ${json}`; -} - -export function buildReceiveFileCommand(params: { - fileId: number; - filePath?: string; - inline?: boolean; - encrypt?: boolean; - approvedRelays?: boolean; -}): string { - if (!Number.isFinite(params.fileId)) { - throw new Error(`invalid SimpleX file id: ${params.fileId}`); - } - const flags: string[] = []; - if (params.approvedRelays) { - flags.push("approved_relays=on"); - } - if (typeof params.encrypt === "boolean") { - flags.push(`encrypt=${params.encrypt ? "on" : "off"}`); - } - if (typeof params.inline === "boolean") { - flags.push(`inline=${params.inline ? "on" : "off"}`); - } - const path = params.filePath ? ` ${quoteCliArg(params.filePath)}` : ""; - const suffix = flags.length > 0 ? ` ${flags.join(" ")}` : ""; - return `/freceive ${Math.trunc(params.fileId)}${suffix}${path}`; -} - -export function buildCancelFileCommand(fileId: number): string { - return `/fcancel ${fileId}`; -} - -function normalizeCommandId(value: number | string): string { - if (typeof value === "number" && Number.isFinite(value)) { - return String(Math.trunc(value)); - } - return String(value).trim(); -} - -function normalizeContactRef(value: number | string): string { - const raw = normalizeCommandId(value); - if (!raw) { - return raw; - } - if (raw.startsWith("@")) { - return raw; - } - const lowered = raw.toLowerCase(); - if ( - lowered.startsWith("contact:") || - lowered.startsWith("user:") || - lowered.startsWith("member:") - ) { - return `@${raw.slice(raw.indexOf(":") + 1).trim()}`; - } - return `@${raw}`; -} - -function normalizeGroupRef(value: number | string): string { - const raw = normalizeCommandId(value); - if (!raw) { - return raw; - } - if (raw.startsWith("#")) { - return raw; - } - if (raw.toLowerCase().startsWith("group:")) { - return `#${raw.slice("group:".length).trim()}`; - } - return `#${raw}`; -} - -function formatSearchArg(search?: string | null): string { - const trimmed = search?.trim(); - if (!trimmed) { - return ""; - } - if (hasWhitespace(trimmed)) { - return `'${trimmed.replaceAll("'", "\\'")}'`; - } - return trimmed; -} - -export function buildListUsersCommand(): string { - return "/users"; -} - -export function buildShowActiveUserCommand(): string { - return "/user"; -} - -export function buildListContactsCommand(userId: number | string): string { - const id = normalizeCommandId(userId); - return `/_contacts ${id}`; -} - -export function buildListGroupsCommand(params: { - userId: number | string; - contactId?: number | string | null; - search?: string | null; -}): string { - const userId = normalizeCommandId(params.userId); - const contactRef = params.contactId ? normalizeContactRef(params.contactId) : ""; - const search = formatSearchArg(params.search); - const parts = ["/_groups", userId, contactRef, search].filter(Boolean); - return parts.join(" "); -} - -export function buildListGroupMembersCommand(params: { - groupId: number | string; - search?: string | null; -}): string { - const groupRef = normalizeGroupRef(params.groupId); - const search = formatSearchArg(params.search); - const parts = ["/_members", groupRef, search].filter(Boolean); - return parts.join(" "); -} - -export function buildAddGroupMemberCommand(params: { - groupId: number | string; - contactId: number | string; -}): string { - return `/_add ${normalizeGroupRef(params.groupId)} ${normalizeContactRef(params.contactId)}`; -} - -export function buildRemoveGroupMemberCommand(params: { - groupId: number | string; - memberId: number | string; -}): string { - return `/_remove ${normalizeGroupRef(params.groupId)} ${normalizeContactRef(params.memberId)}`; -} - -export function buildLeaveGroupCommand(groupId: number | string): string { - return `/_leave ${normalizeGroupRef(groupId)}`; -} - -export function buildUpdateGroupProfileCommand(params: { - groupId: number | string; - profile: Record; -}): string { - return `/_group_profile ${normalizeGroupRef(params.groupId)} ${JSON.stringify(params.profile)}`; -} diff --git a/src/simplex/simplex-errors.ts b/src/simplex/simplex-errors.ts deleted file mode 100644 index 33159ee..0000000 --- a/src/simplex/simplex-errors.ts +++ /dev/null @@ -1,27 +0,0 @@ -export type SimplexCommandErrorResponse = { - type?: string; - chatError?: { - type?: string; - errorType?: { - type?: string; - message?: string; - }; - }; -}; - -export function resolveSimplexCommandError( - resp: SimplexCommandErrorResponse | undefined -): string | undefined { - if (!resp || resp.type !== "chatCmdError") { - return undefined; - } - const message = resp.chatError?.errorType?.message?.trim(); - if (message) { - return message; - } - const errorType = resp.chatError?.errorType?.type?.trim(); - if (errorType) { - return `SimpleX command error: ${errorType}`; - } - return "SimpleX command failed"; -} diff --git a/src/simplex/simplex-invite-service.ts b/src/simplex/simplex-invite-service.ts deleted file mode 100644 index dd92c50..0000000 --- a/src/simplex/simplex-invite-service.ts +++ /dev/null @@ -1,158 +0,0 @@ -import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; -import { resolveDefaultSimplexAccountId, resolveSimplexAccount } from "../config/accounts.js"; -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { INVITE_COMMANDS, type SimplexInviteMode } from "./simplex-invite.js"; -import { - extractSimplexLink, - extractSimplexLinks, - extractSimplexPendingHints, -} from "./simplex-links.js"; -import { - type SimplexLogger, - sendSimplexCommand, - sendSimplexCommandWithRetry, -} from "./simplex-transport.js"; -import type { SimplexWsResponse } from "./simplex-ws-client.js"; - -type RunningStateResolver = () => boolean; -type ChannelStarter = () => Promise; - -export type SimplexInviteServiceOptions = { - cfg: OpenClawConfig; - accountId?: string | null; - logger?: SimplexLogger; - startChannel?: ChannelStarter; - isRunning?: RunningStateResolver; -}; - -export type SimplexInviteCreateResult = { - accountId: string; - command: string; - mode: SimplexInviteMode; - link: string | null; - response: SimplexWsResponse; -}; - -export type SimplexInviteListResult = { - accountId: string; - addressLink: string | null; - links: string[]; - pendingHints: string[]; - addressResponse: SimplexWsResponse; - contactsResponse: SimplexWsResponse; -}; - -export type SimplexInviteRevokeResult = { - accountId: string; - response: SimplexWsResponse; -}; - -function resolveInviteAccount( - cfg: OpenClawConfig, - rawAccountId?: string | null -): ResolvedSimplexAccount { - const explicit = rawAccountId?.trim(); - const accountId = explicit || resolveDefaultSimplexAccountId(cfg); - const account = resolveSimplexAccount({ cfg, accountId }); - if (!account.enabled) { - throw new Error(`SimpleX account "${accountId}" is disabled`); - } - if (!account.configured) { - throw new Error(`SimpleX account "${accountId}" is not configured`); - } - return account; -} - -async function runInviteCommand( - account: ResolvedSimplexAccount, - params: { - command: string; - logger?: SimplexLogger; - startChannel?: ChannelStarter; - isRunning?: RunningStateResolver; - } -): Promise { - if (params.startChannel || params.isRunning) { - return await sendSimplexCommandWithRetry({ - account, - command: params.command, - logger: params.logger, - startChannel: params.startChannel, - isRunning: params.isRunning, - }); - } - return await sendSimplexCommand({ - account, - command: params.command, - logger: params.logger, - }); -} - -export async function createSimplexInvite( - params: SimplexInviteServiceOptions & { mode: SimplexInviteMode } -): Promise { - const account = resolveInviteAccount(params.cfg, params.accountId); - const command = INVITE_COMMANDS[params.mode]; - const response = await runInviteCommand(account, { - command, - logger: params.logger, - startChannel: params.startChannel, - isRunning: params.isRunning, - }); - return { - accountId: account.accountId, - command, - mode: params.mode, - link: extractSimplexLink(response), - response, - }; -} - -export async function listSimplexInvites( - params: SimplexInviteServiceOptions -): Promise { - const account = resolveInviteAccount(params.cfg, params.accountId); - const [addressResponse, contactsResponse] = await Promise.all([ - runInviteCommand(account, { - command: "/show_address", - logger: params.logger, - startChannel: params.startChannel, - isRunning: params.isRunning, - }), - runInviteCommand(account, { - command: "/contacts", - logger: params.logger, - startChannel: params.startChannel, - isRunning: params.isRunning, - }), - ]); - return { - accountId: account.accountId, - addressLink: extractSimplexLink(addressResponse), - links: [ - ...new Set([ - ...extractSimplexLinks(addressResponse), - ...extractSimplexLinks(contactsResponse), - ]), - ], - pendingHints: extractSimplexPendingHints(contactsResponse), - addressResponse, - contactsResponse, - }; -} - -export async function revokeSimplexInvite( - params: SimplexInviteServiceOptions -): Promise { - const account = resolveInviteAccount(params.cfg, params.accountId); - const response = await runInviteCommand(account, { - command: "/delete_address", - logger: params.logger, - startChannel: params.startChannel, - isRunning: params.isRunning, - }); - return { - accountId: account.accountId, - response, - }; -} diff --git a/src/simplex/simplex-invite.ts b/src/simplex/simplex-invite.ts deleted file mode 100644 index 0cf901d..0000000 --- a/src/simplex/simplex-invite.ts +++ /dev/null @@ -1,13 +0,0 @@ -export type SimplexInviteMode = "connect" | "address"; - -export const INVITE_COMMANDS: Record = { - connect: "/c", - address: "/ad", -}; - -export function resolveInviteMode(value: unknown): SimplexInviteMode | null { - if (value === "connect" || value === "address") { - return value; - } - return null; -} diff --git a/src/simplex/simplex-links.ts b/src/simplex/simplex-links.ts deleted file mode 100644 index 861c338..0000000 --- a/src/simplex/simplex-links.ts +++ /dev/null @@ -1,67 +0,0 @@ -const SIMPLEX_LINK_REGEX = /\b(simplex:\/\/[^\s"'<>]+|https?:\/\/[^\s"'<>]+)/gi; - -function collectStrings(value: unknown, out: string[]): void { - if (typeof value === "string") { - out.push(value); - return; - } - if (Array.isArray(value)) { - for (const entry of value) { - collectStrings(entry, out); - } - return; - } - if (value && typeof value === "object") { - for (const entry of Object.values(value as Record)) { - collectStrings(entry, out); - } - } -} - -export function extractSimplexLink(resp: unknown): string | null { - const strings: string[] = []; - collectStrings(resp, strings); - const matches: string[] = []; - for (const str of strings) { - for (const match of str.matchAll(SIMPLEX_LINK_REGEX)) { - const raw = match[0]; - const cleaned = raw.replace(/[),.\]]+$/g, ""); - matches.push(cleaned); - } - } - const preferred = matches.find((entry) => /simplex/i.test(entry)); - return preferred ?? matches[0] ?? null; -} - -export function extractSimplexLinks(resp: unknown): string[] { - const strings: string[] = []; - collectStrings(resp, strings); - const matches = new Set(); - for (const str of strings) { - for (const match of str.matchAll(SIMPLEX_LINK_REGEX)) { - const raw = match[0]; - const cleaned = raw.replace(/[),.\]]+$/g, ""); - if (cleaned) { - matches.add(cleaned); - } - } - } - return [...matches]; -} - -export function extractSimplexPendingHints(resp: unknown): string[] { - const strings: string[] = []; - collectStrings(resp, strings); - const hints = new Set(); - for (const value of strings) { - const trimmed = value.trim(); - if (!trimmed) { - continue; - } - const lowered = trimmed.toLowerCase(); - if (lowered.includes("request") || lowered.includes("pending")) { - hints.add(trimmed); - } - } - return [...hints]; -} diff --git a/src/simplex/simplex-transport.ts b/src/simplex/simplex-transport.ts deleted file mode 100644 index 3e84156..0000000 --- a/src/simplex/simplex-transport.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { ResolvedSimplexAccount } from "../config/types.js"; -import { SimplexWsClient, type SimplexWsResponse } from "./simplex-ws-client.js"; - -export type SimplexLogger = { - info?: (message: string) => void; - warn?: (message: string) => void; - error?: (message: string) => void; -}; - -type SharedSimplexClientKey = `${string}|${number}`; - -const sharedSimplexClients = new Map(); - -function getSharedSimplexClient(params: { - account: ResolvedSimplexAccount; - logger?: SimplexLogger; -}): SimplexWsClient { - const timeoutMs = params.account.config.connection?.connectTimeoutMs ?? 15_000; - const key: SharedSimplexClientKey = `${params.account.wsUrl}|${timeoutMs}`; - const existing = sharedSimplexClients.get(key); - if (existing) { - return existing; - } - const created = new SimplexWsClient({ - url: params.account.wsUrl, - connectTimeoutMs: timeoutMs, - logger: params.logger, - }); - sharedSimplexClients.set(key, created); - return created; -} - -export async function sendSimplexCommand(params: { - account: ResolvedSimplexAccount; - command: string; - logger?: SimplexLogger; -}): Promise { - const client = getSharedSimplexClient(params); - await client.connect(); - return await client.sendCommand(params.command); -} - -export async function sendSimplexCommandWithRetry(params: { - account: ResolvedSimplexAccount; - command: string; - logger?: SimplexLogger; - startChannel?: () => Promise; - isRunning?: () => boolean; -}): Promise { - const maxAttempts = 6; - let started = false; - let lastError: Error | null = null; - - for (let attempt = 0; attempt < maxAttempts; attempt += 1) { - try { - return await sendSimplexCommand(params); - } catch (err) { - lastError = err instanceof Error ? err : new Error(String(err)); - const running = params.isRunning?.() ?? false; - if (!started && !running && params.startChannel) { - started = true; - await params.startChannel(); - } - await new Promise((resolve) => setTimeout(resolve, 500 + attempt * 400)); - } - } - - throw lastError ?? new Error("SimpleX command failed"); -} diff --git a/src/simplex/simplex-ws-client.test.ts b/src/simplex/simplex-ws-client.test.ts deleted file mode 100644 index 6fb8e15..0000000 --- a/src/simplex/simplex-ws-client.test.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { afterEach, beforeEach, describe, expect, it } from "vitest"; -import { WebSocketServer } from "ws"; -import { SimplexWsClient } from "./simplex-ws-client.js"; - -type ServerInfo = { - wss: WebSocketServer; - url: string; -}; - -let server: ServerInfo | null = null; - -function startServer(): Promise { - return new Promise((resolve, reject) => { - const wss = new WebSocketServer({ host: "127.0.0.1", port: 0 }); - const cleanup = () => { - wss.off("listening", onListening); - wss.off("error", onError); - }; - const onListening = () => { - cleanup(); - const address = wss.address(); - if (!address || typeof address === "string") { - reject(new Error("Failed to bind websocket server")); - return; - } - resolve({ wss, url: `ws://127.0.0.1:${address.port}` }); - }; - const onError = (err: Error) => { - cleanup(); - reject(err); - }; - - wss.on("listening", onListening); - wss.on("error", onError); - }); -} - -function stopServer(wss: WebSocketServer): Promise { - return new Promise((resolve) => wss.close(() => resolve())); -} - -describe("SimplexWsClient", () => { - beforeEach(async () => { - server = await startServer(); - }); - - afterEach(async () => { - if (server) { - await stopServer(server.wss); - server = null; - } - }); - - it("round-trips commands and emits events", async () => { - if (!server) { - throw new Error("server not initialized"); - } - const events: Array<{ type: string }> = []; - server.wss.on("connection", (socket) => { - socket.on("message", (data) => { - let text: string; - if (typeof data === "string") { - text = data; - } else if (Buffer.isBuffer(data)) { - text = data.toString("utf8"); - } else if (Array.isArray(data)) { - text = Buffer.concat(data).toString("utf8"); - } else { - text = Buffer.from(data).toString("utf8"); - } - const parsed = JSON.parse(text) as { corrId?: string }; - socket.send(Buffer.from(JSON.stringify({ corrId: parsed.corrId, resp: { type: "ok" } }))); - socket.send(JSON.stringify({ resp: { type: "event", hello: true } })); - }); - }); - - const client = new SimplexWsClient({ url: server.url }); - client.onEvent((event) => events.push(event)); - - const result = await client.sendCommand("/ping"); - expect(result.resp?.type).toBe("ok"); - - await new Promise((resolve) => setTimeout(resolve, 10)); - expect(events[0]?.type).toBe("event"); - - await client.close(); - }); - - it("rejects pending command on unexpected close and reconnects cleanly", async () => { - if (!server) { - throw new Error("server not initialized"); - } - - let connectionCount = 0; - server.wss.on("connection", (socket) => { - connectionCount += 1; - socket.on("message", (data) => { - let text: string; - if (typeof data === "string") { - text = data; - } else if (Buffer.isBuffer(data)) { - text = data.toString("utf8"); - } else if (Array.isArray(data)) { - text = Buffer.concat(data).toString("utf8"); - } else { - text = Buffer.from(data).toString("utf8"); - } - const parsed = JSON.parse(text) as { corrId?: string }; - - if (connectionCount === 1) { - socket.close(); - return; - } - socket.send(Buffer.from(JSON.stringify({ corrId: parsed.corrId, resp: { type: "ok" } }))); - }); - }); - - const client = new SimplexWsClient({ url: server.url }); - await expect(client.sendCommand("/first", 5_000)).rejects.toThrow("SimpleX WS closed"); - - const second = await client.sendCommand("/second"); - expect(second.resp?.type).toBe("ok"); - - await client.close(); - }); - - it("redacts timed out command payloads", async () => { - if (!server) { - throw new Error("server not initialized"); - } - - server.wss.on("connection", (socket) => { - socket.on("message", () => { - // Intentionally do not respond. - }); - }); - - const client = new SimplexWsClient({ url: server.url }); - await expect( - client.sendCommand( - '/_send @123 json [{"msgContent":{"type":"text","text":"secret body"}}]', - 25 - ) - ).rejects.toThrow("SimpleX command timeout after 25ms (/_send)"); - await expect( - client.sendCommand( - '/_send @123 json [{"msgContent":{"type":"text","text":"secret body"}}]', - 25 - ) - ).rejects.not.toThrow("secret body"); - - await client.close(); - }); -}); diff --git a/src/simplex/simplex-ws-client.ts b/src/simplex/simplex-ws-client.ts deleted file mode 100644 index 23d52c2..0000000 --- a/src/simplex/simplex-ws-client.ts +++ /dev/null @@ -1,281 +0,0 @@ -import { randomUUID } from "node:crypto"; -import WebSocket from "ws"; - -export type SimplexWsResponse = { - corrId?: string; - resp?: { - type: string; - [key: string]: unknown; - }; - [key: string]: unknown; -}; - -export type SimplexWsEvent = { - type: string; - [key: string]: unknown; -}; - -export type SimplexWsClientOptions = { - url: string; - connectTimeoutMs?: number; - logger?: { - info?: (message: string) => void; - warn?: (message: string) => void; - error?: (message: string) => void; - debug?: (message: string) => void; - }; -}; - -export type SimplexWsConnectionState = { - connected: boolean; - at: number; - expected?: boolean; - error?: string | null; -}; - -type PendingCommand = { - resolve: (value: SimplexWsResponse) => void; - reject: (err: Error) => void; - timeout: NodeJS.Timeout; -}; - -export class SimplexWsClient { - private readonly url: string; - private readonly connectTimeoutMs: number; - private readonly logger?: SimplexWsClientOptions["logger"]; - private ws: WebSocket | null = null; - private connectPromise: Promise | null = null; - private pending = new Map(); - private eventHandlers = new Set<(event: SimplexWsEvent) => void>(); - private connectionHandlers = new Set<(state: SimplexWsConnectionState) => void>(); - private closing = false; - - constructor(options: SimplexWsClientOptions) { - this.url = options.url; - this.connectTimeoutMs = options.connectTimeoutMs ?? 15_000; - this.logger = options.logger; - } - - onEvent(handler: (event: SimplexWsEvent) => void): () => void { - this.eventHandlers.add(handler); - return () => { - this.eventHandlers.delete(handler); - }; - } - - onConnectionState(handler: (state: SimplexWsConnectionState) => void): () => void { - this.connectionHandlers.add(handler); - return () => { - this.connectionHandlers.delete(handler); - }; - } - - async connect(): Promise { - if (this.ws && this.ws.readyState === WebSocket.OPEN) { - return; - } - if (this.connectPromise) { - await this.connectPromise; - return; - } - const connectAttempt = new Promise((resolve, reject) => { - let settled = false; - let opened = false; - - const settleResolve = () => { - if (settled) { - return; - } - settled = true; - resolve(); - }; - - const settleReject = (error: Error) => { - if (settled) { - return; - } - settled = true; - reject(error); - }; - - const ws = new WebSocket(this.url); - this.ws = ws; - this.closing = false; - - const timeout = setTimeout(() => { - const timeoutError = new Error( - `SimpleX WS connect timeout after ${this.connectTimeoutMs}ms` - ); - this.handleSocketDisconnect(ws, timeoutError); - ws.terminate(); - settleReject(timeoutError); - }, this.connectTimeoutMs); - - ws.on("open", () => { - opened = true; - clearTimeout(timeout); - this.logger?.info?.(`SimpleX WS connected: ${this.url}`); - this.emitConnectionState({ connected: true, at: Date.now(), error: null }); - settleResolve(); - }); - - ws.on("message", (data) => { - this.handleMessage(data); - }); - - ws.on("close", (code, reason) => { - clearTimeout(timeout); - this.logger?.warn?.("SimpleX WS closed"); - const closeReason = - typeof reason === "string" - ? reason - : Buffer.from(reason).toString("utf8") || "unknown reason"; - const closeError = new Error(`SimpleX WS closed (code=${code}, reason=${closeReason})`); - this.handleSocketDisconnect(ws, closeError); - if (!opened) { - settleReject(closeError); - } - }); - - ws.on("error", (err) => { - clearTimeout(timeout); - const error = err instanceof Error ? err : new Error(String(err)); - this.logger?.error?.(`SimpleX WS error: ${String(error)}`); - this.handleSocketDisconnect(ws, error); - settleReject(error); - }); - }); - const inFlight = connectAttempt.finally(() => { - if (this.connectPromise === inFlight) { - this.connectPromise = null; - } - }); - this.connectPromise = inFlight; - await inFlight; - if (!this.ws || this.ws.readyState !== WebSocket.OPEN) { - throw new Error("SimpleX WS failed to connect"); - } - } - - async close(): Promise { - this.rejectAllPending(new Error("SimpleX WS closed")); - this.closing = true; - if (this.ws && this.ws.readyState === WebSocket.OPEN) { - await new Promise((resolve) => { - this.ws?.once("close", () => resolve()); - this.ws?.close(); - }); - } - this.ws = null; - this.closing = false; - } - - async sendCommand(cmd: string, timeoutMs = 20_000): Promise { - if (!this.ws || this.ws.readyState !== WebSocket.OPEN) { - await this.connect(); - } - const corrId = randomUUID(); - const payload = JSON.stringify({ corrId, cmd }); - return await new Promise((resolve, reject) => { - const timeout = setTimeout(() => { - this.pending.delete(corrId); - reject( - new Error(`SimpleX command timeout after ${timeoutMs}ms (${summarizeCommand(cmd)})`) - ); - }, timeoutMs); - this.pending.set(corrId, { resolve, reject, timeout }); - this.ws?.send(payload, (err) => { - if (err) { - clearTimeout(timeout); - this.pending.delete(corrId); - reject(err instanceof Error ? err : new Error(String(err))); - } - }); - }); - } - - private handleMessage(raw: WebSocket.RawData): void { - let text: string | null = null; - if (typeof raw === "string") { - text = raw; - } else if (raw instanceof Buffer) { - text = raw.toString("utf8"); - } else if (raw instanceof ArrayBuffer) { - text = Buffer.from(raw).toString("utf8"); - } else if (Array.isArray(raw)) { - text = Buffer.concat(raw).toString("utf8"); - } - - if (!text) { - this.logger?.warn?.("SimpleX WS message had unsupported payload type"); - return; - } - let parsed: SimplexWsResponse; - try { - parsed = JSON.parse(text) as SimplexWsResponse; - } catch (err) { - this.logger?.warn?.(`SimpleX WS parse error: ${String(err)}`); - return; - } - - const corrId = parsed.corrId; - if (corrId && this.pending.has(corrId)) { - const pending = this.pending.get(corrId); - if (pending) { - clearTimeout(pending.timeout); - this.pending.delete(corrId); - pending.resolve(parsed); - return; - } - } - - const event = parsed.resp; - if (!event || typeof event.type !== "string") { - this.logger?.debug?.("SimpleX WS message missing event type"); - return; - } - - for (const handler of this.eventHandlers) { - handler(event as SimplexWsEvent); - } - } - - private rejectAllPending(error: Error): void { - for (const [corrId, pending] of this.pending.entries()) { - clearTimeout(pending.timeout); - pending.reject(error); - this.pending.delete(corrId); - } - } - - private handleSocketDisconnect(ws: WebSocket, error: Error): void { - // Ignore stale events from an older socket after reconnect. - if (this.ws !== ws) { - return; - } - const expected = this.closing; - this.ws = null; - this.rejectAllPending(error); - this.emitConnectionState({ - connected: false, - at: Date.now(), - expected, - error: expected ? null : error.message, - }); - } - - private emitConnectionState(state: SimplexWsConnectionState): void { - for (const handler of this.connectionHandlers) { - handler(state); - } - } -} - -function summarizeCommand(cmd: string): string { - const trimmed = cmd.trim(); - if (!trimmed) { - return "unknown command"; - } - const firstToken = trimmed.split(/\s+/, 1)[0]; - return firstToken || "unknown command"; -} diff --git a/src/simplex/state/contact-requests.ts b/src/simplex/state/contact-requests.ts new file mode 100644 index 0000000..28d8965 --- /dev/null +++ b/src/simplex/state/contact-requests.ts @@ -0,0 +1,77 @@ +import type { PluginRuntime } from "openclaw/plugin-sdk/channel-core"; +import { getSimplexRuntime } from "../../channel/runtime.js"; +import { openSimplexKeyedStore } from "./keyed-store.js"; + +const REQUEST_STORE_NAMESPACE = "simplex-contact-requests"; +const REQUEST_STORE_MAX_ENTRIES = 500; +const REQUEST_STORE_TTL_MS = 30 * 24 * 60 * 60 * 1000; + +export type StoredSimplexContactRequest = { + accountId: string; + contactRequestId: number; + displayName?: string; + profile?: unknown; + createdAt?: string; + updatedAt?: string; + xContactId?: string; + storedAt: number; +}; + +function requestKey(accountId: string, contactRequestId: number): string { + return `${accountId}:${contactRequestId}`; +} + +function requestStore(runtime?: PluginRuntime | null) { + return openSimplexKeyedStore({ + runtime, + namespace: REQUEST_STORE_NAMESPACE, + maxEntries: REQUEST_STORE_MAX_ENTRIES, + defaultTtlMs: REQUEST_STORE_TTL_MS, + }); +} + +export async function recordSimplexContactRequest(params: { + accountId: string; + contactRequest: unknown; +}): Promise { + const request = params.contactRequest as Record; + const contactRequestId = request.contactRequestId; + if (typeof contactRequestId !== "number") { + return; + } + const stored: StoredSimplexContactRequest = { + accountId: params.accountId, + contactRequestId, + displayName: + typeof request.localDisplayName === "string" ? request.localDisplayName : undefined, + profile: request.profile, + createdAt: typeof request.createdAt === "string" ? request.createdAt : undefined, + updatedAt: typeof request.updatedAt === "string" ? request.updatedAt : undefined, + xContactId: typeof request.xContactId === "string" ? request.xContactId : undefined, + storedAt: Date.now(), + }; + await requestStore(getSimplexRuntime()).register( + requestKey(params.accountId, contactRequestId), + stored, + { ttlMs: REQUEST_STORE_TTL_MS } + ); +} + +export async function listStoredSimplexContactRequests(params: { + accountId: string; +}): Promise { + const entries = await requestStore(getSimplexRuntime()).entries(); + return entries + .map((entry) => entry.value) + .filter((request) => request.accountId === params.accountId) + .toSorted((a, b) => b.storedAt - a.storedAt); +} + +export async function deleteStoredSimplexContactRequest(params: { + accountId: string; + contactRequestId: number; +}): Promise { + return await requestStore(getSimplexRuntime()).delete( + requestKey(params.accountId, params.contactRequestId) + ); +} diff --git a/src/simplex/state/event-dedupe.ts b/src/simplex/state/event-dedupe.ts new file mode 100644 index 0000000..7e55764 --- /dev/null +++ b/src/simplex/state/event-dedupe.ts @@ -0,0 +1,26 @@ +import { getSimplexRuntime } from "../../channel/runtime.js"; +import { openSimplexKeyedStore } from "./keyed-store.js"; + +const SEEN_EVENT_NAMESPACE = "simplex-seen-events"; +const SEEN_EVENT_MAX_ENTRIES = 10_000; +const SEEN_EVENT_TTL_MS = 7 * 24 * 60 * 60 * 1000; + +export async function markSimplexEventSeen(params: { + accountId: string; + chatId: number | string; + messageId: number | string; +}): Promise { + const key = `${params.accountId}:${params.chatId}:${params.messageId}`; + const store = openSimplexKeyedStore({ + runtime: getSimplexRuntime(), + namespace: SEEN_EVENT_NAMESPACE, + maxEntries: SEEN_EVENT_MAX_ENTRIES, + defaultTtlMs: SEEN_EVENT_TTL_MS, + }); + const seen = await store.lookup(key); + if (seen) { + return false; + } + await store.register(key, true, { ttlMs: SEEN_EVENT_TTL_MS }); + return true; +} diff --git a/src/simplex/state/keyed-store.test.ts b/src/simplex/state/keyed-store.test.ts new file mode 100644 index 0000000..f63b407 --- /dev/null +++ b/src/simplex/state/keyed-store.test.ts @@ -0,0 +1,34 @@ +import { describe, expect, it } from "vitest"; +import { openSimplexKeyedStore } from "./keyed-store.js"; + +describe("simplex keyed store fallback", () => { + it("enforces maxEntries by evicting the oldest fallback entry", async () => { + const namespace = `test-max-${Date.now()}-${Math.random()}`; + const store = openSimplexKeyedStore({ + namespace, + maxEntries: 2, + }); + + await store.register("a", "one"); + await store.register("b", "two"); + await store.register("c", "three"); + + await expect(store.lookup("a")).resolves.toBeUndefined(); + await expect(store.lookup("b")).resolves.toBe("two"); + await expect(store.lookup("c")).resolves.toBe("three"); + }); + + it("applies default ttl when a register call does not specify ttl", async () => { + const namespace = `test-ttl-${Date.now()}-${Math.random()}`; + const store = openSimplexKeyedStore({ + namespace, + maxEntries: 10, + defaultTtlMs: 1, + }); + + await store.register("a", "one"); + await new Promise((resolve) => setTimeout(resolve, 5)); + + await expect(store.lookup("a")).resolves.toBeUndefined(); + }); +}); diff --git a/src/simplex/state/keyed-store.ts b/src/simplex/state/keyed-store.ts new file mode 100644 index 0000000..c73f5b1 --- /dev/null +++ b/src/simplex/state/keyed-store.ts @@ -0,0 +1,73 @@ +import type { PluginRuntime } from "openclaw/plugin-sdk/channel-core"; + +const memoryStores = new Map>(); + +function memoryStore(params: { namespace: string; maxEntries: number; defaultTtlMs?: number }) { + const entries = + memoryStores.get(params.namespace) ?? new Map(); + memoryStores.set(params.namespace, entries); + function sweep(): void { + const now = Date.now(); + for (const [key, entry] of entries) { + if (entry.expiresAt && entry.expiresAt <= now) { + entries.delete(key); + } + } + } + function enforceMaxEntries(): void { + while (entries.size > params.maxEntries) { + const oldestKey = entries.keys().next().value as string | undefined; + if (!oldestKey) { + return; + } + entries.delete(oldestKey); + } + } + return { + async register(key: string, value: T, opts?: { ttlMs?: number }) { + sweep(); + const ttlMs = opts?.ttlMs ?? params.defaultTtlMs; + entries.delete(key); + entries.set(key, { + value, + expiresAt: ttlMs ? Date.now() + ttlMs : undefined, + }); + enforceMaxEntries(); + }, + async lookup(key: string): Promise { + sweep(); + return entries.get(key)?.value as T | undefined; + }, + async delete(key: string): Promise { + return entries.delete(key); + }, + async entries(): Promise< + Array<{ key: string; value: T; createdAt: number; expiresAt?: number }> + > { + sweep(); + return [...entries].map(([key, entry]) => ({ + key, + value: entry.value as T, + createdAt: 0, + expiresAt: entry.expiresAt, + })); + }, + }; +} + +export function openSimplexKeyedStore(params: { + runtime?: PluginRuntime | null; + namespace: string; + maxEntries: number; + defaultTtlMs?: number; +}) { + const state = params.runtime?.state; + if (state?.openKeyedStore) { + return state.openKeyedStore({ + namespace: params.namespace, + maxEntries: params.maxEntries, + defaultTtlMs: params.defaultTtlMs, + }); + } + return memoryStore(params); +} diff --git a/src/tools/plugin-tools.ts b/src/tools/plugin-tools.ts index 351c71c..929b20c 100644 --- a/src/tools/plugin-tools.ts +++ b/src/tools/plugin-tools.ts @@ -2,17 +2,13 @@ import { type Static, Type } from "@sinclair/typebox"; import type { OpenClawPluginApi } from "openclaw/plugin-sdk/plugin-entry"; import { executeSimplexAction } from "../actions/execute.js"; import { resolveDefaultSimplexAccountId } from "../config/accounts.js"; -import { resolveInviteMode } from "../simplex/simplex-invite.js"; import { createSimplexInvite, listSimplexInvites, + resolveInviteMode, revokeSimplexInvite, -} from "../simplex/simplex-invite-service.js"; - -type ToolResult = { - content: Array<{ type: "text"; text: string }>; - details: unknown; -}; +} from "../simplex/services/invites.js"; +import type { ToolResult } from "../types/actions.js"; const destructiveToolNames = new Set([ "simplex_invite_revoke", @@ -173,7 +169,7 @@ export function registerSimplexTools(api: OpenClawPluginApi): void { accountId: resolveToolAccountId(api, rawParams?.accountId, ctx.agentAccountId), logger: api.logger, }); - return jsonResult({ ...result, revoked: true }); + return jsonResult(result); }, }), { name: "simplex_invite_revoke" } diff --git a/src/actions/types.ts b/src/types/actions.ts similarity index 100% rename from src/actions/types.ts rename to src/types/actions.ts diff --git a/src/types/channel.ts b/src/types/channel.ts new file mode 100644 index 0000000..0a78888 --- /dev/null +++ b/src/types/channel.ts @@ -0,0 +1,6 @@ +export type SimplexExplicitTarget = { + to: string; + chatType: "direct" | "group"; +}; + +export type SimplexTargetKind = SimplexExplicitTarget["chatType"] | null; diff --git a/src/types/config.ts b/src/types/config.ts new file mode 100644 index 0000000..1b13982 --- /dev/null +++ b/src/types/config.ts @@ -0,0 +1,20 @@ +import type { SimplexAccountConfig } from "../config/config-schema.js"; + +export type SimplexConnectionConfig = { + dbFilePrefix?: string; + displayName?: string; + fullName?: string; + migrationConfirmation?: "yesUp" | "yesUpDown" | "console" | "error"; + autoAcceptFiles?: boolean; + connectTimeoutMs?: number; +}; + +export type ResolvedSimplexAccount = { + accountId: string; + enabled: boolean; + name?: string; + configured: boolean; + mode: "node"; + dbFilePrefix?: string; + config: SimplexAccountConfig; +}; diff --git a/src/types/events.ts b/src/types/events.ts new file mode 100644 index 0000000..20b9987 --- /dev/null +++ b/src/types/events.ts @@ -0,0 +1,34 @@ +export type SimplexChatItem = { + chatInfo?: { + type?: string; + contact?: { contactId?: number; localDisplayName?: string; profile?: { displayName?: string } }; + groupInfo?: { groupId?: number; localDisplayName?: string }; + }; + chatItem?: { + chatDir?: { + type?: string; + groupMember?: { + memberId?: string; + groupMemberId?: number; + contactId?: number | string; + localDisplayName?: string; + }; + }; + meta?: { itemId?: number; itemTs?: string }; + content?: { type?: string; msgContent?: { type?: string; text?: string } }; + file?: { + fileId?: number; + fileName?: string; + fileSize?: number; + fileSource?: { filePath?: string }; + }; + }; +}; + +export type SimplexChatContext = { + chatType: "direct" | "group"; + chatId: number; + chatLabel: string; + senderId?: string; + senderName?: string; +}; diff --git a/src/types/invite.ts b/src/types/invite.ts new file mode 100644 index 0000000..fd7523a --- /dev/null +++ b/src/types/invite.ts @@ -0,0 +1,31 @@ +import type { OpenClawConfig } from "openclaw/plugin-sdk/channel-core"; +import type { SimplexLogger } from "./simplex.js"; + +export type SimplexInviteMode = "connect" | "address"; + +export type SimplexInviteServiceOptions = { + cfg: OpenClawConfig; + accountId?: string | null; + logger?: SimplexLogger; +}; + +export type SimplexInviteCreateResult = { + accountId: string; + operation: "create-link" | "create-address"; + mode: SimplexInviteMode; + link: string | null; +}; + +export type SimplexInviteListResult = { + accountId: string; + addressLink: string | null; + links: string[]; + pendingHints: string[]; + addressResponse: unknown; + contactsResponse: unknown; +}; + +export type SimplexInviteRevokeResult = { + accountId: string; + revoked: boolean; +}; diff --git a/src/types/security.ts b/src/types/security.ts new file mode 100644 index 0000000..f71800b --- /dev/null +++ b/src/types/security.ts @@ -0,0 +1,4 @@ +export type SimplexAllowlistEntry = { + kind: "any" | "sender" | "group"; + value: string; +}; diff --git a/src/types/simplex.ts b/src/types/simplex.ts new file mode 100644 index 0000000..1ea54a5 --- /dev/null +++ b/src/types/simplex.ts @@ -0,0 +1,36 @@ +import type { SimplexConnectionConfig } from "../types/config.js"; + +type SimplexChatModule = typeof import("simplex-chat"); +type ChatApi = Awaited>; + +export type SimplexChatApi = ChatApi; +export type SimplexChatEvent = NonNullable>>; +export type SimplexMigrationConfirmation = SimplexChatModule["core"]["MigrationConfirmation"]; +export type SimplexMigrationConfirmationSetting = SimplexConnectionConfig["migrationConfirmation"]; + +export type SimplexApiChatRef = Parameters[0]; +export type SimplexApiNumericChatRef = ["direct" | "group", number]; +export type SimplexApiChatType = Parameters[0]; +export type SimplexApiComposedMessage = Parameters[1][number]; +export type SimplexApiMsgContent = Parameters[3]; +export type SimplexApiDeleteMode = Parameters[3]; +export type SimplexApiReaction = Parameters[4]; +export type SimplexApiGroupProfile = Parameters[1]; +export type SimplexApiGroupMemberRole = Parameters[2]; + +export type SimplexChatType = "direct" | "group" | "local"; +export type SimplexChatRef = { + type: SimplexChatType; + id: number | string; + scope?: string | null; +}; + +export type SimplexMsgContent = SimplexApiMsgContent & { text: string }; +export type SimplexComposedMessage = SimplexApiComposedMessage; + +export type SimplexLogger = { + info?: (message: string) => void; + warn?: (message: string) => void; + error?: (message: string) => void; + debug?: (message: string) => void; +}; diff --git a/tsconfig.json b/tsconfig.json index 1540401..3e2468e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -11,6 +11,7 @@ "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "skipLibCheck": true, + "ignoreDeprecations": "6.0", "types": ["node", "vitest/globals"] }, "include": ["index.ts", "setup-entry.ts", "index.test.ts", "src/**/*.ts"]