diff --git a/README.md b/README.md index 669a7b7..c3463f5 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,7 @@ it off puts the config back. | [aider](packages/aider) | [Aider](https://aider.chat): `~/.aider.conf.yml`, through litellm's `openai/` prefix | | [nanobot](packages/nanobot) | [nanobot](https://github.com/HKUDS/nanobot): Magpie's model becomes nanobot's default preset, and Library gives it MCP servers and default-workspace skills; restart nanobot after MCP changes | | [reasonix-desktop](packages/reasonix-desktop) | [Reasonix 1.x](https://github.com/esengine/DeepSeek-Reasonix/tree/main-v2) Desktop and CLI: reversible global TOML/dotenv bridge; restart Reasonix after choosing a model. Separate from the built-in Studio 2.x adapter | +| [deepzora](packages/deepzora) | [Deepzora](https://github.com/SivanCola/deepzora) Desktop, CLI and ACP: reversible global TOML/dotenv bridge; restart Deepzora after choosing a model | | [bub](packages/bub) | [Bub](https://bub.build): `~/.bub/config.yml`, as the `magpie:` provider (needs Bub 0.5.1 or later) | | [kilo](packages/kilo) | [Kilo Code](https://kilo.ai): `~/.config/kilo/kilo.jsonc`, through an OpenAI-compatible provider | | [junie](packages/junie) | [Junie CLI](https://junie.jetbrains.com/): an explicit `/v1/models` seed for its full picker and Magpie's selected model as the launch default; no LiteLLM | diff --git a/packages/deepzora/ASSET_NOTICE.md b/packages/deepzora/ASSET_NOTICE.md new file mode 100644 index 0000000..6e9d218 --- /dev/null +++ b/packages/deepzora/ASSET_NOTICE.md @@ -0,0 +1,13 @@ +# Deepzora icon + +The PNG embedded in `package.json` (`magpie.icon`) and `deepzora.agent.js` +(`agent.icon`) is the unmodified official Deepzora 128 × 128 application icon. + +Source: [SivanCola/deepzora at ad855397cdfdaf2ba7e3e3414583ba777412cbe4](https://github.com/SivanCola/deepzora/blob/ad855397cdfdaf2ba7e3e3414583ba777412cbe4/desktop/build/linux/icons/hicolor/128x128/apps/deepzora-desktop.png). + +The icon is distributed under the source project's AGPL-3.0-only license; +see `LICENSE-ICON`. Deepzora's [brand policy](https://github.com/SivanCola/deepzora/blob/ad855397cdfdaf2ba7e3e3414583ba777412cbe4/TRADEMARK_POLICY.md) +also applies. It identifies the compatible agent in Magpie. + +The plugin's original code remains MIT licensed under `LICENSE`. The package +license expression includes both the code and the separately licensed icon. diff --git a/packages/deepzora/LICENSE b/packages/deepzora/LICENSE new file mode 100644 index 0000000..5226d83 --- /dev/null +++ b/packages/deepzora/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 SivanCola + +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. diff --git a/packages/deepzora/LICENSE-DOTENV b/packages/deepzora/LICENSE-DOTENV new file mode 100644 index 0000000..c430ad8 --- /dev/null +++ b/packages/deepzora/LICENSE-DOTENV @@ -0,0 +1,23 @@ +Copyright (c) 2015, Scott Motte +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/deepzora/LICENSE-ICON b/packages/deepzora/LICENSE-ICON new file mode 100644 index 0000000..be3f7b2 --- /dev/null +++ b/packages/deepzora/LICENSE-ICON @@ -0,0 +1,661 @@ + 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/packages/deepzora/LICENSE-SMOL-TOML b/packages/deepzora/LICENSE-SMOL-TOML new file mode 100644 index 0000000..1ed1c04 --- /dev/null +++ b/packages/deepzora/LICENSE-SMOL-TOML @@ -0,0 +1,24 @@ +Copyright (c) Squirrel Chat et al., All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holder nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/packages/deepzora/README.md b/packages/deepzora/README.md new file mode 100644 index 0000000..3c21778 --- /dev/null +++ b/packages/deepzora/README.md @@ -0,0 +1,105 @@ +# Deepzora + +Adds [Deepzora](https://github.com/SivanCola/deepzora) Desktop, CLI and ACP to +Magpie's Agents page as **Deepzora**, ID `deepzora`. + +```sh +magpie plugin add @magpie-community/agent-deepzora +``` + +Choose a model on its Agent row, wait about a second with Magpie running, then +restart Deepzora and start a new conversation. Explicit project +`deepzora.toml` defaults, CLI `--model` flags and existing session selections +retain their precedence. + +## Configuration and restoration + +This package includes an Agent descriptor and a companion running in Magpie's +Bun plugin host. The generic Agent writer supports JSON/YAML/dotenv, not TOML +with a separate credential file. No Deepzora source changes, host patches, +extra daemon or upstream provider login are required. Parsing libraries are +vendored at exact versions with their licenses; installation needs no build +script or runtime dependency download. + +The descriptor writes `~/.deepzora/magpie-agent.json`. The host bridges it into +`~/.deepzora/config.toml`, adding the `magpie-agent` OpenAI Chat Completions +provider and default model. The assigned gateway key goes into +`~/.deepzora/.env` as `MAGPIE_DEEPZORA_API_KEY`, never into TOML or logs. +Deepzora sends requests to Magpie; Magpie handles upstream credentials and +protocol conversion. Known context/output sizes and image support follow the +chosen model. Existing providers and unrelated settings are kept. + +Choose the Agent's default to disconnect, wait for the bridge, then restart +Deepzora. Normal plugin-host exit flushes a pending disconnect, including +disabling the plugin with Magpie running. With CLI-only operation, restore +while the package is still enabled before removing it: + +```sh +magpie deepzora default +magpie plugin list --json +# Remove after restoration completes: +magpie plugin rm @magpie-community/agent-deepzora +``` + +The one-shot fallback is `node cli.mjs sync` from this package. After a forced +host kill, re-enable the package and disconnect to finish restoration. + +Private backups and a replayable transaction journal live in +`~/.deepzora/.magpie-bridge/`. They contain original credential-file contents; +keep them private and retain them if recovery pauses. Writes use private +files and atomic replacement. Untouched files restore byte for byte; +unrelated edits and Deepzora startup migrations are merged and retained. +TOML comments and formatting can change during connection and after a merged +restoration. Manual changes to managed fields pause synchronization. Existing +uses of the reserved provider or credential name are refused. Do not edit +Deepzora's model settings while switching models. + +## Compatibility + +Verified on macOS with unmodified Magpie 0.1.3850 and Deepzora CLI v0.0.4 +against a local model fixture, including resident-host plugin disable. +The default paths target macOS/Linux with the shared global `config.toml` and +`.env`. On Windows or with custom `DEEPZORA_HOME`, install a local copy and +change the descriptor's `dir` and `config` to the same actual Deepzora data +directory. The bridge derives TOML and `.env` paths from the descriptor's +`config`; it cannot infer another process's environment. Native Windows +acceptance is not claimed. + +Do not enable this package and `github:SivanCola/magpie-agent-deepzora` at the +same time: they register the same Agent and manage the same files. To switch, +restore defaults and remove the standalone package first, then install this +package and select a model again. + +## Development + +```sh +bun test ./packages/deepzora +bun scripts/check.mjs deepzora +MAGPIE_BIN=/path/to/magpie DEEPZORA_BIN=/path/to/deepzora node packages/deepzora/acceptance.mjs +MAGPIE_BIN=/path/to/magpie node packages/deepzora/resident-acceptance.mjs +``` + +Acceptance uses disposable homes and a localhost model fixture. It installs +the actual package in Magpie, verifies model selection and restoration, and +optionally checks an unchanged Deepzora CLI sends the selected model and +exact assigned credential. No saved accounts or paid inference requests are +used. See [THIRD_PARTY.md](THIRD_PARTY.md) for code and asset attribution. + +## 中文 + +把 **Deepzora** 桌面版、CLI 和 ACP 加到 Magpie 的 Agent 页,ID 为 +`deepzora`。安装后选模型,保持 Magpie 运行并等待约一秒,再重启 Deepzora、 +新建会话。项目配置、CLI 参数和已有会话仍按各自优先级生效。 + +插件随包桥接 TOML 和独立 `.env`,保留原有供应商及无关设置,不修改原程序。 +网关密钥只写入全局 `.env`,不写入 TOML 或日志。解析库已随包提供, +无需额外下载依赖。备份包含原始凭据文件,请妥善保管。 + +卸载前先在 Agent 页恢复默认;仅用 CLI 时先执行上面的 `default` 和 +`plugin list --json` 两步。Magpie 运行期间正常关闭插件宿主会补做恢复; +强制终止后需要重新启用插件并断开。同步期间不要手工改动受管理的供应商、 +默认模型或凭据。Windows 和自定义目录请先按上述说明修改路径。 + +从独立 GitHub 插件迁移时,先恢复默认并卸载旧插件,再安装本包、重新选模型; +两个包不能同时启用。插件代码采用 MIT 许可,图标单独采用 AGPL-3.0-only, +解析库保留 BSD 许可,详见来源说明。 diff --git a/packages/deepzora/THIRD_PARTY.md b/packages/deepzora/THIRD_PARTY.md new file mode 100644 index 0000000..de5c2e6 --- /dev/null +++ b/packages/deepzora/THIRD_PARTY.md @@ -0,0 +1,38 @@ +# Source and licenses + +The Agent descriptor and original bridge are from +[SivanCola/magpie-agent-deepzora at a547f57](https://github.com/SivanCola/magpie-agent-deepzora/tree/a547f57), +MIT, copyright (c) 2026 SivanCola. See `LICENSE`. + +The host-exit restoration, reserved-credential protection, additional tests +and dependency bundling follow the existing MIT-licensed +[`reasonix-desktop` package at 907847b](https://github.com/magpie-community/plugins/tree/907847b/packages/reasonix-desktop). +The Deepzora provider fields, Agent ID and configuration paths remain +Deepzora-specific; it does not use the Reasonix adapter. + +The embedded PNG is Deepzora's unmodified 128 × 128 application icon, +AGPL-3.0-only. See `ASSET_NOTICE.md` for its exact source and brand policy, +and `LICENSE-ICON` for its license. This asset is separately licensed from +the plugin code. + +`vendor.mjs` bundles these exact parsers so this Agent needs no runtime +dependency installation or build scripts: + +- `smol-toml` 1.9.1, BSD-3-Clause (`LICENSE-SMOL-TOML`). +- `dotenv` 18.0.9, BSD-2-Clause (`LICENSE-DOTENV`). Only `parse` is exported; + the bridge never calls dotenv's environment-loading functions. + +The bundle is byte-identical to the existing `reasonix-desktop/vendor.mjs`. +To regenerate in this package folder with Bun 1.4.4: + +```sh +npm install --no-save --ignore-scripts --package-lock=false smol-toml@1.9.1 dotenv@18.0.9 +bun build vendor-entry.mjs --target=node --format=esm --minify --outfile=vendor.mjs +``` + +## 中文 + +Agent 入口与原始桥接来自独立 Deepzora 插件,补充保护与测试沿用社区已有的 +Reasonix 桥接模式,均保留 MIT 许可。图标采用单独的 AGPL-3.0-only 许可, +来源和品牌政策见 `ASSET_NOTICE.md`。TOML 和 dotenv 解析器以固定版本打包, +保留 BSD 许可;无需安装运行时依赖或执行构建脚本。 diff --git a/packages/deepzora/acceptance.mjs b/packages/deepzora/acceptance.mjs new file mode 100644 index 0000000..6bf6d6d --- /dev/null +++ b/packages/deepzora/acceptance.mjs @@ -0,0 +1,96 @@ +// Optional native acceptance. Everything uses disposable homes and a localhost +// model fixture: no user config, subscription credentials or paid model calls. +import assert from "node:assert/strict" +import fs from "node:fs" +import os from "node:os" +import path from "node:path" +import http from "node:http" +import { execFile } from "node:child_process" +import { promisify } from "node:util" +import { fileURLToPath } from "node:url" +import { parseTOML as parse, parseEnv } from "./vendor.mjs" + +const exec = promisify(execFile) +const root = fs.mkdtempSync(path.join(os.tmpdir(), "magpie-deepzora-native-")) +const repo = fileURLToPath(new URL(".", import.meta.url)) +const magpie = process.env.MAGPIE_BIN || "magpie" +const deepzora = process.env.DEEPZORA_BIN +const env = { ...process.env, HOME: root, USERPROFILE: root, XDG_CONFIG_HOME: path.join(root, ".config"), XDG_CACHE_HOME: path.join(root, ".cache"), XDG_STATE_HOME: path.join(root, ".state"), DEEPZORA_HOME: path.join(root, ".deepzora"), DEEPZORA_STATE_HOME: path.join(root, ".deepzora-state"), MAGPIE_NO_ACCOUNTS: "1" } +const dz = env.DEEPZORA_HOME +const config = path.join(dz, "config.toml") +const control = path.join(dz, "magpie-agent.json") +const run = async (bin, args) => exec(bin, args, { cwd: root, env, timeout: 120000, maxBuffer: 2 << 20 }) +let requests = 0 +let expectedKey = "" +const server = http.createServer(async (req, res) => { + let raw = "" + for await (const chunk of req) raw += chunk + if (req.method === "GET") { + res.setHeader("content-type", "application/json") + res.end(JSON.stringify({ object: "list", data: [{ id: "fixture/test-model", object: "model" }] })) + return + } + const body = JSON.parse(raw) + assert.equal(req.url, "/v1/chat/completions") + assert.equal(body.model, "fixture/test-model") + assert.equal(req.headers.authorization, `Bearer ${expectedKey}`) + requests++ + if (body.stream) { + res.setHeader("content-type", "text/event-stream") + res.end(`data: ${JSON.stringify({ id: "fixture", object: "chat.completion.chunk", choices: [{ index: 0, delta: { role: "assistant", content: "bridge-ok" }, finish_reason: null }] })}\n\ndata: ${JSON.stringify({ id: "fixture", object: "chat.completion.chunk", choices: [{ index: 0, delta: {}, finish_reason: "stop" }] })}\n\ndata: [DONE]\n\n`) + } else { + res.setHeader("content-type", "application/json") + res.end(JSON.stringify({ id: "fixture", object: "chat.completion", choices: [{ index: 0, message: { role: "assistant", content: "bridge-ok" }, finish_reason: "stop" }], usage: { prompt_tokens: 10, completion_tokens: 2, total_tokens: 12 } })) + } +}) + +try { + await new Promise(resolve => server.listen(0, "127.0.0.1", resolve)) + const base = `http://127.0.0.1:${server.address().port}/v1` + fs.mkdirSync(dz, { recursive: true }) + fs.mkdirSync(path.join(env.XDG_CONFIG_HOME, "magpie"), { recursive: true }) + const original = '# native acceptance fixture\ndefault_model="mine/model"\n[[providers]]\nname="mine"\nkind="openai"\nbase_url="http://127.0.0.1:49998/v1"\nmodels=["model"]\n' + fs.writeFileSync(config, original) + fs.writeFileSync(path.join(dz, ".env"), "OTHER_KEY=fixture-original\n") + fs.writeFileSync(path.join(env.XDG_CONFIG_HOME, "magpie/providers.json"), JSON.stringify({ providers: [{ id: "fixture", name: "Fixture", key: "fixture-only", chat: base, models: ["test-model"] }] })) + await run(magpie, ["plugin", "add", repo]) + const agents = await run(magpie, ["agents"]) + assert.match(agents.stdout, /Deepzora/) + await run(magpie, ["deepzora", "fixture/test-model"]) + // Loading the real plugin host executes the companion bridge. + const loaded = await run(magpie, ["plugin", "list", "--json"]) + assert.ok(!JSON.parse(loaded.stdout).loaded.some(plugin => plugin.error)) + assert.equal(parse(fs.readFileSync(config, "utf8")).default_model, "magpie-agent/fixture/test-model") + console.log("PASS: Magpie installs and discovers the agent; its plugin host bridges the selected model") + if (deepzora) { + expectedKey = parseEnv(fs.readFileSync(path.join(dz, ".env"))).MAGPIE_DEEPZORA_API_KEY + assert.ok(expectedKey) + // Keep Magpie's selected ID and assigned key. Redirect only the isolated + // control file to a local API fixture so no live gateway account is used. + const cfg = JSON.parse(fs.readFileSync(control, "utf8")) + cfg.baseURL = base + fs.writeFileSync(control, JSON.stringify(cfg)) + await run(process.execPath, [path.join(repo, "cli.mjs"), "sync"]) + const result = await run(deepzora, ["-p", "Reply with bridge-ok", "--output-format", "json"]) + assert.ok(requests > 0) + assert.match(result.stdout, /bridge-ok/) + console.log("PASS: unchanged Deepzora sends its selected model and assigned credential to the local API") + } + await run(magpie, ["deepzora", "default"]) + await run(process.execPath, [path.join(repo, "cli.mjs"), "sync"]) + if (deepzora) { + // Deepzora may migrate its config on startup; keep those unrelated edits. + const restored = parse(fs.readFileSync(config, "utf8")) + assert.equal(restored.default_model, "mine/model") + assert.deepEqual(restored.providers.map(p => p.name), ["mine"]) + assert.equal(restored.providers[0].base_url, "http://127.0.0.1:49998/v1") + } else { + assert.equal(fs.readFileSync(config, "utf8"), original) + } + assert.equal(fs.readFileSync(path.join(dz, ".env"), "utf8"), "OTHER_KEY=fixture-original\n") + console.log("PASS: disconnect restores selection and credentials, preserving unrelated Deepzora edits") +} finally { + server.closeAllConnections() + await new Promise(resolve => server.close(resolve)) + fs.rmSync(root, { recursive: true, force: true }) +} diff --git a/packages/deepzora/bridge.mjs b/packages/deepzora/bridge.mjs new file mode 100644 index 0000000..732ac70 --- /dev/null +++ b/packages/deepzora/bridge.mjs @@ -0,0 +1,217 @@ +import fs from "node:fs" +import os from "node:os" +import path from "node:path" +import { randomUUID } from "node:crypto" +import { isDeepStrictEqual } from "node:util" +import { parseTOML, stringify, parseEnv } from "./vendor.mjs" +import { agent } from "./deepzora.agent.js" + +export const PROVIDER = "magpie-agent" +export const KEY = "MAGPIE_DEEPZORA_API_KEY" +const active = new Map() +const parse = (text) => parseTOML(text || "", { integersAsBigInt: "asNeeded" }) + +export function pathsFor(home = os.homedir()) { + const control = agent.config.replace(/^~(?=\/|$)/, home) + if (!path.isAbsolute(control)) throw new Error("Agent config must name an absolute path or ~/ path") + const deepzora = path.dirname(control) + return { + control, + config: path.join(deepzora, "config.toml"), + env: path.join(deepzora, ".env"), + state: path.join(deepzora, ".magpie-bridge", "state.json"), + } +} + +function read(file) { + try { + const st = fs.lstatSync(file) + if (!st.isFile() || st.isSymbolicLink()) throw new Error("Bridge refuses non-regular files") + return fs.readFileSync(file, "utf8") + } catch (e) { + if (e.code === "ENOENT") return null + throw e + } +} + +function write(file, text) { + fs.mkdirSync(path.dirname(file), { recursive: true, mode: 0o700 }) + // Preserve the user's directory; all bridge-created files are private. + if (text === null) { + fs.rmSync(file, { force: true }) + return + } + const temp = path.join(path.dirname(file), `.magpie-${randomUUID()}.tmp`) + try { + fs.writeFileSync(temp, text, { mode: 0o600, flag: "wx" }) + fs.renameSync(temp, file) + } finally { + fs.rmSync(temp, { force: true }) + } +} + +function json(file) { + const raw = read(file) + return raw === null ? null : JSON.parse(raw) +} + +function lock(file) { + fs.mkdirSync(path.dirname(file), { recursive: true, mode: 0o700 }) + try { + fs.writeFileSync(file, String(process.pid), { mode: 0o600, flag: "wx" }) + } catch (e) { + if (e.code !== "EEXIST") throw e + const pid = Number(read(file)) + if (!Number.isSafeInteger(pid) || pid <= 0) throw new Error("Invalid bridge lock; inspect .magpie-bridge/lock") + try { process.kill(pid, 0) } catch (error) { + if (error.code !== "ESRCH") throw error + fs.unlinkSync(file) + return lock(file) + } + throw new Error("Another bridge operation is running") + } + return () => fs.unlinkSync(file) +} + +// A durable journal precedes every multi-file change. Recovery accepts only +// the exact before/after states; concurrent edits are never overwritten. +function recover(p) { + const journalPath = p.state + ".pending" + const journal = json(journalPath) + if (!journal) return + for (const change of journal.changes) { + if (![p.config, p.env].includes(change.file)) throw new Error("Invalid bridge journal target") + const current = read(change.file) + if (current !== change.before && current !== change.after) throw new Error("Bridge recovery paused: configuration changed; retain .magpie-bridge for recovery") + } + for (const change of journal.changes) if (read(change.file) !== change.after) write(change.file, change.after) + write(p.state, journal.state === null ? null : JSON.stringify(journal.state)) + fs.unlinkSync(journalPath) +} + +function commit(p, changes, state) { + for (const change of changes) { + if (read(change.file) !== change.before) throw new Error("Configuration changed during bridge update; retry") + } + write(p.state + ".pending", JSON.stringify({ changes, state })) + recover(p) +} + +function desired(control) { + if (!control?.gatewayKey && !control?.baseURL) return null + if (typeof control.model !== "string" || !control.model.trim() || typeof control.gatewayKey !== "string" || !control.gatewayKey || typeof control.baseURL !== "string") throw new Error("Incomplete Magpie connection; select its model again") + const url = new URL(control.baseURL) + if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || url.search || url.hash) throw new Error("Invalid Magpie gateway URL") + if (/[\r\n'\\]/.test(control.gatewayKey)) throw new Error("Unsupported gateway key encoding") + const entry = { + name: PROVIDER, display_name: "Magpie", kind: "openai", base_url: control.baseURL, + models: [control.model], default: control.model, api_key_env: KEY, + } + const info = control.modelInfo || {} + if (Number.isSafeInteger(info.context) && info.context > 0) entry.context_window = info.context + if (Number.isSafeInteger(info.output) && info.output > 0) entry.max_output_tokens = info.output + if (typeof info.images === "boolean") entry.model_overrides = { [control.model]: { vision: info.images } } + return { entry, key: control.gatewayKey, ref: `${PROVIDER}/${control.model}` } +} + +function patchKey(raw, value) { + const text = raw || "" + // Refuse ambiguous multiline assignments of the owned key instead of + // touching another credential's continuation lines. + const lines = text.split(/(?<=\n)/) + const pattern = new RegExp(`^\\s*(?:export\\s+)?${KEY}\\s*=`) + const found = lines.filter(line => pattern.test(line)) + if (found.length > 1) throw new Error("Duplicate bridge credential assignments") + if (found.length && parseEnv(found[0])[KEY] !== parseEnv(text)[KEY]) throw new Error("Multiline bridge credentials are unsupported") + const eol = text.includes("\r\n") ? "\r\n" : "\n" + const assignment = value === undefined ? "" : `${KEY}='${value}'${eol}` + if (found.length) return lines.map(line => pattern.test(line) ? assignment : line).join("") + return value === undefined ? text : text + (text && !text.endsWith("\n") ? eol : "") + assignment +} + +function assertOwned(cfg, env, state) { + const previous = parse(state.lastConfig) + if (!isDeepStrictEqual(cfg.providers?.find(p => p.name === PROVIDER), previous.providers?.find(p => p.name === PROVIDER))) throw new Error("Managed Magpie provider was edited; disconnect before reconnecting") + if (cfg.default_model !== previous.default_model) throw new Error("Default model was edited; disconnect before reconnecting") + if (parseEnv(env || "")[KEY] !== parseEnv(state.lastEnv || "")[KEY]) throw new Error("Bridge credential was edited; disconnect before reconnecting") +} + +function restoredConfig(config, state) { + if (config === state.lastConfig) return state.originalConfig + const cfg = parse(config) + const original = parse(state.originalConfig) + const previous = parse(state.lastConfig) + const entry = cfg.providers?.find(p => p.name === PROVIDER) + if (entry && !isDeepStrictEqual(entry, previous.providers?.find(p => p.name === PROVIDER))) throw new Error("Managed provider changed; restore it before disconnecting (backup retained)") + cfg.providers = (cfg.providers || []).filter(p => p.name !== PROVIDER) + if (!cfg.providers.length && !Object.hasOwn(original, "providers")) delete cfg.providers + if (cfg.default_model === previous.default_model) { + if (Object.hasOwn(original, "default_model")) cfg.default_model = original.default_model + else delete cfg.default_model + } + if (Array.isArray(cfg.desktop?.provider_access) && !original.desktop?.provider_access?.includes(PROVIDER)) cfg.desktop.provider_access = cfg.desktop.provider_access.filter(name => name !== PROVIDER) + return stringify(cfg) +} + +function restoredEnv(env, state) { + if (env === state.lastEnv) return state.originalEnv + const mine = parseEnv(state.lastEnv || "")[KEY] + return parseEnv(env || "")[KEY] === mine ? patchKey(env, parseEnv(state.originalEnv || "")[KEY]) : env +} + +export function syncBridge(p = pathsFor()) { + if (read(p.control) === null && read(p.state) === null && read(p.state + ".pending") === null) return "disconnected" + const unlock = lock(path.join(path.dirname(p.state), "lock")) + try { + recover(p) + const state = json(p.state) + const control = json(p.control) + const want = desired(control) + if (!want && !state) return "disconnected" + const config = read(p.config) + const env = read(p.env) + const cfg = parse(config) + if (want) { + if (state) assertOwned(cfg, env, state) + else { + if (cfg.providers?.some(entry => entry.name === PROVIDER)) throw new Error("Provider magpie-agent already exists; rename it before connecting") + if (Object.hasOwn(parseEnv(env || ""), KEY) || cfg.providers?.some(entry => entry.api_key_env === KEY)) throw new Error("Bridge credential name already belongs to existing configuration") + } + const next = { ...cfg, default_model: want.ref, providers: [...(cfg.providers || []).filter(entry => entry.name !== PROVIDER), want.entry] } + if (Array.isArray(cfg.desktop?.provider_access)) next.desktop = { ...cfg.desktop, provider_access: [...new Set([...cfg.desktop.provider_access, PROVIDER])] } + const nextConfig = isDeepStrictEqual(cfg, next) ? config : stringify(next) + const nextEnv = parseEnv(env || "")[KEY] === want.key ? env : patchKey(env, want.key) + if (state && config === nextConfig && env === nextEnv) return "connected" + const nextState = { + version: 1, + originalConfig: state ? restoredConfig(config, state) : config, + originalEnv: state ? restoredEnv(env, state) : env, + lastConfig: nextConfig, lastEnv: nextEnv, + } + commit(p, [{ file: p.env, before: env, after: nextEnv }, { file: p.config, before: config, after: nextConfig }], nextState) + return "connected" + } + const nextConfig = restoredConfig(config, state) + const nextEnv = restoredEnv(env, state) + commit(p, [{ file: p.config, before: config, after: nextConfig }, { file: p.env, before: env, after: nextEnv }], null) + return "disconnected" + } finally { unlock() } +} + +export function startBridge(p = pathsFor(), { interval = 750, onError = () => console.error("Deepzora bridge paused; run magpie-deepzora sync for details (configuration retained).") } = {}) { + if (active.has(p.state)) return active.get(p.state) + let previousError = "" + const tick = () => { + try { syncBridge(p); previousError = "" } catch (error) { + // Parser errors can contain a source line; never write those to logs. + if (error.message !== previousError) onError() + previousError = error.message + } + } + tick() + const timer = setInterval(tick, interval) + timer.unref?.() + const stop = () => { clearInterval(timer); active.delete(p.state) } + active.set(p.state, stop) + return stop +} diff --git a/packages/deepzora/cli.mjs b/packages/deepzora/cli.mjs new file mode 100644 index 0000000..a3d9a99 --- /dev/null +++ b/packages/deepzora/cli.mjs @@ -0,0 +1,12 @@ +#!/usr/bin/env node +import { syncBridge } from "./bridge.mjs" + +if (!process.argv[2] || process.argv[2] === "sync") { + try { console.log(`Deepzora bridge: ${syncBridge()}`) } catch { + console.error("Deepzora bridge could not synchronize. Check JSON/TOML syntax, reserved provider/credential conflicts, file permissions and .magpie-bridge recovery files. Source contents and keys are omitted.") + process.exitCode = 1 + } +} else { + console.error("Usage: magpie-deepzora sync") + process.exitCode = 2 +} diff --git a/packages/deepzora/deepzora.agent.js b/packages/deepzora/deepzora.agent.js new file mode 100644 index 0000000..60c0857 --- /dev/null +++ b/packages/deepzora/deepzora.agent.js @@ -0,0 +1,28 @@ +// This module runs in Magpie's JS sandbox: no Node APIs or external imports. +// The companion plugin host bridges this JSON to existing Deepzora releases. +export const agent = { + id: "deepzora", + name: "Deepzora", + // Official 128px app icon, embedded for offline rendering; see ASSET_NOTICE.md. + icon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAABSB0lEQVR42u29ebhtV1Un+htzzrXW3vv0t2/TdyQhRELoFMgVFbF5BWJ4CL6yUHxY9i1VXykVqEYEffpZWj61kALqETEIEZSyp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6j72Z3v6NjQ1obUqy1QMR6QfwtEJoLEXTbHOaNqaGWlrXJhxr84BuGkDzfG0sDE2La1qi8S0NqcHs5RZSLXNLzBD1fbBhZiOlVPPzc+gPhifKUr/xwKVP++/NNfmaG0ATyHjwwb/e2Uu6P0vEr5/tzSwMhiPkea7dzymsKG518sXn7aSodxv0HvIBmbco04Z4O017D9wyEaYl86DQ6poeppn+UoMOQK1C0dyM9Vxm5290mqay1+1iczBYA+h3MKZf2XfVVWcnAKW/LwNoIoYA8Mgj916ckXwdYF7TyTqXCkEYjccY5wU7lUA/dIXAYVYVBDbU0BcOPUcIA/MEX3ZCzIomO1paxp9gYgj1tCyjNainFg0ljiv3TYOLpo9U0Im9aHK9asawzLKUut0OtNYYjcbHIOg9pPXb91123WPNe/+VfnzVBtAGa546ddeMGaXfwozvYvALhRAX9bodAAStNcqyhNbaTgSjZp0tVKmLe9+IgqFJIXiDuHLGzdCvoXZGiGHX8FjgUOPACVlxBPa0HSEtoBFaavRTwAkhCFJKSKmglAVnB8MhtDaPE/BJInxAdPKP7N17Y78VRv4qPtTfhQH4N3LbbbfhlltuUe6N3gngzlOnTs2gXL9+Y3PzJgA3sOErjOE9zLzI4G44x62RbAU5dSNHt+NF7C7zLT3Vh2kUzWr1auYpnc0RF6uuCXhvw6Gs21OZq3gBjVYiUdsrawbEUAixSnJ8WkIchaAvSSW/oNKle/bu3dsPA/AjR46UfxcL/3fqAaZ5hK2s9MRf/VUv3y5TISRhDXHPcvP7f8IfxmhOz+t8/7OeNfhK7+U/OgNoXsD73vc+7Ny5U7kCU/m1uJB/Ch/M7AmbOHv2bHnrrbfia32v6B/yYv/5A1/T3f1UPv5/3c97cc83D+gAAAAASUVORK5CYII=", + bin: "deepzora", + dir: "~/.deepzora", + config: "~/.deepzora/magpie-agent.json", + format: "json", + model: "model", + ua: ["deepzora"], + notice: "Wait a moment for the bridge, restart Deepzora, then start a new conversation. 等待桥接完成,重启 Deepzora 并新建会话。", +} + +export function connect({ gateway, model }) { + if (!model?.id || !gateway?.v1 || !gateway?.key) throw new Error("Choose a model with a configured Magpie gateway first.") + return { + baseURL: gateway.v1, + gatewayKey: gateway.key, + modelInfo: { + context: model.context > 0 ? model.context : 0, + output: model.output > 0 ? model.output : 0, + ...(typeof model.images === "boolean" ? { images: model.images } : {}), + }, + } +} diff --git a/packages/deepzora/deepzora.test.mjs b/packages/deepzora/deepzora.test.mjs new file mode 100644 index 0000000..c988e9d --- /dev/null +++ b/packages/deepzora/deepzora.test.mjs @@ -0,0 +1,237 @@ +import assert from "node:assert/strict" +import fs from "node:fs" +import os from "node:os" +import path from "node:path" +import { test } from "node:test" +import { spawnSync } from "node:child_process" +import { parseTOML as parse, stringify, parseEnv } from "./vendor.mjs" +import { PROVIDER, KEY, syncBridge, startBridge } from "./bridge.mjs" +import { agent, connect } from "./deepzora.agent.js" + +const originalConfig = `# User's comments and preferences +config_version = 12 +default_model = "mine/model" +[agent] +compact_ratio = 0.8 +[desktop] +provider_access = ["mine"] +[[providers]] +name = "mine" +kind = "openai" +base_url = "http://127.0.0.1:9999/v1" +models = ["model"] +api_key_env = "MY_API_KEY" +` +const originalEnv = "# existing secret\r\nMY_API_KEY=fixture-original\r\n" + +function fixture(t) { + const root = fs.mkdtempSync(path.join(os.tmpdir(), "magpie-deepzora-")) + t.after(() => fs.rmSync(root, { recursive: true, force: true })) + const p = { control: path.join(root, "magpie-agent.json"), config: path.join(root, "config.toml"), env: path.join(root, ".env"), state: path.join(root, ".magpie-bridge/state.json") } + fs.writeFileSync(p.config, originalConfig) + fs.writeFileSync(p.env, originalEnv) + const select = (id = "vendor/model-v1", key = "fixture-gateway-key") => { + const model = { id, context: 200000, output: 16000, images: true } + fs.writeFileSync(p.control, JSON.stringify({ model: id, ...connect({ model, gateway: { v1: "http://127.0.0.1:3425/v1", key } }) })) + } + return { p, select, disconnect: () => fs.writeFileSync(p.control, "{}") } +} + +test("agent descriptor and sandbox hook expose one selected model", () => { + assert.equal(agent.id, "deepzora") + assert.equal(agent.format, "json") + assert.equal(agent.model, "model") + assert.throws(() => connect({ gateway: {} }), /Choose a model/) +}) + +test("connect, switch, restart bridge, disconnect restores exact original bytes", t => { + const { p, select, disconnect } = fixture(t) + select() + assert.equal(syncBridge(p), "connected") + let cfg = parse(fs.readFileSync(p.config, "utf8")) + assert.equal(cfg.default_model, "magpie-agent/vendor/model-v1") + assert.equal(cfg.providers.length, 2) + assert.deepEqual(cfg.providers[0], parse(originalConfig).providers[0]) + assert.equal(cfg.providers[1].model_overrides["vendor/model-v1"].vision, true) + assert.deepEqual(cfg.desktop.provider_access, ["mine", PROVIDER]) + const env = parseEnv(fs.readFileSync(p.env)) + assert.equal(env.MY_API_KEY, "fixture-original") + assert.equal(env[KEY], "fixture-gateway-key") + assert.ok(!fs.readFileSync(p.config, "utf8").includes("fixture-gateway-key")) + if (process.platform !== "win32") { + for (const file of [p.state, p.control, p.config, p.env]) { + if (file === p.control) continue // Magpie owns that file's permissions. + assert.equal(fs.statSync(file).mode & 0o777, 0o600) + } + } + const before = fs.statSync(p.config).mtimeMs + assert.equal(syncBridge(p), "connected") + assert.equal(fs.statSync(p.config).mtimeMs, before) + select("vendor/model-v2", "fixture-key-2") + assert.equal(syncBridge(p), "connected") + cfg = parse(fs.readFileSync(p.config, "utf8")) + assert.equal(cfg.default_model, "magpie-agent/vendor/model-v2") + assert.equal(cfg.providers.length, 2) + disconnect() + assert.equal(syncBridge(p), "disconnected") + assert.equal(fs.readFileSync(p.config, "utf8"), originalConfig) + assert.equal(fs.readFileSync(p.env, "utf8"), originalEnv) + assert.ok(!fs.existsSync(p.state)) +}) + +test("first installation and disconnect leave originally absent files absent", t => { + const { p, select, disconnect } = fixture(t) + fs.unlinkSync(p.config) + fs.unlinkSync(p.env) + select() + syncBridge(p) + disconnect() + syncBridge(p) + assert.ok(!fs.existsSync(p.config)) + assert.ok(!fs.existsSync(p.env)) +}) + +test("unrelated edits during connection survive switching and disconnect", t => { + const { p, select, disconnect } = fixture(t) + select() + syncBridge(p) + const cfg = parse(fs.readFileSync(p.config, "utf8")) + cfg.language = "zh" + fs.writeFileSync(p.config, stringify(cfg)) + fs.appendFileSync(p.env, "NEW_SECRET=fixture-new\n") + select("p/new") + syncBridge(p) + disconnect() + syncBridge(p) + assert.equal(parse(fs.readFileSync(p.config, "utf8")).language, "zh") + assert.equal(parseEnv(fs.readFileSync(p.env)).NEW_SECRET, "fixture-new") + assert.equal(parseEnv(fs.readFileSync(p.env)).MY_API_KEY, "fixture-original") + assert.ok(!Object.hasOwn(parseEnv(fs.readFileSync(p.env)), KEY)) +}) + +test("manual default and key edits are not overwritten", t => { + const { p, select, disconnect } = fixture(t) + select() + syncBridge(p) + const cfg = parse(fs.readFileSync(p.config, "utf8")) + cfg.default_model = "mine/other" + fs.writeFileSync(p.config, stringify(cfg)) + fs.appendFileSync(p.env, `${KEY}=manual-key\n`) + assert.throws(() => syncBridge(p), /Default model was edited/) + disconnect() + syncBridge(p) + assert.equal(parse(fs.readFileSync(p.config, "utf8")).default_model, "mine/other") + assert.equal(parseEnv(fs.readFileSync(p.env))[KEY], "manual-key") +}) + +test("a conflicting provider is refused without writes", t => { + const { p, select } = fixture(t) + fs.writeFileSync(p.config, `[[providers]]\nname="${PROVIDER}"\nmodels=["manual"]\n`) + const before = fs.readFileSync(p.config, "utf8") + select() + assert.throws(() => syncBridge(p), /already exists/) + assert.equal(fs.readFileSync(p.config, "utf8"), before) + assert.equal(fs.readFileSync(p.env, "utf8"), originalEnv) +}) + +test("existing bridge-named credentials and references are never taken over", t => { + const { p, select } = fixture(t) + select() + const conflict = originalEnv + `${KEY}=fixture-user-key\n` + fs.writeFileSync(p.env, conflict) + assert.throws(() => syncBridge(p), /credential name already belongs/) + assert.equal(fs.readFileSync(p.config, "utf8"), originalConfig) + assert.equal(fs.readFileSync(p.env, "utf8"), conflict) + fs.writeFileSync(p.env, originalEnv) + const cfg = parse(originalConfig) + cfg.providers[0].api_key_env = KEY + const referenced = stringify(cfg) + fs.writeFileSync(p.config, referenced) + assert.throws(() => syncBridge(p), /credential name already belongs/) + assert.equal(fs.readFileSync(p.config, "utf8"), referenced) + assert.equal(fs.readFileSync(p.env, "utf8"), originalEnv) +}) + +test("invalid TOML and incomplete connection do not touch configuration or credentials", t => { + const { p, select } = fixture(t) + select() + fs.writeFileSync(p.config, "default_model = [broken") + assert.throws(() => syncBridge(p)) + assert.equal(fs.readFileSync(p.env, "utf8"), originalEnv) + assert.ok(!fs.existsSync(p.state)) + fs.writeFileSync(p.config, originalConfig) + fs.writeFileSync(p.control, JSON.stringify({ baseURL: "http://localhost/v1" })) + assert.throws(() => syncBridge(p), /Incomplete/) + assert.equal(fs.readFileSync(p.config, "utf8"), originalConfig) +}) + +test("interrupted journal recovers, but external edits stop recovery before writes", t => { + const { p, select } = fixture(t) + select() + syncBridge(p) + const state = JSON.parse(fs.readFileSync(p.state, "utf8")) + const nextEnv = state.lastEnv + "EXTRA=ok\n" + const pending = { state: { ...state, lastEnv: nextEnv }, changes: [{ file: p.env, before: state.lastEnv, after: nextEnv }, { file: p.config, before: state.originalConfig, after: state.lastConfig }] } + fs.writeFileSync(p.state + ".pending", JSON.stringify(pending)) + fs.writeFileSync(p.env, nextEnv) + syncBridge(p) + assert.ok(!fs.existsSync(p.state + ".pending")) + fs.writeFileSync(p.state + ".pending", JSON.stringify(pending)) + fs.writeFileSync(p.config, "language='changed'\n") + assert.throws(() => syncBridge(p), /recovery paused/) + assert.equal(fs.readFileSync(p.config, "utf8"), "language='changed'\n") +}) + +test("symlinked target is refused", { skip: process.platform === "win32" }, t => { + const { p, select } = fixture(t) + fs.renameSync(p.config, p.config + ".real") + fs.symlinkSync(p.config + ".real", p.config) + select() + assert.throws(() => syncBridge(p), /non-regular/) + assert.equal(fs.readFileSync(p.config + ".real", "utf8"), originalConfig) +}) + +test("polling bridge follows selection and shuts down cleanly", async t => { + const { p, select, disconnect } = fixture(t) + let errors = 0 + const stop = startBridge(p, { interval: 20, onError: () => errors++ }) + t.after(stop) + select() + await new Promise(resolve => setTimeout(resolve, 80)) + assert.equal(parse(fs.readFileSync(p.config, "utf8")).default_model, "magpie-agent/vendor/model-v1") + disconnect() + await new Promise(resolve => setTimeout(resolve, 80)) + assert.equal(fs.readFileSync(p.config, "utf8"), originalConfig) + assert.equal(errors, 0) +}) + +test("normal host exit flushes a disconnect and leaves an active connection configured", t => { + const plugin = new URL("./index.mjs", import.meta.url).href + for (const disconnect of [true, false]) { + const home = fs.mkdtempSync(path.join(os.tmpdir(), "deepzora-host-exit-")) + t.after(() => fs.rmSync(home, { recursive: true, force: true })) + const dir = path.join(home, ".deepzora") + fs.mkdirSync(dir) + const config = path.join(dir, "config.toml") + const envFile = path.join(dir, ".env") + const control = path.join(dir, "magpie-agent.json") + fs.writeFileSync(config, originalConfig) + fs.writeFileSync(envFile, originalEnv) + fs.writeFileSync(control, JSON.stringify({ model: "fixture/model", baseURL: "http://127.0.0.1:3425/v1", gatewayKey: "fixture-assigned-key" })) + const result = spawnSync(process.execPath, ["--input-type=module", "-e", ` + import fs from "node:fs"; + import plugin from ${JSON.stringify(plugin)}; + await plugin(); + ${disconnect ? `fs.writeFileSync(${JSON.stringify(control)}, "{}");` : ""} + process.exit(0); + `], { env: { ...process.env, HOME: home, USERPROFILE: home }, timeout: 10000, encoding: "utf8" }) + assert.equal(result.status, 0, result.stderr) + if (disconnect) { + assert.equal(fs.readFileSync(config, "utf8"), originalConfig) + assert.equal(fs.readFileSync(envFile, "utf8"), originalEnv) + } else { + assert.equal(parse(fs.readFileSync(config, "utf8")).default_model, "magpie-agent/fixture/model") + assert.equal(parseEnv(fs.readFileSync(envFile))[KEY], "fixture-assigned-key") + } + } +}) diff --git a/packages/deepzora/index.mjs b/packages/deepzora/index.mjs new file mode 100644 index 0000000..8e08477 --- /dev/null +++ b/packages/deepzora/index.mjs @@ -0,0 +1,22 @@ +import { pathsFor, startBridge, syncBridge } from "./bridge.mjs" + +const instance = Symbol.for("magpie.deepzora.bridge.v1") + +// The Agent entry runs in moejs; this companion runs in the shared Bun host +// because current Magpie cannot edit TOML and a separate dotenv file there. +export default async function DeepzoraBridgePlugin() { + if (!globalThis[instance]) { + const paths = pathsFor() + const stop = startBridge(paths) + globalThis[instance] = { stop } + // Magpie restores the control JSON before closing the host on disable or + // removal. Flush it synchronously on normal exit, without taking over the + // shared host's signals or terminating other plugins. + process.once("exit", () => { + try { syncBridge(paths) } catch { + console.error("Deepzora bridge restoration paused; configuration and recovery files retained.") + } + }) + } + return {} +} diff --git a/packages/deepzora/package.json b/packages/deepzora/package.json new file mode 100644 index 0000000..1644599 --- /dev/null +++ b/packages/deepzora/package.json @@ -0,0 +1,48 @@ +{ + "name": "@magpie-community/agent-deepzora", + "version": "0.1.0", + "description": "Deepzora Desktop, CLI and ACP as a Magpie agent, with a reversible TOML and dotenv configuration bridge", + "type": "module", + "main": "./index.mjs", + "files": [ + "index.mjs", + "deepzora.agent.js", + "bridge.mjs", + "vendor.mjs", + "cli.mjs", + "README.md", + "THIRD_PARTY.md", + "LICENSE", + "LICENSE-ICON", + "ASSET_NOTICE.md", + "LICENSE-DOTENV", + "LICENSE-SMOL-TOML" + ], + "bin": { + "magpie-deepzora": "./cli.mjs" + }, + "scripts": { + "test": "node --test deepzora.test.mjs", + "check": "node --check bridge.mjs && node --check index.mjs && node --check deepzora.agent.js && node --check cli.mjs" + }, + "engines": { + "node": ">=20" + }, + "keywords": [ + "magpie", + "magpie-plugin", + "magpie-agent", + "deepzora" + ], + "license": "MIT AND AGPL-3.0-only AND BSD-2-Clause AND BSD-3-Clause", + "repository": { + "type": "git", + "url": "git+https://github.com/magpie-community/plugins.git", + "directory": "packages/deepzora" + }, + "magpie": { + "name": "Deepzora", + "agent": "./deepzora.agent.js", + "icon": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAABSB0lEQVR42u29ebhtV1Un+htzzrXW3vv0t2/TdyQhRELoFMgVFbF5BWJ4CL6yUHxY9i1VXykVqEYEffpZWj61kALqETEIEZS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X6j72Z3v6NjQ1obUqy1QMR6QfwtEJoLEXTbHOaNqaGWlrXJhxr84BuGkDzfG0sDE2La1qi8S0NqcHs5RZSLXNLzBD1fbBhZiOlVPPzc+gPhifKUr/xwKVP++/NNfmaG0ATyHjwwb/e2Uu6P0vEr5/tzSwMhiPkea7dzymsKG518sXn7aSodxv0HvIBmbco04Z4O017D9wyEaYl86DQ6poeppn+UoMOQK1C0dyM9Vxm5290mqay1+1iczBYA+h3MKZf2XfVVWcnAKW/LwNoIoYA8Mgj916ckXwdYF7TyTqXCkEYjccY5wU7lUA/dIXAYVYVBDbU0BcOPUcIA/MEX3ZCzIomO1paxp9gYgj1tCyjNainFg0ljiv3TYOLpo9U0Im9aHK9asawzLKUut0OtNYYjcbHIOg9pPXb91123WPNe/+VfnzVBtAGa546ddeMGaXfwozvYvALhRAX9bodAAStNcqyhNbaTgSjZp0tVKmLe9+IgqFJIXiDuHLGzdCvoXZGiGHX8FjgUOPACVlxBPa0HSEtoBFaavRTwAkhCFJKSKmglAVnB8MhtDaPE/BJInxAdPKP7N17Y78VRv4qPtTfhQH4N3LbbbfhlltuUe6N3gngzlOnTs2gXL9+Y3PzJgA3sOErjOE9zLzI4G44x62RbAU5dSNHt+NF7C7zLT3Vh2kUzWr1auYpnc0RF6uuCXhvw6Gs21OZq3gBjVYiUdsrawbEUAixSnJ8WkIchaAvSSW/oNKle/bu3dsPA/AjR46UfxcL/3fqAaZ5hK2s9MRf/VUv3y5TISRhDXHPcvP7f8IfxmhOz+t8/7OeNfhK7+U/OgNoXsD73vc+7Ny5U7kCU/m1uJB/Ch/M7AmbOHv2bHnrrbfia32v6B/yYv/5A1/T3f1UPv5/3c97cc83D+gAAAAASUVORK5CYII=" + } +} diff --git a/packages/deepzora/resident-acceptance.mjs b/packages/deepzora/resident-acceptance.mjs new file mode 100644 index 0000000..3119663 --- /dev/null +++ b/packages/deepzora/resident-acceptance.mjs @@ -0,0 +1,67 @@ +// Exercise normal plugin disable in a real resident Magpie host. No accounts, +// real agent configuration, or inference requests are used. +import assert from "node:assert/strict" +import fs from "node:fs" +import os from "node:os" +import path from "node:path" +import net from "node:net" +import { spawn, execFile } from "node:child_process" +import { promisify } from "node:util" +import { fileURLToPath } from "node:url" +import { parseTOML } from "./vendor.mjs" + +const exec = promisify(execFile) +const root = fs.mkdtempSync(path.join(os.tmpdir(), "deepzora-resident-")) +const repo = path.resolve(fileURLToPath(new URL(".", import.meta.url))) +const magpie = process.env.MAGPIE_BIN || "magpie" +const probe = net.createServer() +await new Promise(resolve => probe.listen(0, "127.0.0.1", resolve)) +const port = probe.address().port +await new Promise(resolve => probe.close(resolve)) +const addr = `127.0.0.1:${port}` +const env = { ...process.env, HOME: root, USERPROFILE: root, XDG_CONFIG_HOME: path.join(root, ".config"), XDG_CACHE_HOME: path.join(root, ".cache"), XDG_STATE_HOME: path.join(root, ".state"), DEEPZORA_HOME: path.join(root, ".deepzora"), DEEPZORA_STATE_HOME: path.join(root, ".deepzora-state"), MAGPIE_NO_ACCOUNTS: "1", MAGPIE_ADDR: addr } +const dir = env.DEEPZORA_HOME +const config = path.join(dir, "config.toml") +const credentials = path.join(dir, ".env") +const original = '# resident fixture\ndefault_model = "mine/model"\n' +const run = args => exec(magpie, args, { cwd: root, env, timeout: 120000, maxBuffer: 2 << 20 }) +const until = async predicate => { + const deadline = Date.now() + 20000 + while (Date.now() < deadline) { + if (await predicate()) return + await new Promise(resolve => setTimeout(resolve, 100)) + } + throw new Error("Resident Magpie did not complete the expected state transition") +} +let child +let closed +try { + fs.mkdirSync(dir, { recursive: true }) + fs.mkdirSync(path.join(env.XDG_CONFIG_HOME, "magpie"), { recursive: true }) + fs.writeFileSync(config, original) + fs.writeFileSync(credentials, "OTHER_KEY=fixture-original\n") + fs.writeFileSync(path.join(env.XDG_CONFIG_HOME, "magpie/providers.json"), JSON.stringify({ providers: [{ id: "fixture", name: "Fixture", key: "fixture-only", chat: "http://127.0.0.1:9/v1", models: ["model"] }] })) + await run(["plugin", "add", repo]) + await run(["deepzora", "fixture/model"]) + child = spawn(magpie, ["serve"], { cwd: root, env, stdio: "ignore" }) + closed = new Promise(resolve => child.once("exit", resolve)) + await until(async () => { + try { return (await fetch(`http://${addr}/api/hello`, { signal: AbortSignal.timeout(500) })).ok } catch { return false } + }) + await fetch(`http://${addr}/v1/models`, { signal: AbortSignal.timeout(10000) }) + await until(() => parseTOML(fs.readFileSync(config, "utf8")).default_model === "magpie-agent/fixture/model") + await run(["plugin", "off", repo]) + // Refreshing the catalog observes plugins.json and closes the old host. + await fetch(`http://${addr}/v1/models`, { signal: AbortSignal.timeout(10000) }) + await until(() => fs.readFileSync(config, "utf8") === original) + assert.equal(fs.readFileSync(credentials, "utf8"), "OTHER_KEY=fixture-original\n") + console.log("PASS: disabling the plugin with resident Magpie restores TOML and credentials without a manual sync") +} finally { + if (child && child.exitCode === null) { + child.kill("SIGTERM") + const timer = setTimeout(() => child.kill("SIGKILL"), 3000) + await closed + clearTimeout(timer) + } + fs.rmSync(root, { recursive: true, force: true }) +} diff --git a/packages/deepzora/vendor-entry.mjs b/packages/deepzora/vendor-entry.mjs new file mode 100644 index 0000000..893c2a5 --- /dev/null +++ b/packages/deepzora/vendor-entry.mjs @@ -0,0 +1,3 @@ +// Regenerate vendor.mjs with Bun 1.4.4; see THIRD_PARTY.md. +export { parse as parseTOML, stringify } from "smol-toml" +export { parse as parseEnv } from "dotenv" diff --git a/packages/deepzora/vendor.mjs b/packages/deepzora/vendor.mjs new file mode 100644 index 0000000..bcf3f67 --- /dev/null +++ b/packages/deepzora/vendor.mjs @@ -0,0 +1,255 @@ +import{createRequire as _e}from"node:module";var ke=Object.create;var{getPrototypeOf:De,defineProperty:pe,getOwnPropertyNames:$e}=Object;var de=Object.prototype.hasOwnProperty;function Se(e){return this[e]}var Ie,Ne,qe=(e,r,i)=>{var o=e!=null&&typeof e==="object";if(o){var l=r?Ie??=new WeakMap:Ne??=new WeakMap,n=l.get(e);if(n)return n}i=e!=null?ke(De(e)):{};let t=r||!e||!e.__esModule||!de.call(e,"default")?pe(i,"default",{value:e,enumerable:!0}):i;if(e&&typeof e==="object"||typeof e==="function"){for(let f of $e(e))if(!de.call(t,f))pe(t,f,{get:Se.bind(e,f),enumerable:!0})}if(o)l.set(e,t);return t};var Pe=(e,r)=>()=>(r||e((r={exports:{}}).exports,r),r.exports);var P=_e(import.meta.url);var Oe=Pe(function(kr,Q){var ne=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(i){throw r=0,i}},ye=ne((e,r)=>{function i(l){return typeof l=="string"?!["false","0","no","off",""].includes(l.toLowerCase()):!!l}function o(l=process.env){let n={};for(let t of["ENCODING","PATH","QUIET","DEBUG","OVERRIDE","FAST"]){let f=l[`DOTENV_${t}`]!=null?l[`DOTENV_${t}`]:l[`DOTENV_CONFIG_${t}`];f!=null&&(n[t.toLowerCase()]=t==="ENCODING"||t==="PATH"?f:i(f))}return n}r.exports={parseBoolean:i,optionsFromEnv:o}}),Ee=ne((e,r)=>{var i=P("fs"),o=P("path"),l=P("os"),{URL:n,fileURLToPath:t}=P("url"),{parseBoolean:f,optionsFromEnv:v}=ye(),h=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg,p=new Uint8Array(256);for(let s=48;s<=57;s++)p[s]=1;for(let s=65;s<=90;s++)p[s]=1;for(let s=97;s<=122;s++)p[s]=1;p[45]=1,p[46]=1,p[95]=1;function c(s){let g={},a=s.toString();a=a.replace(/\r\n?/mg,` +`);let C;for(;(C=h.exec(a))!=null;){let u=C[1],y=C[2]||"";y=y.trim();let E=y[0];y=y.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),E==='"'&&(y=y.replace(/\\n/g,` +`),y=y.replace(/\\r/g,"\r")),g[u]=y}return g}function m(s){return s<=32?s===32||s>=9&&s<=13:s>=160&&(s===160||s===5760||s>=8192&&s<=8202||s===8232||s===8233||s===8239||s===8287||s===12288||s===65279)}function b(s){return s===10||s===8232||s===8233}function k(s){let g={},a=typeof s=="string"?s:s.toString();a.indexOf("\r")!==-1&&(a=a.replace(/\r\n?/g,` +`));let C=a.length,u=0;for(;u=C)break;if(y===35){for(;u=C&&(G=0),m(G))do u++,G=uU)&&(O=U);else for(O=L;Oj&&m(a.charCodeAt(B-1));)B--;let K=a.charCodeAt(j);if(q=a.slice(j,B),q.includes("\u2028")||q.includes("\u2029")?q=q.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"):B-j>=2&&(K===39||K===34||K===96)&&a.charCodeAt(B-1)===K&&(q=a.slice(j+1,B-1)),u=O,O{var i=P("child_process"),o=P("fs"),l=P("path");function n(p){let c=['"'],m=0;for(let b of p){if(b==="\\"){m++;continue}b==='"'?c.push("\\".repeat(m*2+1),'"'):c.push("\\".repeat(m),b),m=0}return c.push("\\".repeat(m*2),'"'),c.join("")}function t(p,c=1){for(let m=0;m=48&&A<=57||A>=65&&A<=90||A>=97&&A<=122,w="\\/:._-".includes(k);!T&&!w&&A<128&&b.push("^"),b.push(k)}p=b.join("")}return p}function f(p,c){let m=Object.keys(p).reverse().find((b)=>b.toUpperCase()===c);return m===void 0?void 0:p[m]}function v(p,c,m){let b=(f(c,"PATHEXT")||".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean),k=b.some((T)=>p.toLowerCase().endsWith(T.toLowerCase()))?["",...b]:[...b,""],A=/[\\/]/.test(p)?[m]:[m,...(f(c,"PATH")||"").split(";")];for(let T of A)for(let w of k){let S=l.resolve(m,T.replace(/^"|"$/g,""),p+w);try{if(o.statSync(S).isFile())return S}catch{}}}function h(p,c,m){if(process.platform!=="win32")return i.spawn(p,c,m);let b=m.env||process.env,k=v(p,b,m.cwd||process.cwd());if(k&&/\.(?:exe|com)$/i.test(k))return i.spawn(k,c,m);let A=/\.(?:bat|cmd)$/i.test(k||p),T=[t(l.normalize(k||p))];for(let S of c)T.push(t(n(S),A?2:1));let w=T.join(" ");return i.spawn(f(b,"COMSPEC")||"cmd.exe",["/d","/v:off","/s","/c",`"${w}"`],{...m,windowsVerbatimArguments:!0})}r.exports=h}),Ke=ne((e,r)=>{var i=P("fs"),o=P("os"),l=P("path"),n=P("child_process"),t=He(),f=Ee(),{optionsFromEnv:v}=ye();function h(){console.log(["Usage: dotenv run [--help] [-q|--quiet] [--debug] [--override] [--fast] [-f|--file ] [--] [args...]","","Run a command with environment variables from a .env file.","Place dotenv options before the command; all following arguments go to the command.","","Options:"," -f, --file .env paths, comma-separated or repeated (default: .env)"," -q, --quiet suppress the injected env message"," --debug enable debug logging"," --override override existing environment variables"," --fast use the faster character-scanner parser","","Environment variables (DOTENV_CONFIG_* names remain as fallbacks):"," DOTENV_PATH, DOTENV_ENCODING, DOTENV_QUIET,"," DOTENV_DEBUG, DOTENV_OVERRIDE,"," DOTENV_FAST"].join(` +`))}function p(A){let T=[],w=!1,S,V,M,D,F=-1;for(let s=0;sE.trim()).filter(Boolean);if(y.length===0)return{error:`${C} requires a path`};T.push(...y),w=!0;continue}if(g.startsWith("-"))return{error:`unknown option: ${g}`};F=s;break}let I=F===-1?[]:A.slice(F);return{paths:T,pathSet:w,quiet:S,debug:V,override:M,fast:D,command:I}}function c(A){return A[0]==="~"?l.join(o.homedir(),A.slice(1)):A}function m(A){let T=v(),w={encoding:T.encoding||"utf8",quiet:T.quiet,debug:T.debug===!0,override:T.override===!0,fast:T.fast===!0,paths:[".env"],defaultPath:!0};return T.path&&(w.paths=[T.path],w.defaultPath=!1),A.pathSet&&(w.paths=A.paths,w.defaultPath=!1),A.quiet!=null&&(w.quiet=A.quiet),A.debug!=null&&(w.debug=A.debug),A.override!=null&&(w.override=A.override),A.fast!=null&&(w.fast=A.fast),w}function b(A){let T={},w=[],S={override:A.override,debug:A.debug};for(let V of A.paths){let M=l.resolve(process.cwd(),c(V));try{let D=f.parse(i.readFileSync(M,{encoding:A.encoding}),{fast:A.fast});f.populate(T,D,S),w.push(V)}catch(D){if(A.debug&&console.log(`┆ failed to load ${V} ${D.message}`),!(A.defaultPath&&D.code==="ENOENT"))throw D}}return{injected:f.populate(process.env,T,S),loadedPaths:w}}function k(A){let T=A[0];if(T==="--help"||T==="-h"){h();return}if(T!=="run"){h(),process.exitCode=1;return}let w=p(A.slice(1));if(w.help){h();return}if(w.error){console.error(`dotenv: ${w.error}`),h(),process.exitCode=1;return}if(w.command.length===0){h(),process.exitCode=1;return}let S=m(w);try{let a=b(S);if(!(S.quiet==null?v().quiet:S.quiet)){let C=`◇ injected env (${Object.keys(a.injected).length})`;a.loadedPaths.length>0&&(C+=` from ${a.loadedPaths.join(", ")}`),console.error(C)}}catch(a){console.error(`dotenv: ${a.message}`),process.exitCode=1;return}let V=!!process.stdin.isTTY,M=process.platform!=="win32"&&!V,D=t(w.command[0],w.command.slice(1),{stdio:"inherit",detached:M}),F=new Map,I=0;function s(a){if(!(!D.pid||D.exitCode!==null||D.signalCode!==null)){if(process.platform==="win32"){n.spawnSync("taskkill",["/pid",String(D.pid),"/T","/F"],{stdio:"ignore"});return}try{process.kill(M?-D.pid:D.pid,a)}catch(C){if(C.code!=="ESRCH")throw C}}}function g(){for(let[a,C]of F)process.removeListener(a,C)}for(let a of["SIGINT","SIGTERM","SIGHUP","SIGQUIT"]){let C=()=>{if(a==="SIGINT"){if(I++,V&&process.platform!=="win32"&&I===1)return;if(I>1){s(I===2?"SIGTERM":"SIGKILL");return}}s(a)};F.set(a,C),process.on(a,C)}D.on("error",function(a){g(),console.error(`dotenv: ${a.message}`),process.exitCode=1}),D.on("exit",function(a,C){g(),typeof a=="number"?process.exit(a):(setInterval(()=>{},1000),process.kill(process.pid,C))})}r.exports=k,r===P.main&&k(process.argv.slice(2))}),X=Ee(),Or=Ke();Q.exports=X;Q.exports.config=X.config;Q.exports.configDotenv=X.configDotenv;Q.exports.parse=X.parse;Q.exports.populate=X.populate});/*! + * Copyright (c) Squirrel Chat et al., All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */function je(e,r){let i=e.slice(0,r).split(/\r?\n/);return[i.length,i.pop().length+1]}function Ve(e,r,i){let o=e.split(/\r?\n/),l="",n=(Math.log10(r+1)|0)+1;for(let t=r-1;t<=r+1;t++){let f=o[t-1];if(!f)continue;if(l+=t.toString().padEnd(n," "),l+=": ",l+=f,l+=` +`,t===r)l+=" ".repeat(n+i+2),l+=`^ +`}return l}class d extends Error{line;column;codeblock;constructor(e,r){let[i,o]=je(r.toml,r.ptr),l=Ve(r.toml,i,o);super(`Invalid TOML document: ${e} + +${l}`,r);this.line=i,this.column=o,this.codeblock=l}static x(e,r,i){throw new d(e,{toml:r.s,ptr:i??r.p})}}/*! + * Copyright (c) Squirrel Chat et al., All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */function re(e){let r=e.p,i=e.s.charCodeAt(e.p++),o=i,l=i===39,n=i===e.s.charCodeAt(e.p)&&i===e.s.charCodeAt(e.p+1);if(n){if((i=e.s.charCodeAt(e.p+=2))===10)e.p++;else if(i===13&&e.s.charCodeAt(e.p+1)===10)e.p+=2}let t="",f=e.p,v=0;for(;e.p=48&&b<=57?b-48:b>=65&&b<=70?b-65+10:b>=97&&b<=102?b-97+10:-1;if(k<0)d.x("invalid non-hex character in unicode escape",e);p=p<<4|k}if(p<0||p>1114111||p>=55296&&p<=57343)d.x("invalid unicode escape",e,h);t+=String.fromCodePoint(p),f=e.p--,v=0}else if(n&&(i===32||i===9))v=2;else{if(i===98)t+="\b";else if(i===116)t+="\t";else if(i===110)t+=` +`;else if(i===102)t+="\f";else if(i===114)t+="\r";else if(i===101)t+="\x1B";else if(i===34)t+='"';else if(i===92)t+="\\";else d.x("unrecognised escape sequence",e);f=e.p+1,v=0}else if(i!==32&&i!==9){if(v===2)d.x("invalid escape: only line-ending whitespace may be escaped",e,f);v=!l&&i===92?1:0,f=e.p}d.x("unfinished string",e,r)}/*! + * Copyright (c) Squirrel Chat et al., All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */var Le=/^(\d{4}-\d{2}-\d{2})?[Tt ]?(?:(\d{2}):\d{2}(?::\d{2}(?:\.\d+)?)?)?(Z|z|[-+]\d{2}:\d{2})?$/i;class W extends Date{#r=!1;#t=!1;#e=null;constructor(e,r,i){let o=!0,l=!0,n="Z",t;if(typeof e==="string")if(r)e:{if(r<3){if(+e.slice(11,13)>23){e="";break e}if(r===2)n=null,e+="Z";else if((t=e.charCodeAt(e.length-1))!==90&&t!==122)n=e.slice(e.length-6);if(i)e=e.slice(0,10)+"T"+e.slice(11)}else if(r===4)e=+e.slice(0,2)>23?"":`0000-01-01T${e}Z`;o=r!==4,l=r!==3}else{let f=e.match(Le);if(f){if(!f[1])o=!1,e=`0000-01-01T${e}`;if(l=!!f[2],l&&e[10]===" "&&(e=e.replace(" ","T")),f[2]&&+f[2]>23)e="";else if(n=f[3]||null,!n&&l)e+="Z"}else e=""}super(e);if(!isNaN(this.getTime()))this.#r=o,this.#t=l,this.#e=n}isDateTime(){return this.#r&&this.#t}isLocal(){return!this.#r||!this.#t||!this.#e}isDate(){return this.#r&&!this.#t}isTime(){return this.#t&&!this.#r}isValid(){return this.#r||this.#t}toISOString(){let e=super.toISOString();if(this.isDate())return e.slice(0,10);if(this.isTime())return e.slice(11,23);if(this.#e===null)return e.slice(0,-1);if(this.#e==="Z"||this.#e==="z")return e;let r=+this.#e.slice(1,3)*60+ +this.#e.slice(4,6);return r=this.#e[0]==="-"?r:-r,new Date(this.getTime()-r*60000).toISOString().slice(0,-1)+this.#e}static wrapAsOffsetDateTime(e,r="Z"){let i=new W(e);return i.#e=r,i}static wrapAsLocalDateTime(e){let r=new W(e);return r.#e=null,r}static wrapAsLocalDate(e){let r=new W(e);return r.#t=!1,r.#e=null,r}static wrapAsLocalTime(e){let r=new W(e);return r.#r=!1,r.#e=null,r}}/*! + * Copyright (c) Squirrel Chat et al., All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */function _(e,r=10){return r===16?e>47&&e<58||e>64&&e<71||e>96&&e<103:e>47&&e<48+r}function ae(e,r){return e===32||e===9||e===10||e===13||r&&(e===r||e===44)||e===35}function Y(e,r){let i=e.p,o=e.s.charCodeAt(e.p);if(o===91||o===123){e.d--||d.x("document contains excessively nested structures. aborting.",e);let l=o===91?me(e):ce(e);return e.d++,l}if(o===34||o===39)return re(e);if(o===116){if(e.s.charCodeAt(++e.p)!==114||e.s.charCodeAt(++e.p)!==117||e.s.charCodeAt(++e.p)!==101)d.x("invalid value",e,i);return e.p++,!0}if(o===102){if(e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==108||e.s.charCodeAt(++e.p)!==115||e.s.charCodeAt(++e.p)!==101)d.x("invalid value",e,i);return e.p++,!1}if(o===43||o===45)return te(e,e.p,e.s.charCodeAt(++e.p),44-o,r);if(e.s.charCodeAt(e.p+4)===45&&e.s.charCodeAt(e.p+7)===45)return Ue(e,o,r);if(e.s.charCodeAt(e.p+2)===58)return Be(e,o,r);return te(e,e.p,o,0,r)}function te(e,r,i,o,l){let n=i,t=0,f=!1;if(n===105){if(e.s.charCodeAt(++e.p)!==110||e.s.charCodeAt(++e.p)!==102)d.x("invalid value",e,r);return e.p++,(o||1)/0}if(n===110){if(e.s.charCodeAt(++e.p)!==97||e.s.charCodeAt(++e.p)!==110)d.x("invalid value",e,r);return e.p++,NaN}if(n===48){if(++e.p>=e.s.length||ae(n=e.s.charCodeAt(e.p),l))return e.bi===!0?0n:0;if(!o){if(n===120)return se(e,r,16,l);else if(n===98)return se(e,r,2,l);else if(n===111)return se(e,r,8,l)}if(n===46)t=2;else if(n===101||n===69)t=4;else d.x("illegal leading zero",e,r)}else if(!_(n))d.x("invalid value",e,r);while(++e.p9)t-=11;else if(!(t&1))t++}if(!t){let h=(i-48)*(o||1);return e.bi===!0?BigInt(h):h}if(!(t&1))d.x("unfinished numeric value",e,r);let v=e.s.slice(r,e.p);if(f)v=v.replaceAll("_","");return t>1?parseFloat(v):he(e,v,10,r)}function se(e,r,i,o){let l,n=1;while(++e.p=e.s.length||((r=e.s.charCodeAt(e.p))!==32||(l=!0,!_(e.s.charCodeAt(e.p+1))))&&r!==84&&r!==116){let t=e.s.slice(o,e.p);return J(e,t,3,!1,o)}if(e.s.charCodeAt(e.p+=3)!==58)d.x("invalid date-time: time part is malformed",e,o);if(e.s.charCodeAt(e.p+=3)===58)e.p+=3;if(e.s.charCodeAt(e.p)===46)while(_(e.s.charCodeAt(++e.p)));if(r=e.s.charCodeAt(e.p)){if(r===90||r===122){let t=e.s.slice(o,++e.p);return J(e,t,1,l,o,"[+00:00]")}if(r===43||r===45){let t=e.s.slice(o,e.p+=6);return J(e,t,1,l,o,!e.ld&&"["+e.s.slice(e.p-6,e.p)+"]")}}let n=e.s.slice(o,e.p);return J(e,n,2,l,o)}function Be(e,r,i){let o=e.p;if(!_(r)||!_(e.s.charCodeAt(++e.p)))return te(e,--e.p,r,0,i);if(e.s.charCodeAt(e.p+=4)===58)e.p+=3;if(e.s.charCodeAt(e.p)===46)while(_(e.s.charCodeAt(++e.p)));let l=e.s.slice(o,e.p);return J(e,l,4,!1,o)}function J(e,r,i,o,l,n){if(e.ld){let t=new W(r,i,o);if(!t.isValid())d.x("invalid date",e,l);return t}try{if(n)r+=n;switch(i){case 1:return Temporal.ZonedDateTime.from(r);case 2:return Temporal.PlainDateTime.from(r);case 3:return Temporal.PlainDate.from(r);case 4:return Temporal.PlainTime.from(r)}}catch(t){d.x(t instanceof Error?t.message:""+t,e,l)}}/*! + * Copyright (c) Squirrel Chat et al., All rights reserved. + * SPDX-License-Identifier: BSD-3-Clause + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the copyright holder nor the names of its contributors + * may be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */function Re(e){for(;e.p57&&t<65||t>90&&t<97&&t!==95||t>122)d.x("illegal character in key",e);else if(!o)o=1,n=e.p;while(t=e.s.charCodeAt(++e.p));d.x("incomplete key-value: cannot find end of key",e,i)}function ce(e){let r=e.p++,i=Object.create(null),o=new Set,l;while(e.p