diff --git a/.gitattributes b/.gitattributes index bed0738c7eeb449bca98b5d2f33c89a1ee56349a..876f21f12f48a402a1e022a0ce5a19b66c5b786a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -58,3 +58,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text # Video files - compressed *.mp4 filter=lfs diff=lfs merge=lfs -text *.webm filter=lfs diff=lfs merge=lfs -text +components/awm/private/tasks/awm-accounting-1-invoice/initial.db filter=lfs diff=lfs merge=lfs -text +components/awm/private/tasks/awm-manufacturing-1-schedule/initial.db filter=lfs diff=lfs merge=lfs -text diff --git a/LICENSES/Apache-2.0-PDBThink.txt b/LICENSES/Apache-2.0-PDBThink.txt new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 --- /dev/null +++ b/LICENSES/Apache-2.0-PDBThink.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/LICENSES/CC-BY-4.0.txt b/LICENSES/CC-BY-4.0.txt new file mode 100644 index 0000000000000000000000000000000000000000..4ea99c213c5c0c005ae4e80df8e52169d06896ec --- /dev/null +++ b/LICENSES/CC-BY-4.0.txt @@ -0,0 +1,395 @@ +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/LICENSES/MIT-adapters.txt b/LICENSES/MIT-adapters.txt new file mode 100644 index 0000000000000000000000000000000000000000..580dd0f4d393e66f6124283a3766f4f3ec4b99e8 --- /dev/null +++ b/LICENSES/MIT-adapters.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Complete Work contributors + +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/LICENSES/ODC-BY-1.0.txt b/LICENSES/ODC-BY-1.0.txt new file mode 100644 index 0000000000000000000000000000000000000000..a12f30e302933f0f2db88e7ce93186a34b9535fd --- /dev/null +++ b/LICENSES/ODC-BY-1.0.txt @@ -0,0 +1,428 @@ +# ODC Attribution License (ODC-By) + +### Preamble + +The Open Data Commons Attribution License is a license agreement +intended to allow users to freely share, modify, and use this Database +subject only to the attribution requirements set out in Section 4. + +Databases can contain a wide variety of types of content (images, +audiovisual material, and sounds all in the same database, for example), +and so this license only governs the rights over the Database, and not +the contents of the Database individually. Licensors may therefore wish +to use this license together with another license for the contents. + +Sometimes the contents of a database, or the database itself, can be +covered by other rights not addressed here (such as private contracts, +trademark over the name, or privacy rights / data protection rights +over information in the contents), and so you are advised that you may +have to consult other documents or clear other rights before doing +activities not covered by this License. + +------ + +The Licensor (as defined below) + +and + +You (as defined below) + +agree as follows: + +### 1.0 Definitions of Capitalised Words + +"Collective Database" - Means this Database in unmodified form as part +of a collection of independent databases in themselves that together are +assembled into a collective whole. A work that constitutes a Collective +Database will not be considered a Derivative Database. + +"Convey" - As a verb, means Using the Database, a Derivative Database, +or the Database as part of a Collective Database in any way that enables +a Person to make or receive copies of the Database or a Derivative +Database. Conveying does not include interaction with a user through a +computer network, or creating and Using a Produced Work, where no +transfer of a copy of the Database or a Derivative Database occurs. + +"Contents" - The contents of this Database, which includes the +information, independent works, or other material collected into the +Database. For example, the contents of the Database could be factual +data or works such as images, audiovisual material, text, or sounds. + +"Database" - A collection of material (the Contents) arranged in a +systematic or methodical way and individually accessible by electronic +or other means offered under the terms of this License. + +"Database Directive" - Means Directive 96/9/EC of the European +Parliament and of the Council of 11 March 1996 on the legal protection +of databases, as amended or succeeded. + +"Database Right" - Means rights resulting from the Chapter III ("sui +generis") rights in the Database Directive (as amended and as transposed +by member states), which includes the Extraction and Re-utilisation of +the whole or a Substantial part of the Contents, as well as any similar +rights available in the relevant jurisdiction under Section 10.4. + +"Derivative Database" - Means a database based upon the Database, and +includes any translation, adaptation, arrangement, modification, or any +other alteration of the Database or of a Substantial part of the +Contents. This includes, but is not limited to, Extracting or +Re-utilising the whole or a Substantial part of the Contents in a new +Database. + +"Extraction" - Means the permanent or temporary transfer of all or a +Substantial part of the Contents to another medium by any means or in +any form. + +"License" - Means this license agreement and is both a license of rights +such as copyright and Database Rights and an agreement in contract. + +"Licensor" - Means the Person that offers the Database under the terms +of this License. + +"Person" - Means a natural or legal person or a body of persons +corporate or incorporate. + +"Produced Work" - a work (such as an image, audiovisual material, text, +or sounds) resulting from using the whole or a Substantial part of the +Contents (via a search or other query) from this Database, a Derivative +Database, or this Database as part of a Collective Database. + +"Publicly" - means to Persons other than You or under Your control by +either more than 50% ownership or by the power to direct their +activities (such as contracting with an independent consultant). + +"Re-utilisation" - means any form of making available to the public all +or a Substantial part of the Contents by the distribution of copies, by +renting, by online or other forms of transmission. + +"Substantial" - Means substantial in terms of quantity or quality or a +combination of both. The repeated and systematic Extraction or +Re-utilisation of insubstantial parts of the Contents may amount to the +Extraction or Re-utilisation of a Substantial part of the Contents. + +"Use" - As a verb, means doing any act that is restricted by copyright +or Database Rights whether in the original medium or any other; and +includes without limitation distributing, copying, publicly performing, +publicly displaying, and preparing derivative works of the Database, as +well as modifying the Database as may be technically necessary to use it +in a different mode or format. + +"You" - Means a Person exercising rights under this License who has not +previously violated the terms of this License with respect to the +Database, or who has received express permission from the Licensor to +exercise rights under this License despite a previous violation. + +Words in the singular include the plural and vice versa. + +### 2.0 What this License covers + +2.1. Legal effect of this document. This License is: + + a. A license of applicable copyright and neighbouring rights; + + b. A license of the Database Right; and + + c. An agreement in contract between You and the Licensor. + +2.2 Legal rights covered. This License covers the legal rights in the +Database, including: + + a. Copyright. Any copyright or neighbouring rights in the Database. + The copyright licensed includes any individual elements of the + Database, but does not cover the copyright over the Contents + independent of this Database. See Section 2.4 for details. Copyright + law varies between jurisdictions, but is likely to cover: the Database + model or schema, which is the structure, arrangement, and organisation + of the Database, and can also include the Database tables and table + indexes; the data entry and output sheets; and the Field names of + Contents stored in the Database; + + b. Database Rights. Database Rights only extend to the Extraction and + Re-utilisation of the whole or a Substantial part of the Contents. + Database Rights can apply even when there is no copyright over the + Database. Database Rights can also apply when the Contents are removed + from the Database and are selected and arranged in a way that would + not infringe any applicable copyright; and + + c. Contract. This is an agreement between You and the Licensor for + access to the Database. In return you agree to certain conditions of + use on this access as outlined in this License. + +2.3 Rights not covered. + + a. This License does not apply to computer programs used in the making + or operation of the Database; + + b. This License does not cover any patents over the Contents or the + Database; and + + c. This License does not cover any trademarks associated with the + Database. + +2.4 Relationship to Contents in the Database. The individual items of +the Contents contained in this Database may be covered by other rights, +including copyright, patent, data protection, privacy, or personality +rights, and this License does not cover any rights (other than Database +Rights or in contract) in individual Contents contained in the Database. +For example, if used on a Database of images (the Contents), this +License would not apply to copyright over individual images, which could +have their own separate licenses, or one single license covering all of +the rights over the images. + +### 3.0 Rights granted + +3.1 Subject to the terms and conditions of this License, the Licensor +grants to You a worldwide, royalty-free, non-exclusive, terminable (but +only under Section 9) license to Use the Database for the duration of +any applicable copyright and Database Rights. These rights explicitly +include commercial use, and do not exclude any field of endeavour. To +the extent possible in the relevant jurisdiction, these rights may be +exercised in all media and formats whether now known or created in the +future. + +The rights granted cover, for example: + + a. Extraction and Re-utilisation of the whole or a Substantial part of + the Contents; + + b. Creation of Derivative Databases; + + c. Creation of Collective Databases; + + d. Creation of temporary or permanent reproductions by any means and + in any form, in whole or in part, including of any Derivative + Databases or as a part of Collective Databases; and + + e. Distribution, communication, display, lending, making available, or + performance to the public by any means and in any form, in whole or in + part, including of any Derivative Database or as a part of Collective + Databases. + +3.2 Compulsory license schemes. For the avoidance of doubt: + + a. Non-waivable compulsory license schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme cannot be waived, the Licensor reserves + the exclusive right to collect such royalties for any exercise by You + of the rights granted under this License; + + b. Waivable compulsory license schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme can be waived, the Licensor waives the + exclusive right to collect such royalties for any exercise by You of + the rights granted under this License; and, + + c. Voluntary license schemes. The Licensor waives the right to collect + royalties, whether individually or, in the event that the Licensor is + a member of a collecting society that administers voluntary licensing + schemes, via that society, from any exercise by You of the rights + granted under this License. + +3.3 The right to release the Database under different terms, or to stop +distributing or making available the Database, is reserved. Note that +this Database may be multiple-licensed, and so You may have the choice +of using alternative licenses for this Database. Subject to Section +10.4, all other rights not expressly granted by Licensor are reserved. + +### 4.0 Conditions of Use + +4.1 The rights granted in Section 3 above are expressly made subject to +Your complying with the following conditions of use. These are important +conditions of this License, and if You fail to follow them, You will be +in material breach of its terms. + +4.2 Notices. If You Publicly Convey this Database, any Derivative +Database, or the Database as part of a Collective Database, then You +must: + + a. Do so only under the terms of this License; + + b. Include a copy of this License or its Uniform Resource Identifier (URI) + with the Database or Derivative Database, including both in the + Database or Derivative Database and in any relevant documentation; + + c. Keep intact any copyright or Database Right notices and notices + that refer to this License; and + + d. If it is not possible to put the required notices in a particular + file due to its structure, then You must include the notices in a + location (such as a relevant directory) where users would be likely to + look for it. + +4.3 Notice for using output (Contents). Creating and Using a Produced +Work does not require the notice in Section 4.2. However, if you +Publicly Use a Produced Work, You must include a notice associated with +the Produced Work reasonably calculated to make any Person that uses, +views, accesses, interacts with, or is otherwise exposed to the Produced +Work aware that Content was obtained from the Database, Derivative +Database, or the Database as part of a Collective Database, and that it +is available under this License. + + a. Example notice. The following text will satisfy notice under + Section 4.3: + + Contains information from DATABASE NAME which is made available + under the ODC Attribution License. + +DATABASE NAME should be replaced with the name of the Database and a +hyperlink to the location of the Database. "ODC Attribution License" +should contain a hyperlink to the URI of the text of this License. If +hyperlinks are not possible, You should include the plain text of the +required URI's with the above notice. + +4.4 Licensing of others. You may not sublicense the Database. Each time +You communicate the Database, the whole or Substantial part of the +Contents, or any Derivative Database to anyone else in any way, the +Licensor offers to the recipient a license to the Database on the same +terms and conditions as this License. You are not responsible for +enforcing compliance by third parties with this License, but You may +enforce any rights that You have over a Derivative Database. You are +solely responsible for any modifications of a Derivative Database made +by You or another Person at Your direction. You may not impose any +further restrictions on the exercise of the rights granted or affirmed +under this License. + +### 5.0 Moral rights + +5.1 Moral rights. This section covers moral rights, including any rights +to be identified as the author of the Database or to object to treatment +that would otherwise prejudice the author's honour and reputation, or +any other derogatory treatment: + + a. For jurisdictions allowing waiver of moral rights, Licensor waives + all moral rights that Licensor may have in the Database to the fullest + extent possible by the law of the relevant jurisdiction under Section + 10.4; + + b. If waiver of moral rights under Section 5.1 a in the relevant + jurisdiction is not possible, Licensor agrees not to assert any moral + rights over the Database and waives all claims in moral rights to the + fullest extent possible by the law of the relevant jurisdiction under + Section 10.4; and + + c. For jurisdictions not allowing waiver or an agreement not to assert + moral rights under Section 5.1 a and b, the author may retain their + moral rights over certain aspects of the Database. + +Please note that some jurisdictions do not allow for the waiver of moral +rights, and so moral rights may still subsist over the Database in some +jurisdictions. + +### 6.0 Fair dealing, Database exceptions, and other rights not affected + +6.1 This License does not affect any rights that You or anyone else may +independently have under any applicable law to make any use of this +Database, including without limitation: + + a. Exceptions to the Database Right including: Extraction of Contents + from non-electronic Databases for private purposes, Extraction for + purposes of illustration for teaching or scientific research, and + Extraction or Re-utilisation for public security or an administrative + or judicial procedure. + + b. Fair dealing, fair use, or any other legally recognised limitation + or exception to infringement of copyright or other applicable laws. + +6.2 This License does not affect any rights of lawful users to Extract +and Re-utilise insubstantial parts of the Contents, evaluated +quantitatively or qualitatively, for any purposes whatsoever, including +creating a Derivative Database (subject to other rights over the +Contents, see Section 2.4). The repeated and systematic Extraction or +Re-utilisation of insubstantial parts of the Contents may however amount +to the Extraction or Re-utilisation of a Substantial part of the +Contents. + +### 7.0 Warranties and Disclaimer + +7.1 The Database is licensed by the Licensor "as is" and without any +warranty of any kind, either express, implied, or arising by statute, +custom, course of dealing, or trade usage. Licensor specifically +disclaims any and all implied warranties or conditions of title, +non-infringement, accuracy or completeness, the presence or absence of +errors, fitness for a particular purpose, merchantability, or otherwise. +Some jurisdictions do not allow the exclusion of implied warranties, so +this exclusion may not apply to You. + +### 8.0 Limitation of liability + +8.1 Subject to any liability that may not be excluded or limited by law, +the Licensor is not liable for, and expressly excludes, all liability +for loss or damage however and whenever caused to anyone by any use +under this License, whether by You or by anyone else, and whether caused +by any fault on the part of the Licensor or not. This exclusion of +liability includes, but is not limited to, any special, incidental, +consequential, punitive, or exemplary damages such as loss of revenue, +data, anticipated profits, and lost business. This exclusion applies +even if the Licensor has been advised of the possibility of such +damages. + +8.2 If liability may not be excluded by law, it is limited to actual and +direct financial loss to the extent it is caused by proved negligence on +the part of the Licensor. + +### 9.0 Termination of Your rights under this License + +9.1 Any breach by You of the terms and conditions of this License +automatically terminates this License with immediate effect and without +notice to You. For the avoidance of doubt, Persons who have received the +Database, the whole or a Substantial part of the Contents, Derivative +Databases, or the Database as part of a Collective Database from You +under this License will not have their licenses terminated provided +their use is in full compliance with this License or a license granted +under Section 4.8 of this License. Sections 1, 2, 7, 8, 9 and 10 will +survive any termination of this License. + +9.2 If You are not in breach of the terms of this License, the Licensor +will not terminate Your rights under it. + +9.3 Unless terminated under Section 9.1, this License is granted to You +for the duration of applicable rights in the Database. + +9.4 Reinstatement of rights. If you cease any breach of the terms and +conditions of this License, then your full rights under this License +will be reinstated: + + a. Provisionally and subject to permanent termination until the 60th + day after cessation of breach; + + b. Permanently on the 60th day after cessation of breach unless + otherwise reasonably notified by the Licensor; or + + c. Permanently if reasonably notified by the Licensor of the + violation, this is the first time You have received notice of + violation of this License from the Licensor, and You cure the + violation prior to 30 days after your receipt of the notice. + +9.5 Notwithstanding the above, Licensor reserves the right to release +the Database under different license terms or to stop distributing or +making available the Database. Releasing the Database under different +license terms or stopping the distribution of the Database will not +withdraw this License (or any other license that has been, or is +required to be, granted under the terms of this License), and this +License will continue in full force and effect unless terminated as +stated above. + +### 10.0 General + +10.1 If any provision of this License is held to be invalid or +unenforceable, that must not affect the validity or enforceability of +the remainder of the terms and conditions of this License and each +remaining provision of this License shall be valid and enforced to the +fullest extent permitted by law. + +10.2 This License is the entire agreement between the parties with +respect to the rights granted here over the Database. It replaces any +earlier understandings, agreements or representations with respect to +the Database. + +10.3 If You are in breach of the terms of this License, You will not be +entitled to rely on the terms of this License or to complain of any +breach by the Licensor. + +10.4 Choice of law. This License takes effect in and will be governed by +the laws of the relevant jurisdiction in which the License terms are +sought to be enforced. If the standard suite of rights granted under +applicable copyright law and Database Rights in the relevant +jurisdiction includes additional rights not granted under this License, +these additional rights are granted in this License in order to meet the +terms of this License. diff --git a/LICENSES/README.txt b/LICENSES/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..320a51a8c6ef69bdd528b64448efc72b48c31834 --- /dev/null +++ b/LICENSES/README.txt @@ -0,0 +1,10 @@ +Each upstream component retains its own license and attribution. + +PDBThink original tasks and checkers: Open Athena, Apache-2.0. The upstream source identifies the coordinates as wwPDB CC0 material. See Apache-2.0-PDBThink.txt and components/pdbthink/licenses/. +TMax original task data: Ai2, ODC-BY 1.0. TMax-NOTICE.txt and the original author citations are retained. The upstream card also specifies research and educational use, the Ai2 Responsible Use Guidelines, and upstream terms for generated content. Those source requirements continue to apply. See ODC-BY-1.0.txt. +MiMo original training tasks, task assets, and embedded Requests and Plaso code: the original Apache-2.0 licenses and associated notices retain their file-specific scope, as recorded in components/mimo-code/licenses/ and SOURCE.json. +MathConstraint Costas, Ramsey, and Social Golfers: Viresh Pati and contributors, CC BY 4.0, obtained through amphora's pinned Harbor revision. The image also contains an unregistered RLVE round-robin alternative with its original MIT notice. See components/math/licenses/, NOTICE.txt, and SOURCE.json. +AgentWorldModel: Zhaoyang Wang, Canwen Xu, Boyi Liu, Yite Wang, Siwei Han, Zhewei Yao, Huaxiu Yao, and Yuxiong He, CC BY 4.0. See CC-BY-4.0.txt, components/awm/NOTICE, and LICENSE_SCOPE.json. +The project's existing MIT license applies to the new adapters and packaging documentation only. It does not replace or alter any upstream license. + +OpenEnv SDK commit: 86a180ede21e044f7929b9a7783ad83aa67d83a3. The operating systems, Python, and third-party libraries retain their respective licenses. Original distribution notices remain in the images. Dependency records support reproduction and do not relicense those dependencies. diff --git a/LICENSES/TMax-NOTICE.txt b/LICENSES/TMax-NOTICE.txt new file mode 100644 index 0000000000000000000000000000000000000000..564377a82931da3dd695d7220ea6fae14f950dff --- /dev/null +++ b/LICENSES/TMax-NOTICE.txt @@ -0,0 +1,6 @@ +Contains information from allenai/TMax-15K (https://huggingface.co/datasets/allenai/TMax-15K), declared under the Open Data Commons Attribution License: https://opendatacommons.org/licenses/by/1-0/ . +Harbor task conversion: TMaxxx/TMax-15K-Harbor, revision 48a77eb0b017606c643ed905f96db41672914798. +The six selected tasks retain their original instructions, scoring assertions and fixed input assets. The OpenEnv adapter changes execution and transport and protects original inputs and private checkers. +The original dataset card also states research/education use, Ai2 Responsible Use Guidelines and applicable upstream terms for generated content; retain those statements with the component source notices. +See components/tmax/SOURCE.json and licenses/ for the original Ai2 revision and full source attribution. +OpenEnv SDK revision: 86a180ede21e044f7929b9a7783ad83aa67d83a3. Ubuntu, CPython and installed packages retain their upstream notices and licenses in the runtime image. diff --git a/MANIFEST.json b/MANIFEST.json new file mode 100644 index 0000000000000000000000000000000000000000..f75d51d9bdbac25b185146e07a3a27a15ef5db06 --- /dev/null +++ b/MANIFEST.json @@ -0,0 +1,2212 @@ +{ + "format": "multidomain-fixed-original-tasks-v1", + "stage": "upload-ready-clean", + "selected_task_count": 15, + "capability_family_count": 8, + "image_component_count": 5, + "unregistered_backup_count": 2, + "manifest_rule": "Inventory covers all files except MANIFEST.json and SHA256SUMS; SHA256SUMS also covers MANIFEST.json. Reviewed source identity is recorded separately in SOURCE_LOCK.json.", + "required_directories": [ + { + "path": "components/tmax/tasks/task_000056_f726766b/pristine", + "role": "frozen_pristine_workspace_root", + "empty": true, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000056_f726766b/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000260_7b7cc286/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000260_7b7cc286/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000663_dff2c340/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000663_dff2c340/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_005684_3c8594a3/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_005684_3c8594a3/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_008667_2151f271/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_008667_2151f271/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_008998_ae4cbe72/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_008998_ae4cbe72/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + } + ], + "files": { + "LICENSES/Apache-2.0-PDBThink.txt": { + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "bytes": 11357, + "role": "upstream_license", + "source_lock": "LICENSES/Apache-2.0-PDBThink.txt" + }, + "LICENSES/CC-BY-4.0.txt": { + "sha256": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "bytes": 18656, + "role": "upstream_license_copy", + "source_lock": "LICENSES/CC-BY-4.0.txt" + }, + "LICENSES/MIT-adapters.txt": { + "sha256": "c9d5f2c24789a4ee7502fd1426c6a2090ba766b24f20d0ef663d3b149b7466d3", + "bytes": 1083, + "role": "adapter_license", + "source_lock": "LICENSES/MIT-adapters.txt" + }, + "LICENSES/ODC-BY-1.0.txt": { + "sha256": "11a6d83734845ad09d809667aa219857a5b985b28c258a2eebf5677668a6bd3b", + "bytes": 19977, + "role": "upstream_license", + "source_lock": "LICENSES/ODC-BY-1.0.txt" + }, + "LICENSES/README.txt": { + "sha256": "584119e89dde3125ead1266f2b0df8e5703aa39db498802d8c939324ffd0d8ce", + "bytes": 1737, + "role": "package_documentation_or_validation" + }, + "LICENSES/TMax-NOTICE.txt": { + "sha256": "85da239bb4104a67e515dca538d1a4b345eed77c5d460fe76625bae905b431ed", + "bytes": 982, + "role": "package_documentation_or_validation" + }, + "README.md": { + "sha256": "abafb0904285aa1bf767882e7dc62100c6ba6dad62785b5ca17432a5503c766a", + "bytes": 1910, + "role": "package_documentation_or_validation" + }, + "REGISTRATION.json": { + "sha256": "458a593d295c61d4e72f48123e12a530396eba64bb1e98336c5df64cd1d1fbb6", + "bytes": 1004, + "role": "package_registration" + }, + "SOURCE_LOCK.json": { + "sha256": "91ef4f71d10ae3874a47b80d0264e6f14e6317fc241d54700fd509ae1ff1d550", + "bytes": 224672, + "role": "package_documentation_or_validation" + }, + "components/awm/ADAPTATIONS.txt": { + "sha256": "dbaa91cef8aa2714c2761091e7a4f3b026a98add56e4b867b1f3e0c72c7445fd", + "bytes": 331, + "role": "packaging_metadata", + "source_lock": "components/awm/ADAPTATIONS.txt" + }, + "components/awm/Dockerfile": { + "sha256": "1c26892b11e285d319e7ebc65f6cb275d38e5a4e5b581f9d022b026d72a3a3db", + "bytes": 1358, + "role": "packaging_metadata", + "source_lock": "components/awm/Dockerfile" + }, + "components/awm/LICENSE_SCOPE.json": { + "sha256": "1ea6a4d0c80da30d5f658364aaef2664cf09f32da0bce23c448e1fc1e4c4a7a6", + "bytes": 908, + "role": "packaging_metadata", + "source_lock": "components/awm/LICENSE_SCOPE.json" + }, + "components/awm/NOTICE": { + "sha256": "4d91952ef79d73182302464db3d190b0427ac04754eb6b7f5b1e8ad739c0bb1c", + "bytes": 643, + "role": "packaging_metadata", + "source_lock": "components/awm/NOTICE" + }, + "components/awm/SOURCE_CREDITS.json": { + "sha256": "ae057f0e66d0e924e81f553e729148cd98161bf070283928ef4fb658e9cf3546", + "bytes": 469, + "role": "packaging_metadata", + "source_lock": "components/awm/SOURCE_CREDITS.json" + }, + "components/awm/TASKS.json": { + "sha256": "4d97456d2794c1f347c47f3c32733294d83778165d99b923bae4ebeec15261b2", + "bytes": 3253, + "role": "packaging_metadata", + "source_lock": "components/awm/TASKS.json" + }, + "components/awm/awm-requirements.lock": { + "sha256": "65d41089191536d5940648213b09924ba93e55d92df0080634e16d13615fd1ac", + "bytes": 4276, + "role": "dependency_lock", + "source_lock": "components/awm/awm-requirements.lock" + }, + "components/awm/config.json": { + "sha256": "1639f6ced0ae83cb1f87bb2737578602c1d410b2974ca2a889302e6a186b29fa", + "bytes": 1068, + "role": "packaging_metadata", + "source_lock": "components/awm/config.json" + }, + "components/awm/private/tasks/awm-accounting-1-invoice/SOURCE.json": { + "sha256": "3a1cc59eece46232d3ebb39df3cbfedd0625ab85bcf5e1d6cb090ea6ecec0e58", + "bytes": 657, + "role": "derived_source_metadata", + "source_lock": "components/awm/private/tasks/awm-accounting-1-invoice/SOURCE.json" + }, + "components/awm/private/tasks/awm-accounting-1-invoice/initial.db": { + "sha256": "8ad2959536e44caba47bcbeca9018e47e7157783194d19b429aa8f22a60f4771", + "bytes": 331776, + "role": "materialized_original_seed", + "source_lock": "components/awm/private/tasks/awm-accounting-1-invoice/initial.db" + }, + "components/awm/private/tasks/awm-accounting-1-invoice/original_api.py": { + "sha256": "57362b907a2d454bbd29b95dfebb7d84207ce9d7e22533eaf54853ee4fb84990", + "bytes": 87054, + "role": "original_task_api", + "source_lock": "components/awm/private/tasks/awm-accounting-1-invoice/original_api.py" + }, + "components/awm/private/tasks/awm-accounting-1-invoice/original_verifier.py": { + "sha256": "3cd0d63022caa900e32bda0b0d3ae5c9948ce3c195b77ba1906c7ddebea9c58b", + "bytes": 5951, + "role": "original_task_verifier", + "source_lock": "components/awm/private/tasks/awm-accounting-1-invoice/original_verifier.py" + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/SOURCE.json": { + "sha256": "93eda02b7f5e0bd7aca37a2becc3fd20925472a8f33143171e4cc250564ff7b3", + "bytes": 801, + "role": "derived_source_metadata", + "source_lock": "components/awm/private/tasks/awm-manufacturing-1-schedule/SOURCE.json" + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/initial.db": { + "sha256": "9a523ebee8c25ca61aa43075c6263e5d3b310d39157ebddabea4cb754e610a1c", + "bytes": 307200, + "role": "materialized_original_seed", + "source_lock": "components/awm/private/tasks/awm-manufacturing-1-schedule/initial.db" + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/original_api.py": { + "sha256": "ff94326bc0d2a826a2a211512a617f0b9f5d91866b9c77ea17f6502f77b75aa6", + "bytes": 98238, + "role": "original_task_api", + "source_lock": "components/awm/private/tasks/awm-manufacturing-1-schedule/original_api.py" + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/original_verifier.py": { + "sha256": "f0cd8fa0f1a17e76f8e87cfbe59a81645a750999f747be36b8d25d9244e5b8f1", + "bytes": 4160, + "role": "original_task_verifier", + "source_lock": "components/awm/private/tasks/awm-manufacturing-1-schedule/original_verifier.py" + }, + "components/awm/requirements.lock": { + "sha256": "0078892ae5870080b3417677926bc64f4f87ba9e8110ff400f18954e361455fc", + "bytes": 10799, + "role": "dependency_lock", + "source_lock": "components/awm/requirements.lock" + }, + "components/awm/runtime/awm/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/awm/__init__.py" + }, + "components/awm/runtime/awm/adapter.py": { + "sha256": "98218136805b95d2cc5e98e190ef79e6d0a9c2950d8f61844b4672d4e2dac651", + "bytes": 5108, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/awm/adapter.py" + }, + "components/awm/runtime/awm/launch_service.py": { + "sha256": "0638af1cd1c6a311ee85109143ec6a59646a5f3d41c4b30312526dec561da33d", + "bytes": 2413, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/awm/launch_service.py" + }, + "components/awm/runtime/awm/openenv_app.py": { + "sha256": "f47b0cc104a7a962fc932c4d3f3bb8bfcf1524dec049b9c2c33161924038b94e", + "bytes": 3995, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/awm/openenv_app.py" + }, + "components/awm/runtime/awm/server.py": { + "sha256": "484c7caeaa301b91f468a9e55a251a6b529c6f9d0f2e4951c9602071c40ebcea", + "bytes": 820, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/awm/server.py" + }, + "components/awm/runtime/awm/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/awm/wire_client.py" + }, + "components/awm/runtime/awm/worker.py": { + "sha256": "06d2f12af151c8de707360ad950f6298a59668b203be8c64430d9cc602c7df54", + "bytes": 6280, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/awm/worker.py" + }, + "components/awm/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/common/__init__.py" + }, + "components/awm/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/common/contracts.py" + }, + "components/awm/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/common/http_routes.py" + }, + "components/awm/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "local_transport_adapter", + "source_lock": "components/awm/runtime/common/models.py" + }, + "components/awm/upstream/README.md": { + "sha256": "12a0f7eb70edfb5e6fb02f9904c3e06daea24eab392ff4d6cef229ce18237810", + "bytes": 3917, + "role": "original_upstream_metadata_or_row", + "source_lock": "components/awm/upstream/README.md" + }, + "components/awm/upstream/accounting_1-gen_db.jsonl": { + "sha256": "1cd23311c95c9919621b226c99dcab54faf815300c72cd542a394a5e69463a6e", + "bytes": 13948, + "role": "original_upstream_metadata_or_row", + "source_lock": "components/awm/upstream/accounting_1-gen_db.jsonl" + }, + "components/awm/upstream/accounting_1-gen_envs.jsonl": { + "sha256": "99f1883338fa6f4827cb9c6c4c9cf9222c28a2a9842202cbe524921921de3ae3", + "bytes": 90440, + "role": "original_upstream_metadata_or_row", + "source_lock": "components/awm/upstream/accounting_1-gen_envs.jsonl" + }, + "components/awm/upstream/accounting_1-gen_sample.jsonl": { + "sha256": "28cf8d5611b0d63b9e17d0e991e328c2970cfef5595c08d084f2b1bad7a441fd", + "bytes": 32317, + "role": "original_upstream_metadata_or_row", + "source_lock": "components/awm/upstream/accounting_1-gen_sample.jsonl" + }, + "components/awm/upstream/manufacturing_execution_system_1-gen_db.jsonl": { + "sha256": "a50a67f6680c40b779f831067fe84d5633a10af60c6b488a4d6510fa818f45f3", + "bytes": 10985, + "role": "original_upstream_metadata_or_row", + "source_lock": "components/awm/upstream/manufacturing_execution_system_1-gen_db.jsonl" + }, + "components/awm/upstream/manufacturing_execution_system_1-gen_envs.jsonl": { + "sha256": "882e62163cdd51b0dba39ceb6ad110f263001681e68961648a5acad2d9e20c28", + "bytes": 101887, + "role": "original_upstream_metadata_or_row", + "source_lock": "components/awm/upstream/manufacturing_execution_system_1-gen_envs.jsonl" + }, + "components/awm/upstream/manufacturing_execution_system_1-gen_sample.jsonl": { + "sha256": "fe9ae64f008a723f8ec10bc02a754a810243f0e97e82221b0ed730faf5cce63a", + "bytes": 33744, + "role": "original_upstream_metadata_or_row", + "source_lock": "components/awm/upstream/manufacturing_execution_system_1-gen_sample.jsonl" + }, + "components/math/ADAPTATIONS.txt": { + "sha256": "15c3c4f106c052941f16970b3981ae9c9a7bbe4c913430bcac10edbc14e73151", + "bytes": 253, + "role": "adapter_documentation", + "source_lock": "components/math/ADAPTATIONS.txt" + }, + "components/math/FILE_ALLOWLIST.json": { + "sha256": "3391c140ba8b7dd1378d16065c7488379b3114ce3f6009461bf31c416138e2f5", + "bytes": 25394, + "role": "review_record_snapshot", + "source_lock": "components/math/FILE_ALLOWLIST.json" + }, + "components/math/MANIFEST.json": { + "sha256": "bc17cd61f2a4ce4d05194787d9e25f1d38f8fdd8856d904f1e04f44c6d768211", + "bytes": 6533, + "role": "review_record_snapshot", + "source_lock": "components/math/MANIFEST.json" + }, + "components/math/NOTICE.txt": { + "sha256": "73b544ecebc5d10e34e72f187bfdccf8ad66c9df4c37b03eeca7323a12401248", + "bytes": 703, + "role": "license_and_attribution", + "source_lock": "components/math/NOTICE.txt" + }, + "components/math/SDK_DEPENDENCIES.json": { + "sha256": "a037cf3ce617aa3e0216bf5e0677d229679bfffdd30dba9057b58bb413c39732", + "bytes": 25904, + "role": "dependency_manifest", + "source_lock": "components/math/SDK_DEPENDENCIES.json" + }, + "components/math/SOURCE.json": { + "sha256": "a91ceb6c6b39e532fbef753034f1979d2364672d9bb6a45395c946dd8208befd", + "bytes": 1081, + "role": "metadata", + "source_lock": "components/math/SOURCE.json" + }, + "components/math/TASKS.json": { + "sha256": "fe67677e50ff773b044feb9122e26a4dbb1dc647a5c88ba9db0adf952167104a", + "bytes": 3905, + "role": "metadata", + "source_lock": "components/math/TASKS.json" + }, + "components/math/config.json": { + "sha256": "190f2c6c257c0cbc4cb6bfa2efe8e5fdca221b1c18b39aa70331781f2be79afa", + "bytes": 5968, + "role": "runtime_registry", + "source_lock": "components/math/config.json" + }, + "components/math/licenses/MathConstraint-LICENSE": { + "sha256": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "bytes": 18656, + "role": "license_and_attribution", + "source_lock": "components/math/licenses/MathConstraint-LICENSE" + }, + "components/math/licenses/RLVE-LICENSE": { + "sha256": "10afac3400d1abccc7ec2322e07563a3e495c13ac39d3865564aa2e2423b398e", + "bytes": 1069, + "role": "license_and_attribution", + "source_lock": "components/math/licenses/RLVE-LICENSE" + }, + "components/math/licenses/UPSTREAM_COLLECTION_LICENSES.md": { + "sha256": "200b2ce93f2a5b9671165f9aea3cc4d89db995352c1e1e3db6d418262b058516", + "bytes": 462, + "role": "license_and_attribution", + "source_lock": "components/math/licenses/UPSTREAM_COLLECTION_LICENSES.md" + }, + "components/math/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "execution_adapter", + "source_lock": "components/math/runtime/common/__init__.py" + }, + "components/math/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "execution_adapter", + "source_lock": "components/math/runtime/common/contracts.py" + }, + "components/math/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "execution_adapter", + "source_lock": "components/math/runtime/common/http_routes.py" + }, + "components/math/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "execution_adapter", + "source_lock": "components/math/runtime/common/models.py" + }, + "components/math/runtime/native_shell/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/__init__.py" + }, + "components/math/runtime/native_shell/actor_launcher.py": { + "sha256": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "bytes": 5012, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/actor_launcher.py" + }, + "components/math/runtime/native_shell/backend.py": { + "sha256": "6cc693d7a384d6d76b8c99bfb6af2e5188c03aac81671cfec3414733fb98089a", + "bytes": 13484, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/backend.py" + }, + "components/math/runtime/native_shell/environment.py": { + "sha256": "cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53", + "bytes": 1616, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/environment.py" + }, + "components/math/runtime/native_shell/guard.py": { + "sha256": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "bytes": 13254, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/guard.py" + }, + "components/math/runtime/native_shell/launch_service.py": { + "sha256": "db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b", + "bytes": 2383, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/launch_service.py" + }, + "components/math/runtime/native_shell/server.py": { + "sha256": "3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e", + "bytes": 640, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/server.py" + }, + "components/math/runtime/native_shell/verifier_launcher.py": { + "sha256": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "bytes": 962, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/verifier_launcher.py" + }, + "components/math/runtime/native_shell/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "execution_adapter", + "source_lock": "components/math/runtime/native_shell/wire_client.py" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile": { + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/environment/instance.json": { + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "bytes": 98, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-costas-array-l3-s0/environment/instance.json" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/instruction.md": { + "sha256": "88e4a26e71d8483fbc89627210e4ed07f6dfef0fb16ce3e6d31e84a04bd050f9", + "bytes": 723, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-costas-array-l3-s0/instruction.md" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/task.toml": { + "sha256": "b62ba527da418f1b84d165707ea56ea805953289b0993cc3176e988ef59c3d32", + "bytes": 694, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-costas-array-l3-s0/task.toml" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/tests/check.py": { + "sha256": "3c0290e35201f077926099989cd0e82c10bf091cb33c572cacc02bca075debdb", + "bytes": 809, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-costas-array-l3-s0/tests/check.py" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/tests/instance.json": { + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "bytes": 98, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-costas-array-l3-s0/tests/instance.json" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/tests/run.py": { + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-costas-array-l3-s0/tests/run.py" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/tests/test.sh": { + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-costas-array-l3-s0/tests/test.sh" + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile": { + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile" + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/environment/instance.json": { + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "bytes": 84, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-ramsey-l4-s0/environment/instance.json" + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/instruction.md": { + "sha256": "dacf1d28faa912ac766cb9a8859b9a2d08940d2c52a9f8460c85ce0595a16c81", + "bytes": 599, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-ramsey-l4-s0/instruction.md" + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/task.toml": { + "sha256": "d2ea623dfdf1ab4864399d4231f17b7c6800cc73e1ad9d1c583816d149dca377", + "bytes": 672, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-ramsey-l4-s0/task.toml" + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/tests/check.py": { + "sha256": "923f9e1258610a3cc3d5c2984b1855ed7341af13bc7592ff42aed0e0f91fc74d", + "bytes": 1220, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-ramsey-l4-s0/tests/check.py" + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/tests/instance.json": { + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "bytes": 84, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-ramsey-l4-s0/tests/instance.json" + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/tests/run.py": { + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-ramsey-l4-s0/tests/run.py" + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/tests/test.sh": { + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-ramsey-l4-s0/tests/test.sh" + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile": { + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile" + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/environment/instance.json": { + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "bytes": 100, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-social-golfers-l4-s0/environment/instance.json" + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/instruction.md": { + "sha256": "a638ef887b79167571086549b8d9438447d07b800772aac868b3e9a2e6899cd2", + "bytes": 560, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-social-golfers-l4-s0/instruction.md" + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/task.toml": { + "sha256": "fb08db6bba18360321c1ac959d0af5f655435579d5cb88864d924897254c7546", + "bytes": 705, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-social-golfers-l4-s0/task.toml" + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/check.py": { + "sha256": "9514518058e308fc2ae0ec0b8ce8a50993d5dfa09708ac9c3609e1edbbae126a", + "bytes": 1132, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/check.py" + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/instance.json": { + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "bytes": 100, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/instance.json" + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/run.py": { + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/run.py" + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/test.sh": { + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/test.sh" + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile": { + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile" + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json": { + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "bytes": 99, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json" + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md": { + "sha256": "db8d002ee820a699d6b7b819cb88ed583990529649255af446c22c98889ad370", + "bytes": 579, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md" + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/task.toml": { + "sha256": "d42f4225ae8850e6abe3e1b612b0da6f2e896322a3e9e00e6addb988a8f8332a", + "bytes": 741, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/task.toml" + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py": { + "sha256": "930cd10836482427303a497cfa896934ccdc24116879eaa4c5d32a572d01353c", + "bytes": 820, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py" + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json": { + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "bytes": 99, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json" + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py": { + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py" + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh": { + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "source_lock": "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh" + }, + "components/mimo-code/README.txt": { + "sha256": "9825666034cc109ee29e794870e502c4d9ff67b22bee26a7e808eda5676d1b14", + "bytes": 533, + "role": "adapter", + "source_lock": "components/mimo-code/README.txt" + }, + "components/mimo-code/SDK_DEPENDENCIES.json": { + "sha256": "a037cf3ce617aa3e0216bf5e0677d229679bfffdd30dba9057b58bb413c39732", + "bytes": 25904, + "role": "dependency", + "source_lock": "components/mimo-code/SDK_DEPENDENCIES.json" + }, + "components/mimo-code/SDK_RUNTIME.json": { + "sha256": "1d8034fd8f402d3cfbcb68e6a666ffb8b10f2374d1f2dfaa623a91a320fd7ada", + "bytes": 546, + "role": "dependency", + "source_lock": "components/mimo-code/SDK_RUNTIME.json" + }, + "components/mimo-code/SOURCE.json": { + "sha256": "150edf38d6ba4b6ba26ec991f256f7e2630935b3951a16e8688d8d86ad1eac85", + "bytes": 1496, + "role": "adapter", + "source_lock": "components/mimo-code/SOURCE.json" + }, + "components/mimo-code/licenses/plaso-Apache-2.0.txt": { + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "bytes": 11358, + "role": "license", + "source_lock": "components/mimo-code/licenses/plaso-Apache-2.0.txt" + }, + "components/mimo-code/licenses/requests-Apache-2.0.txt": { + "sha256": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "bytes": 10142, + "role": "license", + "source_lock": "components/mimo-code/licenses/requests-Apache-2.0.txt" + }, + "components/mimo-code/source_bundle/Dockerfile": { + "sha256": "54af5390562f313695c706cc01071a28928f25025f50306c02f3f519faaf5b49", + "bytes": 1613, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/Dockerfile" + }, + "components/mimo-code/source_bundle/config.json": { + "sha256": "a95e52958c35cf9a4b925558ca38029006ed04f9abc89e008f96e8ffd08fd629", + "bytes": 13050, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/config.json" + }, + "components/mimo-code/source_bundle/openenv-requirements.lock": { + "sha256": "836618cb7e01e236878d367272157e4be6a31d538bf8b9f8cc9ed630aac04482", + "bytes": 10667, + "role": "dependency", + "source_lock": "components/mimo-code/source_bundle/openenv-requirements.lock" + }, + "components/mimo-code/source_bundle/pristine/Dockerfile": { + "sha256": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "bytes": 598, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/Dockerfile" + }, + "components/mimo-code/source_bundle/pristine/requirements-shared.txt": { + "sha256": "34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526", + "bytes": 364, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/requirements-shared.txt" + }, + "components/mimo-code/source_bundle/pristine/tools/run_regression.py": { + "sha256": "8d76dedce7d7a38ea383d8db3784f3ab808648a3bb19d613efa6e01088daea49", + "bytes": 3802, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/tools/run_regression.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/LICENSE": { + "sha256": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "bytes": 10142, + "role": "license", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/LICENSE" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/pyproject.toml": { + "sha256": "345f26b9f691435e39d0eb6f7f4150a390f43175b22f8d61ac95e7f2827f0a77", + "bytes": 3404, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/pyproject.toml" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__init__.py": { + "sha256": "80534322a1a3167d8775829ee220a6acf4fe455f3f778c4b8e94bcf7fadfa0b5", + "bytes": 5637, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__init__.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__version__.py": { + "sha256": "abba90670b0370a3dc40d97c2dea46a35d4bec941ff10d7c3cf3098ef04a17f9", + "bytes": 435, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__version__.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_internal_utils.py": { + "sha256": "4c7d8d132c9898fc7d715e473f3ac74785ddc4ab96d2c9240f87835dc6d981ff", + "bytes": 1542, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_internal_utils.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_types.py": { + "sha256": "d06df79f54a279c0cc3faec596c446246d5ad14edfd529eb328defbd62a44a89", + "bytes": 5838, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_types.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/adapters.py": { + "sha256": "cc9b1b02694fee0353481fbad84fe3ddbedec4441dba54df7914c63f2aa85937", + "bytes": 27992, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/adapters.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/api.py": { + "sha256": "4d15480ac046f089209798e8650476ef4a28ebe6f81b400758f8ef42ec6b5509", + "bytes": 7152, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/api.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/auth.py": { + "sha256": "fdc8bb34a8a5a088b169ca13277d107b0bc94ee63ed5e89dd4f5569d9b2bb04c", + "bytes": 12107, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/auth.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/certs.py": { + "sha256": "fd9c6b83359cef90ff6c4eeeab8dcc2388da382ebca7d00a499b3c0b434a87e4", + "bytes": 430, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/certs.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/compat.py": { + "sha256": "4a51c5ab07b015c298d6ea69d71502979cd3ed6b935d88e4433ce5341dacf584", + "bytes": 2494, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/compat.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/cookies.py": { + "sha256": "05d12b965c76f229803e17aef1c9969d712e4f4d0f6a06c05e0a47212fd5b417", + "bytes": 21504, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/cookies.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/exceptions.py": { + "sha256": "c5e18f3352454968e337bb3056f0867df2f37c0a0d2c1a77dc05e7e0b3c0411b", + "bytes": 4564, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/exceptions.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/help.py": { + "sha256": "e5845e93980b2e25be418fb7fe0b8e6e999fef8f84afc5a43f4546efdc24691f", + "bytes": 4068, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/help.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/hooks.py": { + "sha256": "ebd8a02475d31a0e473a8f553e9501ff43645b9563885ad52844e7a63f0d76ab", + "bytes": 1138, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/hooks.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/models.py": { + "sha256": "557962f283e48bb20604129509979803687c9bf8b43e5d0f38e8d5037a5c2131", + "bytes": 41710, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/models.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/packages.py": { + "sha256": "fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287", + "bytes": 904, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/packages.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/py.typed": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/py.typed" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/sessions.py": { + "sha256": "3d2089736ced93b2b405624a943f866d22652b17df06a85eb010f86272fc3e7d", + "bytes": 34072, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/sessions.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/status_codes.py": { + "sha256": "1950f47c89cf18019787e07d8ce48f66d6b38e622f7d94d70a90247fee6c040e", + "bytes": 4351, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/status_codes.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/structures.py": { + "sha256": "ba9460c39078f25e6f1d2a24ac941ac6f8d2ee97197fa8c8d0c262d8a1e67a02", + "bytes": 4134, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/structures.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/utils.py": { + "sha256": "b879cb3f671cf1c28e8ff9b2b02151bcdb8974b4820a514cfdd1f5a038443cd2", + "bytes": 36061, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/utils.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/tests/__init__.py": { + "sha256": "ac7f253daae0905f9b3dec647cae736bb3c090185aa373b30b3e851599e5342c", + "bytes": 469, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/tests/__init__.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/tests/conftest.py": { + "sha256": "6d65ffb582519f80a66c5d1ef571e3c33395a199f9e67fcb500c6ad2d7800e0a", + "bytes": 1934, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/tests/conftest.py" + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/tests/test_requests.py": { + "sha256": "91ee3b9532c67d6fd533f9f8a7e910a63eb5a0558e569cc2ac20d2c047a5369d", + "bytes": 108033, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine/vendor/requests/tests/test_requests.py" + }, + "components/mimo-code/source_bundle/pristine-other/Dockerfile": { + "sha256": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "bytes": 598, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/Dockerfile" + }, + "components/mimo-code/source_bundle/pristine-other/requirements-shared.txt": { + "sha256": "34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526", + "bytes": 364, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/requirements-shared.txt" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/LICENSE": { + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "bytes": 11358, + "role": "license", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/LICENSE" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/__init__.py": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/__init__.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/errors.py": { + "sha256": "082bb8b1c061c3ce920949abc37528ec77e292758ce68423657cd5d2d87897a0", + "bytes": 47, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/errors.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/events.py": { + "sha256": "b92752fa2da3ff17c53e164eccf8a91905ed6fb71551c531d7927ff0a9dab271", + "bytes": 9388, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/events.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/interface.py": { + "sha256": "22061b1f10090bbecda41391007c7e2295baaf4f1f4797b5babff82bd43a5387", + "bytes": 57, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/interface.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/manager.py": { + "sha256": "0d84bc47cd82f1d57e884c918b5dd75d81bbc1a80380890b3a54edd420e0f22c", + "bytes": 117, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/manager.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/time_events.py": { + "sha256": "69aa7937cb245410683d37f42ceebaff039d2b5796065f4c0c4618290ffb4a5e", + "bytes": 1533, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/time_events.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/windows_events.py": { + "sha256": "1be04adf9ae090fa68333eb26f087e4d09edecb843340404e9b51bedf32a94aa", + "bytes": 2591, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/windows_events.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/lib/definitions.py": { + "sha256": "a11900d7bc98b80e318e0967f0218aca2e304d328954da20139fc342bb2fb697", + "bytes": 5463, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/lib/definitions.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/interface.py": { + "sha256": "e18590112b9db1dfcc0c4df44750678cc886134452e1619248a2ef07544d7143", + "bytes": 8216, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/interface.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/mediator.py": { + "sha256": "ff2e0bed3543e230ff9d98b044356199e9419b99cef7faa997d21811d598ab4a", + "bytes": 19710, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/mediator.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/plugins.py": { + "sha256": "88a70819243e00cf6557c40c1ebe21eb87ee06272e69c18d7c93ea6c5baac0b4", + "bytes": 237, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/plugins.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_parser.py": { + "sha256": "f5f747e98a017ebd019ddba45c36ea73c5de1f3b48d3238cec8cb44b39919793", + "bytes": 9145, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_parser.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/default.py": { + "sha256": "e026e975023b44b9c99dfb22b1d4d4b99d396019aed592d08bf2adc636ccc069", + "bytes": 1117, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/default.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/interface.py": { + "sha256": "2ef4e78f16ef5a1c9850aa08615737d01e2953d837dbf4692d9be18f205439e2", + "bytes": 10999, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/interface.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py": { + "sha256": "4711ac18d81ff23cf782b870861ef5f841a14cbfccc23fcaa7d995d6df04ee7e", + "bytes": 2569, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/services.py": { + "sha256": "b33bf0efb841b2d19941aa2dc1b517fac09b60dc50f2c01841231cd04195ad27", + "bytes": 4596, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/services.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py": { + "sha256": "956ba2a62fdb6860f71a345b4bdeffdda1b90de618f2fc51a29a7ebea829641a", + "bytes": 2521, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/pytz/__init__.py": { + "sha256": "84d16f933ae230cb9c53ec4d0addc397380705017079ee8c5430465b1035a6fb", + "bytes": 45, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/pytz/__init__.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/requirements.txt": { + "sha256": "ad2fab71ce6887529d53aaedaf50b793a769e8ac34c596342e00491434a6ebd3", + "bytes": 1314, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/requirements.txt" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/setup.py": { + "sha256": "9c3a29f59a514add92378b7885a35b73a9695631fcc27849ed198fe481f33fc6", + "bytes": 7363, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/setup.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/100_sub_keys.hiv": { + "sha256": "67aa9abe820736c53b272f93e86569d3aa7ef113fcff02696ebcd34185d991c5", + "bytes": 24576, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/100_sub_keys.hiv" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv": { + "sha256": "370cdc7037cd01aeeae15dd0e86a44239138425372efd2cf35f066c1fbb36f50", + "bytes": 24576, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tests/parsers/winreg_plugins/interface.py": { + "sha256": "4e7e2bb2ff10353a6b8ec54b11ed0420b8ab6c45483c7e77e761accb310acd75", + "bytes": 7334, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tests/parsers/winreg_plugins/interface.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/__init__.py": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/__init__.py" + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/run_case.py": { + "sha256": "5906eb2e26a100d1b993cc982ebdc7cbb18d74788a70f3446e8e7a50c04b111d", + "bytes": 3920, + "role": "original_input", + "source_lock": "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/run_case.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/__init__.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/actor_launcher.py": { + "sha256": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "bytes": 5012, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/actor_launcher.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/backend.py": { + "sha256": "691b1b428f7134e98b27e402b735b3f6be36439ab64865bf3e4fc343a676ebe3", + "bytes": 14437, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/backend.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/code_child_launcher.py": { + "sha256": "4ebf25639af6ccbe8faad346be45e2b5dd778e659b2a34faec51b6ad62e68102", + "bytes": 817, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/code_child_launcher.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/environment.py": { + "sha256": "ef8546819e3ece598ae9032254beb550f030f703f486bbfa9fe754a321f85430", + "bytes": 1625, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/environment.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/guard.py": { + "sha256": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "bytes": 13254, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/guard.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/launch_service.py": { + "sha256": "e5df97cf4e32894de79f90ea5f70074fd83cdcfe191a1c013af737fbbad02025", + "bytes": 2388, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/launch_service.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/server.py": { + "sha256": "37679a90257e5907fec750293fb74610c95400e46db0a4905973bb6e9a3d96b1", + "bytes": 645, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/server.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/trusted_checker.py": { + "sha256": "62ff949eeda90727ac3cae771454b12ea35d4c6fa1b51ae9333f5bdb82fbe94d", + "bytes": 2799, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/trusted_checker.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/verifier_launcher.py": { + "sha256": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "bytes": 962, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/verifier_launcher.py" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/code_runtime/wire_client.py" + }, + "components/mimo-code/source_bundle/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/common/__init__.py" + }, + "components/mimo-code/source_bundle/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/common/contracts.py" + }, + "components/mimo-code/source_bundle/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/common/http_routes.py" + }, + "components/mimo-code/source_bundle/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "adapter", + "source_lock": "components/mimo-code/source_bundle/runtime/common/models.py" + }, + "components/mimo-code/source_bundle/source/instruction.md": { + "sha256": "44d9729328960cc04484e8ff23d492ac54edfc83f5910c24301742c895b96920", + "bytes": 2035, + "role": "original_instruction", + "source_lock": "components/mimo-code/source_bundle/source/instruction.md" + }, + "components/mimo-code/source_bundle/source/task.toml": { + "sha256": "5cc7f78314cff7486514a872696334ea7add1614ab4d0e0c575f281a89f7425d", + "bytes": 3264, + "role": "dependency", + "source_lock": "components/mimo-code/source_bundle/source/task.toml" + }, + "components/mimo-code/source_bundle/source/tests/anti_hack_guard.py": { + "sha256": "336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a", + "bytes": 5030, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source/tests/anti_hack_guard.py" + }, + "components/mimo-code/source_bundle/source/tests/fixtures/pristine_env_manifest.json": { + "sha256": "544b5385c6ded480cc93e3c39938fce50b1ec7185d6e6052c5d53b9514968921", + "bytes": 3288, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source/tests/fixtures/pristine_env_manifest.json" + }, + "components/mimo-code/source_bundle/source/tests/fixtures/regression_cases.json": { + "sha256": "24593e6c78d47ddcb3e95e62464ca66169005ef390b5bef717a1bc3952f1fb38", + "bytes": 2886, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source/tests/fixtures/regression_cases.json" + }, + "components/mimo-code/source_bundle/source/tests/task_test.sh": { + "sha256": "786d65d844825a6cc7827d64dd9b34f388ef1f2be78c609e3a84ede8ed363bf1", + "bytes": 936, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source/tests/task_test.sh" + }, + "components/mimo-code/source_bundle/source/tests/test.sh": { + "sha256": "5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35", + "bytes": 765, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source/tests/test.sh" + }, + "components/mimo-code/source_bundle/source/tests/test_outputs.py": { + "sha256": "ae66085efc08ce1ac14b78e4aa9635452528c4ace0c2eddb79aeb3c023487a0c", + "bytes": 7278, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source/tests/test_outputs.py" + }, + "components/mimo-code/source_bundle/source-other/instruction.md": { + "sha256": "6d55a1b1cb882a951518a74f06dbd70bdb845a3669b4ad0210e4aff0c56d82a3", + "bytes": 1831, + "role": "original_instruction", + "source_lock": "components/mimo-code/source_bundle/source-other/instruction.md" + }, + "components/mimo-code/source_bundle/source-other/task.toml": { + "sha256": "88538e9f67364bbdea3a753ba3a6cb3cc66ca998e2e6ffe2e92190e36125f1bd", + "bytes": 3324, + "role": "dependency", + "source_lock": "components/mimo-code/source_bundle/source-other/task.toml" + }, + "components/mimo-code/source_bundle/source-other/tests/anti_hack_guard.py": { + "sha256": "336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a", + "bytes": 5030, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source-other/tests/anti_hack_guard.py" + }, + "components/mimo-code/source_bundle/source-other/tests/fixtures/expected.json": { + "sha256": "5ceff9d56caaa93b84f9d8bdc55009efca27f7e3e0fe9f6e7fc18e2f6aca9b1b", + "bytes": 580, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source-other/tests/fixtures/expected.json" + }, + "components/mimo-code/source_bundle/source-other/tests/fixtures/pristine_env_manifest.json": { + "sha256": "dcd500a72c68f04bd5d7b9faadde661274cb2648fb1d064b79b868908463b756", + "bytes": 3396, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source-other/tests/fixtures/pristine_env_manifest.json" + }, + "components/mimo-code/source_bundle/source-other/tests/task_test.sh": { + "sha256": "8152f7541a6105f16a8da923f375093607fddf1adba35c816eab455080af061e", + "bytes": 800, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source-other/tests/task_test.sh" + }, + "components/mimo-code/source_bundle/source-other/tests/test.sh": { + "sha256": "5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35", + "bytes": 765, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source-other/tests/test.sh" + }, + "components/mimo-code/source_bundle/source-other/tests/test_outputs.py": { + "sha256": "266d7ff9688685eef6ee0fbe7a35935dfe1fed615604843d175a9369adb6a279", + "bytes": 1774, + "role": "original_checker", + "source_lock": "components/mimo-code/source_bundle/source-other/tests/test_outputs.py" + }, + "components/pdbthink/DEPENDENCIES.json": { + "sha256": "b0cbd2dbfe130357ab86c48b3f0ee1acca985828022542d97f1f9d77e147f261", + "bytes": 46444, + "role": "dependency", + "source_lock": "components/pdbthink/DEPENDENCIES.json" + }, + "components/pdbthink/Dockerfile": { + "sha256": "0c2bd4c86b8d834a907605e71d8dc3763513da29cf07c324eb718c8818b1ec45", + "bytes": 1057, + "role": "adapter", + "source_lock": "components/pdbthink/Dockerfile" + }, + "components/pdbthink/config.json": { + "sha256": "4ac5bc8faf3c53e689d3e1857e81c904da28c239dacc10e69c6f6bee67ba687a", + "bytes": 3638, + "role": "runtime_registry", + "source_lock": "components/pdbthink/config.json" + }, + "components/pdbthink/licenses/DEPENDENCIES.json": { + "sha256": "7c98afbca1961f056579b344a5552c574582c6c19926578a748519fdd99496d7", + "bytes": 54492, + "role": "license", + "source_lock": "components/pdbthink/licenses/DEPENDENCIES.json" + }, + "components/pdbthink/licenses/LICENSE-PDBTHINK": { + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "bytes": 11357, + "role": "license", + "source_lock": "components/pdbthink/licenses/LICENSE-PDBTHINK" + }, + "components/pdbthink/licenses/SOURCE.json": { + "sha256": "ce75bb41edfeadb6dbe07aa8a8feacc4ed326c27695327ab56a45d80f38045cc", + "bytes": 872, + "role": "license", + "source_lock": "components/pdbthink/licenses/SOURCE.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/public_task.json": { + "sha256": "56e4865b7517b35a7d316a8881561b622f10af0b29bd8394c59a4316ae285e1c", + "bytes": 6132, + "role": "delivery_adaptation", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/public_task.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/gold.json": { + "sha256": "1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4", + "bytes": 253, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/gold.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/test.sh" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verify.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/public_task.json": { + "sha256": "5d2dfa7c57a5c628a9c12cd097e7b644a155e380f1f6af48233560dbab0b4376", + "bytes": 6771, + "role": "delivery_adaptation", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/public_task.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json": { + "sha256": "995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390", + "bytes": 251, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/public_task.json": { + "sha256": "7d267c32438351a4d92533f6e9960da36a1e39c768ad56988904029cb90da0c5", + "bytes": 9092, + "role": "delivery_adaptation", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/public_task.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json": { + "sha256": "4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7", + "bytes": 253, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "source_lock": "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py" + }, + "components/pdbthink/requirements.lock": { + "sha256": "0078892ae5870080b3417677926bc64f4f87ba9e8110ff400f18954e361455fc", + "bytes": 10799, + "role": "dependency", + "source_lock": "components/pdbthink/requirements.lock" + }, + "components/pdbthink/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/common/__init__.py" + }, + "components/pdbthink/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/common/contracts.py" + }, + "components/pdbthink/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/common/http_routes.py" + }, + "components/pdbthink/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/common/models.py" + }, + "components/pdbthink/runtime/pdbthink/__init__.py": { + "sha256": "9f56e761d79bfdb34304a012586cb04d16b435ef6130091a97702e559260a2f2", + "bytes": 5, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/pdbthink/__init__.py" + }, + "components/pdbthink/runtime/pdbthink/adapter.py": { + "sha256": "1683d5e2fab016801207ecdde6cbd4d3730ed8c4ca22aafd0f3bf651dce0faf1", + "bytes": 6708, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/pdbthink/adapter.py" + }, + "components/pdbthink/runtime/pdbthink/launch_service.py": { + "sha256": "cc89f1e687da1a71af567ac450fd761da0e5d4fe56901695de304aabd81c59bd", + "bytes": 2443, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/pdbthink/launch_service.py" + }, + "components/pdbthink/runtime/pdbthink/openenv_app.py": { + "sha256": "7ab1b3b05068cd5b0f20497062a8da5fd905c45e8eee295cb8f2fc5c7aca6577", + "bytes": 4033, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/pdbthink/openenv_app.py" + }, + "components/pdbthink/runtime/pdbthink/server.py": { + "sha256": "76012b37d916b4044c6fe1da4e7accdf9faa2216f50c73d5b87cd12b7f1d70cf", + "bytes": 840, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/pdbthink/server.py" + }, + "components/pdbthink/runtime/pdbthink/transport.py": { + "sha256": "b1f6f82ff9e113aedd742a8f4b0c18c545020677503765ee913c31e20964b96f", + "bytes": 6739, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/pdbthink/transport.py" + }, + "components/pdbthink/runtime/pdbthink/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "adapter", + "source_lock": "components/pdbthink/runtime/pdbthink/wire_client.py" + }, + "components/tmax/DEPENDENCIES.json": { + "sha256": "58d031f7955f7f774733189b8297a1db7f515bb206c26ac50fad68f580848974", + "bytes": 166362, + "role": "installed_dependency_inventory", + "source_lock": "components/tmax/DEPENDENCIES.json" + }, + "components/tmax/FILE_ALLOWLIST.json": { + "sha256": "a29f4e2ba9e60f543f7f0ff90c16bc7515fd2175ea7abaacff73f0bd7f7e91e4", + "bytes": 60752, + "role": "review_record_snapshot", + "source_lock": "components/tmax/FILE_ALLOWLIST.json" + }, + "components/tmax/LICENSE_SCOPE.json": { + "sha256": "9ae187d852f4cd6974fc9c65fba942df4e5586d73ddb3c48916a09376a3d36ac", + "bytes": 1360, + "role": "license_and_attribution", + "source_lock": "components/tmax/LICENSE_SCOPE.json" + }, + "components/tmax/NOTICE.txt": { + "sha256": "f30eb64313c2645348ca3d965c40c9a466eb3754f3302206e44133d19bc87d6a", + "bytes": 2235, + "role": "license_and_attribution", + "source_lock": "components/tmax/NOTICE.txt" + }, + "components/tmax/SOURCE.json": { + "sha256": "8228f41f6ed3488d787e85f78ec8d9358ff8d5d515c6ec537ab0eb06537048d1", + "bytes": 3663, + "role": "source_provenance_metadata", + "source_lock": "components/tmax/SOURCE.json" + }, + "components/tmax/TASKS.json": { + "sha256": "9296f353c436adf1f5019adb05854fec1bb4601f8201a3f5763bf3b4116399e5", + "bytes": 18908, + "role": "source_provenance_metadata", + "source_lock": "components/tmax/TASKS.json" + }, + "components/tmax/config.json": { + "sha256": "9ffea3f8661105381b8db21a63e9d641b4a2f2c6a3cae9c4de963a51d8d5d8d8", + "bytes": 9224, + "role": "local_runtime_configuration", + "source_lock": "components/tmax/config.json" + }, + "components/tmax/licenses/ODC-BY-1.0.txt": { + "sha256": "11a6d83734845ad09d809667aa219857a5b985b28c258a2eebf5677668a6bd3b", + "bytes": 19977, + "role": "license_and_attribution", + "source_lock": "components/tmax/licenses/ODC-BY-1.0.txt" + }, + "components/tmax/licenses/TMAX_DATASET_README.md": { + "sha256": "0e66e8816b8f2b4a17d37ec7abc5b8ca5708bae9d71d2c5323d8666d7e7ffa1d", + "bytes": 1830, + "role": "license_and_attribution", + "source_lock": "components/tmax/licenses/TMAX_DATASET_README.md" + }, + "components/tmax/requirements.lock": { + "sha256": "836618cb7e01e236878d367272157e4be6a31d538bf8b9f8cc9ed630aac04482", + "bytes": 10667, + "role": "sdk_dependency_hash_lock", + "source_lock": "components/tmax/requirements.lock" + }, + "components/tmax/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/common/__init__.py" + }, + "components/tmax/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/common/contracts.py" + }, + "components/tmax/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/common/http_routes.py" + }, + "components/tmax/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/common/models.py" + }, + "components/tmax/runtime/native_shell/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/__init__.py" + }, + "components/tmax/runtime/native_shell/actor_launcher.py": { + "sha256": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "bytes": 5012, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/actor_launcher.py" + }, + "components/tmax/runtime/native_shell/backend.py": { + "sha256": "1a60616f3539f34ab141b3e58292369936844a5c3c4ceba3f58814e04f30b7fe", + "bytes": 13860, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/backend.py" + }, + "components/tmax/runtime/native_shell/environment.py": { + "sha256": "cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53", + "bytes": 1616, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/environment.py" + }, + "components/tmax/runtime/native_shell/guard.py": { + "sha256": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "bytes": 13254, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/guard.py" + }, + "components/tmax/runtime/native_shell/launch_service.py": { + "sha256": "db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b", + "bytes": 2383, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/launch_service.py" + }, + "components/tmax/runtime/native_shell/server.py": { + "sha256": "3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e", + "bytes": 640, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/server.py" + }, + "components/tmax/runtime/native_shell/verifier_launcher.py": { + "sha256": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "bytes": 962, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/verifier_launcher.py" + }, + "components/tmax/runtime/native_shell/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "local_runtime_adapter", + "source_lock": "components/tmax/runtime/native_shell/wire_client.py" + }, + "components/tmax/tasks/task_000056_f726766b/source/external/app/vibration_data.wav": { + "sha256": "eab8396a1b533f70468039f8ac1b5fe9927faf4ded578172ec932ef7bf2af22a", + "bytes": 40058, + "role": "original_materialized_immutable_input", + "source_lock": "components/tmax/tasks/task_000056_f726766b/source/external/app/vibration_data.wav" + }, + "components/tmax/tasks/task_000056_f726766b/source/instruction.md": { + "sha256": "714f780883970365cfffe408e2c76e75f499005f87551fc84b55d79368e77197", + "bytes": 1851, + "role": "original_instruction", + "source_lock": "components/tmax/tasks/task_000056_f726766b/source/instruction.md" + }, + "components/tmax/tasks/task_000056_f726766b/source/task.toml": { + "sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "bytes": 981, + "role": "runtime_task_metadata", + "source_lock": "components/tmax/tasks/task_000056_f726766b/source/task.toml" + }, + "components/tmax/tasks/task_000056_f726766b/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_000056_f726766b/source/tests/test.sh" + }, + "components/tmax/tasks/task_000056_f726766b/source/tests/test_final_state.py": { + "sha256": "327c5346a779a44e27ef0cbd9f107e863d599fc6e47f95f248eaec03c15117c4", + "bytes": 2866, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_000056_f726766b/source/tests/test_final_state.py" + }, + "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/find_threshold.sh": { + "sha256": "a6c4cf2043d8642babb9b546096b3f559a375b59d54a43efebd57e9728466184", + "bytes": 720, + "role": "original_materialized_editable_input", + "source_lock": "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/find_threshold.sh" + }, + "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/process.sh": { + "sha256": "4631f1f805e6b826a796502ed5d94e676b3061cf448f2f9225116395aa3bb13b", + "bytes": 500, + "role": "original_materialized_editable_input", + "source_lock": "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/process.sh" + }, + "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/serialize.sh": { + "sha256": "f3ae2df41978712dbffe58665a9582e3d0951f211c5cca5ece9f536225d28ba8", + "bytes": 303, + "role": "original_materialized_editable_input", + "source_lock": "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/serialize.sh" + }, + "components/tmax/tasks/task_000260_7b7cc286/source/external/app/video.mp4": { + "sha256": "3c04251fe92c30d29ac4d887608f4385176e3bda932594437f82b08a5b348938", + "bytes": 7671, + "role": "original_materialized_immutable_input", + "source_lock": "components/tmax/tasks/task_000260_7b7cc286/source/external/app/video.mp4" + }, + "components/tmax/tasks/task_000260_7b7cc286/source/instruction.md": { + "sha256": "79c9fd4e4d41524db109d90b0415a4f0a2b9d24bf690fa8d7340ce3cb5ce0975", + "bytes": 2015, + "role": "original_instruction", + "source_lock": "components/tmax/tasks/task_000260_7b7cc286/source/instruction.md" + }, + "components/tmax/tasks/task_000260_7b7cc286/source/task.toml": { + "sha256": "d36c49060b4ddbca3b13a5aa98cf5b195c07bff725b91107f58a087ec4325423", + "bytes": 961, + "role": "runtime_task_metadata", + "source_lock": "components/tmax/tasks/task_000260_7b7cc286/source/task.toml" + }, + "components/tmax/tasks/task_000260_7b7cc286/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_000260_7b7cc286/source/tests/test.sh" + }, + "components/tmax/tasks/task_000260_7b7cc286/source/tests/test_final_state.py": { + "sha256": "aae204101d5c024a0b5cbda42fa686e7d2928fd9be3ad55fd14314b2502182a5", + "bytes": 2007, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_000260_7b7cc286/source/tests/test_final_state.py" + }, + "components/tmax/tasks/task_000663_dff2c340/pristine/backup_catalog.db": { + "sha256": "170911a153d00eb0f037ca56a2cbd10d4aa2b7a418e25a0f1df58b1c77589788", + "bytes": 12288, + "role": "original_materialized_immutable_input", + "source_lock": "components/tmax/tasks/task_000663_dff2c340/pristine/backup_catalog.db" + }, + "components/tmax/tasks/task_000663_dff2c340/source/instruction.md": { + "sha256": "feae25374139b4b1d8ec9759d553c591841d9330a071217f46a2e464bd32bbd7", + "bytes": 1841, + "role": "original_instruction", + "source_lock": "components/tmax/tasks/task_000663_dff2c340/source/instruction.md" + }, + "components/tmax/tasks/task_000663_dff2c340/source/task.toml": { + "sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "bytes": 852, + "role": "runtime_task_metadata", + "source_lock": "components/tmax/tasks/task_000663_dff2c340/source/task.toml" + }, + "components/tmax/tasks/task_000663_dff2c340/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_000663_dff2c340/source/tests/test.sh" + }, + "components/tmax/tasks/task_000663_dff2c340/source/tests/test_final_state.py": { + "sha256": "7a273b9bf8bc61eeec1b8dda674b5f6ba5356abbfd923b413b09d2584c1ef72f", + "bytes": 3341, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_000663_dff2c340/source/tests/test_final_state.py" + }, + "components/tmax/tasks/task_005684_3c8594a3/pristine/compliance_audit.db": { + "sha256": "9fe1c89ee823f133d35dea66840ecb7f87d599487524b7aa1d6371e8f664058e", + "bytes": 20480, + "role": "original_materialized_immutable_input", + "source_lock": "components/tmax/tasks/task_005684_3c8594a3/pristine/compliance_audit.db" + }, + "components/tmax/tasks/task_005684_3c8594a3/source/instruction.md": { + "sha256": "f4eee4e0643fcfb7399df10e1947ec9dbda28c74bacf307167f443506268f583", + "bytes": 1801, + "role": "original_instruction", + "source_lock": "components/tmax/tasks/task_005684_3c8594a3/source/instruction.md" + }, + "components/tmax/tasks/task_005684_3c8594a3/source/task.toml": { + "sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "bytes": 850, + "role": "runtime_task_metadata", + "source_lock": "components/tmax/tasks/task_005684_3c8594a3/source/task.toml" + }, + "components/tmax/tasks/task_005684_3c8594a3/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_005684_3c8594a3/source/tests/test.sh" + }, + "components/tmax/tasks/task_005684_3c8594a3/source/tests/test_final_state.py": { + "sha256": "495630c7ede4e75ef5644c1ee5b69f04969a4059ef094787c19a3014734d3cf2", + "bytes": 4306, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_005684_3c8594a3/source/tests/test_final_state.py" + }, + "components/tmax/tasks/task_008667_2151f271/pristine/data/financial.db": { + "sha256": "d6b5039ee32f3a43069245984c8fe5a9689028a9aac06e26a64017c54bd11976", + "bytes": 20480, + "role": "original_materialized_immutable_input", + "source_lock": "components/tmax/tasks/task_008667_2151f271/pristine/data/financial.db" + }, + "components/tmax/tasks/task_008667_2151f271/pristine/data/transactions.jsonl": { + "sha256": "629b28471809f802c58831d100315b83012c0066df3b265a2d379a19e61a2262", + "bytes": 937, + "role": "original_materialized_immutable_input", + "source_lock": "components/tmax/tasks/task_008667_2151f271/pristine/data/transactions.jsonl" + }, + "components/tmax/tasks/task_008667_2151f271/source/instruction.md": { + "sha256": "50d1d10121dfa3b565842fd10f2589ceb91b4459126787af7793cec9cc0d06b1", + "bytes": 2436, + "role": "original_instruction", + "source_lock": "components/tmax/tasks/task_008667_2151f271/source/instruction.md" + }, + "components/tmax/tasks/task_008667_2151f271/source/task.toml": { + "sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "bytes": 967, + "role": "runtime_task_metadata", + "source_lock": "components/tmax/tasks/task_008667_2151f271/source/task.toml" + }, + "components/tmax/tasks/task_008667_2151f271/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_008667_2151f271/source/tests/test.sh" + }, + "components/tmax/tasks/task_008667_2151f271/source/tests/test_final_state.py": { + "sha256": "cb73fd0ab1765768ebfecc50054ba13c143cc51be201127515eb495904ddf9e6", + "bytes": 3674, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_008667_2151f271/source/tests/test_final_state.py" + }, + "components/tmax/tasks/task_008998_ae4cbe72/pristine/robot_dump.log.gz": { + "sha256": "909d2e964c0831d8af91b722b4424ed829c261d6b7db1a95180d8a809527ddaf", + "bytes": 261, + "role": "original_materialized_immutable_input", + "source_lock": "components/tmax/tasks/task_008998_ae4cbe72/pristine/robot_dump.log.gz" + }, + "components/tmax/tasks/task_008998_ae4cbe72/source/instruction.md": { + "sha256": "f81f86b07681931baabdba313cc4e988c01bff7a1f1d83349dfa939cdaa20669", + "bytes": 1919, + "role": "original_instruction", + "source_lock": "components/tmax/tasks/task_008998_ae4cbe72/source/instruction.md" + }, + "components/tmax/tasks/task_008998_ae4cbe72/source/task.toml": { + "sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "bytes": 823, + "role": "runtime_task_metadata", + "source_lock": "components/tmax/tasks/task_008998_ae4cbe72/source/task.toml" + }, + "components/tmax/tasks/task_008998_ae4cbe72/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_008998_ae4cbe72/source/tests/test.sh" + }, + "components/tmax/tasks/task_008998_ae4cbe72/source/tests/test_final_state.py": { + "sha256": "e03b84ca0519367e5f86b7b3a3231afa5209b1971431497699200099035f5014", + "bytes": 2893, + "role": "original_checker", + "source_lock": "components/tmax/tasks/task_008998_ae4cbe72/source/tests/test_final_state.py" + }, + "components/tmax/upstream/task_000056_f726766b/environment/Dockerfile": { + "sha256": "c44d259c4421b16dc5f0bc3912cdd800f6c25746ea31bede5060c9605b225025", + "bytes": 521, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000056_f726766b/environment/Dockerfile" + }, + "components/tmax/upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.label.txt": { + "sha256": "fc9e91cc78e1817d80b4ba8c2dc9a638d0c57959825ee34f5e3d7688ad80dfb9", + "bytes": 3, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.label.txt" + }, + "components/tmax/upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.wav": { + "sha256": "f55a8eec263c9be975b2adccdda6a07c680109b851a89f55779f14076aaa30d5", + "bytes": 16044, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.wav" + }, + "components/tmax/upstream/task_000056_f726766b/environment/base_install.sh": { + "sha256": "0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637", + "bytes": 2849, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000056_f726766b/environment/base_install.sh" + }, + "components/tmax/upstream/task_000056_f726766b/environment/post_install.sh": { + "sha256": "70d52288d5c9a7d23bbd63fb086a7f886961a1335632cc6efb892572d197563b", + "bytes": 940, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000056_f726766b/environment/post_install.sh" + }, + "components/tmax/upstream/task_000056_f726766b/task.toml": { + "sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "bytes": 981, + "role": "upstream_task_metadata", + "source_lock": "components/tmax/upstream/task_000056_f726766b/task.toml" + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/Dockerfile": { + "sha256": "98f66d958e8ee701c0579095c2e65254a63194845b894a45db2a6180a46a3193", + "bytes": 521, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000260_7b7cc286/environment/Dockerfile" + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.label.txt": { + "sha256": "4a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd5", + "bytes": 2, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.label.txt" + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.mp4": { + "sha256": "bf759113108b136ec3b5fa507d035c1e66ac243b52da09fa07ab58566ee27f58", + "bytes": 3342, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.mp4" + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/base_install.sh": { + "sha256": "0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637", + "bytes": 2849, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000260_7b7cc286/environment/base_install.sh" + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/post_install.sh": { + "sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "bytes": 2093, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000260_7b7cc286/environment/post_install.sh" + }, + "components/tmax/upstream/task_000260_7b7cc286/task.toml": { + "sha256": "483c9171d3e67bec029d9b88cee24d554fa9310a61ec47940312be5f2951bc30", + "bytes": 954, + "role": "upstream_task_metadata", + "source_lock": "components/tmax/upstream/task_000260_7b7cc286/task.toml" + }, + "components/tmax/upstream/task_000663_dff2c340/environment/Dockerfile": { + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000663_dff2c340/environment/Dockerfile" + }, + "components/tmax/upstream/task_000663_dff2c340/environment/post_install.sh": { + "sha256": "a449c18295cee8a3e7ed0c958fe219cbed2d2a8e7fdad924f2679444b3377b94", + "bytes": 1661, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_000663_dff2c340/environment/post_install.sh" + }, + "components/tmax/upstream/task_000663_dff2c340/task.toml": { + "sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "bytes": 852, + "role": "upstream_task_metadata", + "source_lock": "components/tmax/upstream/task_000663_dff2c340/task.toml" + }, + "components/tmax/upstream/task_005684_3c8594a3/environment/Dockerfile": { + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_005684_3c8594a3/environment/Dockerfile" + }, + "components/tmax/upstream/task_005684_3c8594a3/environment/post_install.sh": { + "sha256": "b431517fec535c62b42b517f9212cbb1e9cf80bdf883a55c02bfba08f0d4c404", + "bytes": 2072, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_005684_3c8594a3/environment/post_install.sh" + }, + "components/tmax/upstream/task_005684_3c8594a3/task.toml": { + "sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "bytes": 850, + "role": "upstream_task_metadata", + "source_lock": "components/tmax/upstream/task_005684_3c8594a3/task.toml" + }, + "components/tmax/upstream/task_008667_2151f271/environment/Dockerfile": { + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_008667_2151f271/environment/Dockerfile" + }, + "components/tmax/upstream/task_008667_2151f271/environment/post_install.sh": { + "sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841", + "bytes": 2459, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_008667_2151f271/environment/post_install.sh" + }, + "components/tmax/upstream/task_008667_2151f271/task.toml": { + "sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "bytes": 967, + "role": "upstream_task_metadata", + "source_lock": "components/tmax/upstream/task_008667_2151f271/task.toml" + }, + "components/tmax/upstream/task_008998_ae4cbe72/environment/Dockerfile": { + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_008998_ae4cbe72/environment/Dockerfile" + }, + "components/tmax/upstream/task_008998_ae4cbe72/environment/post_install.sh": { + "sha256": "26dfa63d063430c2370144b8e30c1f905dde4e2722403c1e8131a5a84e2d5e69", + "bytes": 723, + "role": "upstream_environment_reference", + "source_lock": "components/tmax/upstream/task_008998_ae4cbe72/environment/post_install.sh" + }, + "components/tmax/upstream/task_008998_ae4cbe72/task.toml": { + "sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "bytes": 823, + "role": "upstream_task_metadata", + "source_lock": "components/tmax/upstream/task_008998_ae4cbe72/task.toml" + }, + "prepare_source_tree.py": { + "role": "package_documentation_or_validation", + "sha256": "abea24b268b08f72897859e527fe90c89c08d2afab7305cf52d4255f2feeb897", + "bytes": 1352 + }, + "schema.json": { + "sha256": "10993deaaa8553929fa0b3b6bf3c1ad100baaaf9ff10ae8ed139a8ec4279a3c4", + "bytes": 1911, + "role": "package_registration" + }, + "tasks.jsonl": { + "sha256": "5eba017b2fb18e65bb63d7116df8aa502c90e157c5be4d67021b60a57b7ae848", + "bytes": 12416, + "role": "package_registration" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/environment/Dockerfile": { + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "bytes": 144, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/environment/Dockerfile" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/instruction.md": { + "sha256": "33d86986d7b9d0a12678be7326d02048cf812cb536fc45fdb2837c9772c64ddf", + "bytes": 5198, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/instruction.md" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/prompt.json": { + "sha256": "f61bc6944b49d7a8095eef3903cd4b10982417f02c04f4d2b47620dd2128f30d", + "bytes": 5309, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/prompt.json" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/task.toml": { + "sha256": "eaf162755c72fae0936eab27b370732356f5b184aa1077e543b46f8ce327db7d", + "bytes": 561, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/task.toml" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/gold.json": { + "sha256": "1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4", + "bytes": 253, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/gold.json" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/test.sh" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/verify.py" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/environment/Dockerfile": { + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "bytes": 144, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/environment/Dockerfile" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/instruction.md": { + "sha256": "1eba6ac44775863993c8215f0d146cdccc7e8874a05b694e79db776e375dd7b1", + "bytes": 5829, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/instruction.md" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/prompt.json": { + "sha256": "77c1f05eb4f17a1d1b3291d916c999104262acfd9180ef775fa51232228ec2bc", + "bytes": 5948, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/prompt.json" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/task.toml": { + "sha256": "3c85ab2cfb5782ee7b40bd4fb0ef1b323d1874e6f2ffb23554b7b630ea46454c", + "bytes": 561, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/task.toml" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json": { + "sha256": "995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390", + "bytes": 251, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml" + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/environment/Dockerfile": { + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "bytes": 144, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/environment/Dockerfile" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/instruction.md": { + "sha256": "21dc586748f23a8630118831399e1c40d62443444d454bf6f5e7f60ba334b06f", + "bytes": 8121, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/instruction.md" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/prompt.json": { + "sha256": "97d07b9814fff65f7cd78bf968d4854aa2aa75e8535ceb574b35a93dbf087db0", + "bytes": 8269, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/prompt.json" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/task.toml": { + "sha256": "45af241c0dc3ed0b71fff4db4b2f334760bc387aaff0a74a6dc9543cce2effe1", + "bytes": 561, + "role": "original_source", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/task.toml" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json": { + "sha256": "4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7", + "bytes": 253, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml" + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "source_lock": "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py" + }, + "validate_dataset.py": { + "sha256": "26ee528d240a5208cf89d540b8e0a3ceb26435a15dc1fbb57f7034c8e6eec980", + "bytes": 10561, + "role": "package_documentation_or_validation" + } + } +} diff --git a/README.md b/README.md index 35175eaedbce40b03a0e8ff3828545d1005833c5..cd79f52db528f7afbe4f4061217e5b35bebfdf18 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,51 @@ --- +language: +- en license: other -license_name: custom -license_link: LICENSE +license_name: mixed-upstream-licenses +license_link: https://huggingface.co/datasets/bochencs/openenv-multidomain/blob/main/LICENSES/README.txt +task_categories: +- reinforcement-learning +size_categories: +- n<1K +tags: +- openenv +- harbor +- multi-domain +configs: +- config_name: default + data_files: + - split: train + path: tasks.jsonl --- + +This dataset contains 15 fixed training tasks served by five OpenEnv images. + +| Task type | Count | Source | +|---|---:|---| +| Software repair | 2 | MiMo | +| Database and financial data processing | 3 | TMax | +| Business API workflows | 1 | AgentWorldModel | +| Manufacturing log processing | 1 | TMax | +| Video analysis | 1 | TMax | +| Physical parameter identification | 1 | TMax | +| Mathematical constraint construction | 3 | MathConstruct | +| Protein geometry | 3 | PDBThink | + +`tasks.jsonl` lists task IDs, original instruction paths, and pinned source revisions. Each ID represents one original task. Reset restores its original inputs or database. The preserved original checkers compute binary rewards of 0 or 1. + +`components/` contains runtime adapters, original tasks, inputs, checkers, and dependency records. `upstream/` preserves original Harbor materials. All images serve `schema.json`. Software, data, and mathematical tasks use `exec` and `finish`; business tasks use `call` and `finish`; protein tasks accept one `submit_answer` call. + +`REGISTRATION.json` lists the 15 registered training IDs and two unregistered alternatives available in the images. `SOURCE_LOCK.json`, `MANIFEST.json`, and `SHA256SUMS` record source provenance and file hashes. Licenses and attribution appear in `LICENSES/README.txt` and the component notices. + +Validate the local dataset: + +```sh +python3 -B validate_dataset.py +``` + +Restore required source directories after downloading from Hugging Face: + +```sh +python3 -B prepare_source_tree.py +``` diff --git a/REGISTRATION.json b/REGISTRATION.json new file mode 100644 index 0000000000000000000000000000000000000000..c920164b4bc00d398304e1c092a09b02aeae43ad --- /dev/null +++ b/REGISTRATION.json @@ -0,0 +1,33 @@ +{ + "selected_task_ids": [ + "candidate-1005-software-systems", + "task_008667_2151f271", + "construct-mc-ramsey-l4-s0", + "awm-accounting-1-invoice", + "task_000260_7b7cc286", + "pdbthink-s09-70c0778d985e571dde37", + "task_000663_dff2c340", + "candidate-1001-security-forensics", + "task_000056_f726766b", + "construct-mc-social-golfers-l4-s0", + "pdbthink-s09-7ba4aa076b6bb5633953", + "task_005684_3c8594a3", + "construct-mc-costas-array-l3-s0", + "task_008998_ae4cbe72", + "pdbthink-s09-772d9c283d4255fc0a11" + ], + "selected_count": 15, + "skill_family_count": 8, + "unregistered_available_tasks": { + "math": [ + "construct-rlve-round-robin-scores-l3-s0" + ], + "awm": [ + "awm-manufacturing-1-schedule" + ] + }, + "not_in_primary_package": [ + "PortSim w04" + ], + "rule": "Only IDs in tasks.jsonl and the submission payload receive training steps. Additional image-supported original tasks are unregistered backups, not extra selected questions." +} diff --git a/SHA256SUMS b/SHA256SUMS new file mode 100644 index 0000000000000000000000000000000000000000..a56cd6dad44bb356d70543b1cfee67b2c357032a --- /dev/null +++ b/SHA256SUMS @@ -0,0 +1,357 @@ +c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSES/Apache-2.0-PDBThink.txt +9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94 LICENSES/CC-BY-4.0.txt +c9d5f2c24789a4ee7502fd1426c6a2090ba766b24f20d0ef663d3b149b7466d3 LICENSES/MIT-adapters.txt +11a6d83734845ad09d809667aa219857a5b985b28c258a2eebf5677668a6bd3b LICENSES/ODC-BY-1.0.txt +584119e89dde3125ead1266f2b0df8e5703aa39db498802d8c939324ffd0d8ce LICENSES/README.txt +85da239bb4104a67e515dca538d1a4b345eed77c5d460fe76625bae905b431ed LICENSES/TMax-NOTICE.txt +5ea28ca93163591f2b3767b7089f65488f09210f91bcd6555f3132f7c39348c6 MANIFEST.json +abafb0904285aa1bf767882e7dc62100c6ba6dad62785b5ca17432a5503c766a README.md +458a593d295c61d4e72f48123e12a530396eba64bb1e98336c5df64cd1d1fbb6 REGISTRATION.json +91ef4f71d10ae3874a47b80d0264e6f14e6317fc241d54700fd509ae1ff1d550 SOURCE_LOCK.json +dbaa91cef8aa2714c2761091e7a4f3b026a98add56e4b867b1f3e0c72c7445fd components/awm/ADAPTATIONS.txt +1c26892b11e285d319e7ebc65f6cb275d38e5a4e5b581f9d022b026d72a3a3db components/awm/Dockerfile +1ea6a4d0c80da30d5f658364aaef2664cf09f32da0bce23c448e1fc1e4c4a7a6 components/awm/LICENSE_SCOPE.json +4d91952ef79d73182302464db3d190b0427ac04754eb6b7f5b1e8ad739c0bb1c components/awm/NOTICE +ae057f0e66d0e924e81f553e729148cd98161bf070283928ef4fb658e9cf3546 components/awm/SOURCE_CREDITS.json +4d97456d2794c1f347c47f3c32733294d83778165d99b923bae4ebeec15261b2 components/awm/TASKS.json +65d41089191536d5940648213b09924ba93e55d92df0080634e16d13615fd1ac components/awm/awm-requirements.lock +1639f6ced0ae83cb1f87bb2737578602c1d410b2974ca2a889302e6a186b29fa components/awm/config.json +3a1cc59eece46232d3ebb39df3cbfedd0625ab85bcf5e1d6cb090ea6ecec0e58 components/awm/private/tasks/awm-accounting-1-invoice/SOURCE.json +8ad2959536e44caba47bcbeca9018e47e7157783194d19b429aa8f22a60f4771 components/awm/private/tasks/awm-accounting-1-invoice/initial.db +57362b907a2d454bbd29b95dfebb7d84207ce9d7e22533eaf54853ee4fb84990 components/awm/private/tasks/awm-accounting-1-invoice/original_api.py +3cd0d63022caa900e32bda0b0d3ae5c9948ce3c195b77ba1906c7ddebea9c58b components/awm/private/tasks/awm-accounting-1-invoice/original_verifier.py +93eda02b7f5e0bd7aca37a2becc3fd20925472a8f33143171e4cc250564ff7b3 components/awm/private/tasks/awm-manufacturing-1-schedule/SOURCE.json +9a523ebee8c25ca61aa43075c6263e5d3b310d39157ebddabea4cb754e610a1c components/awm/private/tasks/awm-manufacturing-1-schedule/initial.db +ff94326bc0d2a826a2a211512a617f0b9f5d91866b9c77ea17f6502f77b75aa6 components/awm/private/tasks/awm-manufacturing-1-schedule/original_api.py +f0cd8fa0f1a17e76f8e87cfbe59a81645a750999f747be36b8d25d9244e5b8f1 components/awm/private/tasks/awm-manufacturing-1-schedule/original_verifier.py +0078892ae5870080b3417677926bc64f4f87ba9e8110ff400f18954e361455fc components/awm/requirements.lock +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/awm/runtime/awm/__init__.py +98218136805b95d2cc5e98e190ef79e6d0a9c2950d8f61844b4672d4e2dac651 components/awm/runtime/awm/adapter.py +0638af1cd1c6a311ee85109143ec6a59646a5f3d41c4b30312526dec561da33d components/awm/runtime/awm/launch_service.py +f47b0cc104a7a962fc932c4d3f3bb8bfcf1524dec049b9c2c33161924038b94e components/awm/runtime/awm/openenv_app.py +484c7caeaa301b91f468a9e55a251a6b529c6f9d0f2e4951c9602071c40ebcea components/awm/runtime/awm/server.py +b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f components/awm/runtime/awm/wire_client.py +06d2f12af151c8de707360ad950f6298a59668b203be8c64430d9cc602c7df54 components/awm/runtime/awm/worker.py +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/awm/runtime/common/__init__.py +b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1 components/awm/runtime/common/contracts.py +7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e components/awm/runtime/common/http_routes.py +26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a components/awm/runtime/common/models.py +12a0f7eb70edfb5e6fb02f9904c3e06daea24eab392ff4d6cef229ce18237810 components/awm/upstream/README.md +1cd23311c95c9919621b226c99dcab54faf815300c72cd542a394a5e69463a6e components/awm/upstream/accounting_1-gen_db.jsonl +99f1883338fa6f4827cb9c6c4c9cf9222c28a2a9842202cbe524921921de3ae3 components/awm/upstream/accounting_1-gen_envs.jsonl +28cf8d5611b0d63b9e17d0e991e328c2970cfef5595c08d084f2b1bad7a441fd components/awm/upstream/accounting_1-gen_sample.jsonl +a50a67f6680c40b779f831067fe84d5633a10af60c6b488a4d6510fa818f45f3 components/awm/upstream/manufacturing_execution_system_1-gen_db.jsonl +882e62163cdd51b0dba39ceb6ad110f263001681e68961648a5acad2d9e20c28 components/awm/upstream/manufacturing_execution_system_1-gen_envs.jsonl +fe9ae64f008a723f8ec10bc02a754a810243f0e97e82221b0ed730faf5cce63a components/awm/upstream/manufacturing_execution_system_1-gen_sample.jsonl +15c3c4f106c052941f16970b3981ae9c9a7bbe4c913430bcac10edbc14e73151 components/math/ADAPTATIONS.txt +3391c140ba8b7dd1378d16065c7488379b3114ce3f6009461bf31c416138e2f5 components/math/FILE_ALLOWLIST.json +bc17cd61f2a4ce4d05194787d9e25f1d38f8fdd8856d904f1e04f44c6d768211 components/math/MANIFEST.json +73b544ecebc5d10e34e72f187bfdccf8ad66c9df4c37b03eeca7323a12401248 components/math/NOTICE.txt +a037cf3ce617aa3e0216bf5e0677d229679bfffdd30dba9057b58bb413c39732 components/math/SDK_DEPENDENCIES.json +a91ceb6c6b39e532fbef753034f1979d2364672d9bb6a45395c946dd8208befd components/math/SOURCE.json +fe67677e50ff773b044feb9122e26a4dbb1dc647a5c88ba9db0adf952167104a components/math/TASKS.json +190f2c6c257c0cbc4cb6bfa2efe8e5fdca221b1c18b39aa70331781f2be79afa components/math/config.json +9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94 components/math/licenses/MathConstraint-LICENSE +10afac3400d1abccc7ec2322e07563a3e495c13ac39d3865564aa2e2423b398e components/math/licenses/RLVE-LICENSE +200b2ce93f2a5b9671165f9aea3cc4d89db995352c1e1e3db6d418262b058516 components/math/licenses/UPSTREAM_COLLECTION_LICENSES.md +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/math/runtime/common/__init__.py +b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1 components/math/runtime/common/contracts.py +7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e components/math/runtime/common/http_routes.py +26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a components/math/runtime/common/models.py +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/math/runtime/native_shell/__init__.py +80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3 components/math/runtime/native_shell/actor_launcher.py +6cc693d7a384d6d76b8c99bfb6af2e5188c03aac81671cfec3414733fb98089a components/math/runtime/native_shell/backend.py +cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53 components/math/runtime/native_shell/environment.py +4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1 components/math/runtime/native_shell/guard.py +db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b components/math/runtime/native_shell/launch_service.py +3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e components/math/runtime/native_shell/server.py +6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465 components/math/runtime/native_shell/verifier_launcher.py +b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f components/math/runtime/native_shell/wire_client.py +56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c components/math/upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile +15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5 components/math/upstream/construct-mc-costas-array-l3-s0/environment/instance.json +88e4a26e71d8483fbc89627210e4ed07f6dfef0fb16ce3e6d31e84a04bd050f9 components/math/upstream/construct-mc-costas-array-l3-s0/instruction.md +b62ba527da418f1b84d165707ea56ea805953289b0993cc3176e988ef59c3d32 components/math/upstream/construct-mc-costas-array-l3-s0/task.toml +3c0290e35201f077926099989cd0e82c10bf091cb33c572cacc02bca075debdb components/math/upstream/construct-mc-costas-array-l3-s0/tests/check.py +15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5 components/math/upstream/construct-mc-costas-array-l3-s0/tests/instance.json +d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73 components/math/upstream/construct-mc-costas-array-l3-s0/tests/run.py +a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e components/math/upstream/construct-mc-costas-array-l3-s0/tests/test.sh +56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c components/math/upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile +9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92 components/math/upstream/construct-mc-ramsey-l4-s0/environment/instance.json +dacf1d28faa912ac766cb9a8859b9a2d08940d2c52a9f8460c85ce0595a16c81 components/math/upstream/construct-mc-ramsey-l4-s0/instruction.md +d2ea623dfdf1ab4864399d4231f17b7c6800cc73e1ad9d1c583816d149dca377 components/math/upstream/construct-mc-ramsey-l4-s0/task.toml +923f9e1258610a3cc3d5c2984b1855ed7341af13bc7592ff42aed0e0f91fc74d components/math/upstream/construct-mc-ramsey-l4-s0/tests/check.py +9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92 components/math/upstream/construct-mc-ramsey-l4-s0/tests/instance.json +d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73 components/math/upstream/construct-mc-ramsey-l4-s0/tests/run.py +a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e components/math/upstream/construct-mc-ramsey-l4-s0/tests/test.sh +56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c components/math/upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile +cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73 components/math/upstream/construct-mc-social-golfers-l4-s0/environment/instance.json +a638ef887b79167571086549b8d9438447d07b800772aac868b3e9a2e6899cd2 components/math/upstream/construct-mc-social-golfers-l4-s0/instruction.md +fb08db6bba18360321c1ac959d0af5f655435579d5cb88864d924897254c7546 components/math/upstream/construct-mc-social-golfers-l4-s0/task.toml +9514518058e308fc2ae0ec0b8ce8a50993d5dfa09708ac9c3609e1edbbae126a components/math/upstream/construct-mc-social-golfers-l4-s0/tests/check.py +cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73 components/math/upstream/construct-mc-social-golfers-l4-s0/tests/instance.json +d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73 components/math/upstream/construct-mc-social-golfers-l4-s0/tests/run.py +a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e components/math/upstream/construct-mc-social-golfers-l4-s0/tests/test.sh +56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile +b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json +db8d002ee820a699d6b7b819cb88ed583990529649255af446c22c98889ad370 components/math/upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md +d42f4225ae8850e6abe3e1b612b0da6f2e896322a3e9e00e6addb988a8f8332a components/math/upstream/construct-rlve-round-robin-scores-l3-s0/task.toml +930cd10836482427303a497cfa896934ccdc24116879eaa4c5d32a572d01353c components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py +b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json +d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73 components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py +a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh +9825666034cc109ee29e794870e502c4d9ff67b22bee26a7e808eda5676d1b14 components/mimo-code/README.txt +a037cf3ce617aa3e0216bf5e0677d229679bfffdd30dba9057b58bb413c39732 components/mimo-code/SDK_DEPENDENCIES.json +1d8034fd8f402d3cfbcb68e6a666ffb8b10f2374d1f2dfaa623a91a320fd7ada components/mimo-code/SDK_RUNTIME.json +150edf38d6ba4b6ba26ec991f256f7e2630935b3951a16e8688d8d86ad1eac85 components/mimo-code/SOURCE.json +cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 components/mimo-code/licenses/plaso-Apache-2.0.txt +09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b components/mimo-code/licenses/requests-Apache-2.0.txt +54af5390562f313695c706cc01071a28928f25025f50306c02f3f519faaf5b49 components/mimo-code/source_bundle/Dockerfile +a95e52958c35cf9a4b925558ca38029006ed04f9abc89e008f96e8ffd08fd629 components/mimo-code/source_bundle/config.json +836618cb7e01e236878d367272157e4be6a31d538bf8b9f8cc9ed630aac04482 components/mimo-code/source_bundle/openenv-requirements.lock +fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f components/mimo-code/source_bundle/pristine-other/Dockerfile +34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526 components/mimo-code/source_bundle/pristine-other/requirements-shared.txt +cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 components/mimo-code/source_bundle/pristine-other/vendor/plaso/LICENSE +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/__init__.py +082bb8b1c061c3ce920949abc37528ec77e292758ce68423657cd5d2d87897a0 components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/errors.py +b92752fa2da3ff17c53e164eccf8a91905ed6fb71551c531d7927ff0a9dab271 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/events.py +22061b1f10090bbecda41391007c7e2295baaf4f1f4797b5babff82bd43a5387 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/interface.py +0d84bc47cd82f1d57e884c918b5dd75d81bbc1a80380890b3a54edd420e0f22c components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/manager.py +69aa7937cb245410683d37f42ceebaff039d2b5796065f4c0c4618290ffb4a5e components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/time_events.py +1be04adf9ae090fa68333eb26f087e4d09edecb843340404e9b51bedf32a94aa components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/windows_events.py +a11900d7bc98b80e318e0967f0218aca2e304d328954da20139fc342bb2fb697 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/lib/definitions.py +e18590112b9db1dfcc0c4df44750678cc886134452e1619248a2ef07544d7143 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/interface.py +ff2e0bed3543e230ff9d98b044356199e9419b99cef7faa997d21811d598ab4a components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/mediator.py +88a70819243e00cf6557c40c1ebe21eb87ee06272e69c18d7c93ea6c5baac0b4 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/plugins.py +f5f747e98a017ebd019ddba45c36ea73c5de1f3b48d3238cec8cb44b39919793 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_parser.py +e026e975023b44b9c99dfb22b1d4d4b99d396019aed592d08bf2adc636ccc069 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/default.py +2ef4e78f16ef5a1c9850aa08615737d01e2953d837dbf4692d9be18f205439e2 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/interface.py +4711ac18d81ff23cf782b870861ef5f841a14cbfccc23fcaa7d995d6df04ee7e components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py +b33bf0efb841b2d19941aa2dc1b517fac09b60dc50f2c01841231cd04195ad27 components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/services.py +956ba2a62fdb6860f71a345b4bdeffdda1b90de618f2fc51a29a7ebea829641a components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py +84d16f933ae230cb9c53ec4d0addc397380705017079ee8c5430465b1035a6fb components/mimo-code/source_bundle/pristine-other/vendor/plaso/pytz/__init__.py +ad2fab71ce6887529d53aaedaf50b793a769e8ac34c596342e00491434a6ebd3 components/mimo-code/source_bundle/pristine-other/vendor/plaso/requirements.txt +9c3a29f59a514add92378b7885a35b73a9695631fcc27849ed198fe481f33fc6 components/mimo-code/source_bundle/pristine-other/vendor/plaso/setup.py +67aa9abe820736c53b272f93e86569d3aa7ef113fcff02696ebcd34185d991c5 components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/100_sub_keys.hiv +370cdc7037cd01aeeae15dd0e86a44239138425372efd2cf35f066c1fbb36f50 components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv +4e7e2bb2ff10353a6b8ec54b11ed0420b8ab6c45483c7e77e761accb310acd75 components/mimo-code/source_bundle/pristine-other/vendor/plaso/tests/parsers/winreg_plugins/interface.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/__init__.py +5906eb2e26a100d1b993cc982ebdc7cbb18d74788a70f3446e8e7a50c04b111d components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/run_case.py +fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f components/mimo-code/source_bundle/pristine/Dockerfile +34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526 components/mimo-code/source_bundle/pristine/requirements-shared.txt +8d76dedce7d7a38ea383d8db3784f3ab808648a3bb19d613efa6e01088daea49 components/mimo-code/source_bundle/pristine/tools/run_regression.py +09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b components/mimo-code/source_bundle/pristine/vendor/requests/LICENSE +345f26b9f691435e39d0eb6f7f4150a390f43175b22f8d61ac95e7f2827f0a77 components/mimo-code/source_bundle/pristine/vendor/requests/pyproject.toml +80534322a1a3167d8775829ee220a6acf4fe455f3f778c4b8e94bcf7fadfa0b5 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__init__.py +abba90670b0370a3dc40d97c2dea46a35d4bec941ff10d7c3cf3098ef04a17f9 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__version__.py +4c7d8d132c9898fc7d715e473f3ac74785ddc4ab96d2c9240f87835dc6d981ff components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_internal_utils.py +d06df79f54a279c0cc3faec596c446246d5ad14edfd529eb328defbd62a44a89 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_types.py +cc9b1b02694fee0353481fbad84fe3ddbedec4441dba54df7914c63f2aa85937 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/adapters.py +4d15480ac046f089209798e8650476ef4a28ebe6f81b400758f8ef42ec6b5509 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/api.py +fdc8bb34a8a5a088b169ca13277d107b0bc94ee63ed5e89dd4f5569d9b2bb04c components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/auth.py +fd9c6b83359cef90ff6c4eeeab8dcc2388da382ebca7d00a499b3c0b434a87e4 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/certs.py +4a51c5ab07b015c298d6ea69d71502979cd3ed6b935d88e4433ce5341dacf584 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/compat.py +05d12b965c76f229803e17aef1c9969d712e4f4d0f6a06c05e0a47212fd5b417 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/cookies.py +c5e18f3352454968e337bb3056f0867df2f37c0a0d2c1a77dc05e7e0b3c0411b components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/exceptions.py +e5845e93980b2e25be418fb7fe0b8e6e999fef8f84afc5a43f4546efdc24691f components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/help.py +ebd8a02475d31a0e473a8f553e9501ff43645b9563885ad52844e7a63f0d76ab components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/hooks.py +557962f283e48bb20604129509979803687c9bf8b43e5d0f38e8d5037a5c2131 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/models.py +fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/packages.py +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/py.typed +3d2089736ced93b2b405624a943f866d22652b17df06a85eb010f86272fc3e7d components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/sessions.py +1950f47c89cf18019787e07d8ce48f66d6b38e622f7d94d70a90247fee6c040e components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/status_codes.py +ba9460c39078f25e6f1d2a24ac941ac6f8d2ee97197fa8c8d0c262d8a1e67a02 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/structures.py +b879cb3f671cf1c28e8ff9b2b02151bcdb8974b4820a514cfdd1f5a038443cd2 components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/utils.py +ac7f253daae0905f9b3dec647cae736bb3c090185aa373b30b3e851599e5342c components/mimo-code/source_bundle/pristine/vendor/requests/tests/__init__.py +6d65ffb582519f80a66c5d1ef571e3c33395a199f9e67fcb500c6ad2d7800e0a components/mimo-code/source_bundle/pristine/vendor/requests/tests/conftest.py +91ee3b9532c67d6fd533f9f8a7e910a63eb5a0558e569cc2ac20d2c047a5369d components/mimo-code/source_bundle/pristine/vendor/requests/tests/test_requests.py +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/mimo-code/source_bundle/runtime/code_runtime/__init__.py +80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3 components/mimo-code/source_bundle/runtime/code_runtime/actor_launcher.py +691b1b428f7134e98b27e402b735b3f6be36439ab64865bf3e4fc343a676ebe3 components/mimo-code/source_bundle/runtime/code_runtime/backend.py +4ebf25639af6ccbe8faad346be45e2b5dd778e659b2a34faec51b6ad62e68102 components/mimo-code/source_bundle/runtime/code_runtime/code_child_launcher.py +ef8546819e3ece598ae9032254beb550f030f703f486bbfa9fe754a321f85430 components/mimo-code/source_bundle/runtime/code_runtime/environment.py +4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1 components/mimo-code/source_bundle/runtime/code_runtime/guard.py +e5df97cf4e32894de79f90ea5f70074fd83cdcfe191a1c013af737fbbad02025 components/mimo-code/source_bundle/runtime/code_runtime/launch_service.py +37679a90257e5907fec750293fb74610c95400e46db0a4905973bb6e9a3d96b1 components/mimo-code/source_bundle/runtime/code_runtime/server.py +62ff949eeda90727ac3cae771454b12ea35d4c6fa1b51ae9333f5bdb82fbe94d components/mimo-code/source_bundle/runtime/code_runtime/trusted_checker.py +6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465 components/mimo-code/source_bundle/runtime/code_runtime/verifier_launcher.py +b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f components/mimo-code/source_bundle/runtime/code_runtime/wire_client.py +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/mimo-code/source_bundle/runtime/common/__init__.py +b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1 components/mimo-code/source_bundle/runtime/common/contracts.py +7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e components/mimo-code/source_bundle/runtime/common/http_routes.py +26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a components/mimo-code/source_bundle/runtime/common/models.py +6d55a1b1cb882a951518a74f06dbd70bdb845a3669b4ad0210e4aff0c56d82a3 components/mimo-code/source_bundle/source-other/instruction.md +88538e9f67364bbdea3a753ba3a6cb3cc66ca998e2e6ffe2e92190e36125f1bd components/mimo-code/source_bundle/source-other/task.toml +336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a components/mimo-code/source_bundle/source-other/tests/anti_hack_guard.py +5ceff9d56caaa93b84f9d8bdc55009efca27f7e3e0fe9f6e7fc18e2f6aca9b1b components/mimo-code/source_bundle/source-other/tests/fixtures/expected.json +dcd500a72c68f04bd5d7b9faadde661274cb2648fb1d064b79b868908463b756 components/mimo-code/source_bundle/source-other/tests/fixtures/pristine_env_manifest.json +8152f7541a6105f16a8da923f375093607fddf1adba35c816eab455080af061e components/mimo-code/source_bundle/source-other/tests/task_test.sh +5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35 components/mimo-code/source_bundle/source-other/tests/test.sh +266d7ff9688685eef6ee0fbe7a35935dfe1fed615604843d175a9369adb6a279 components/mimo-code/source_bundle/source-other/tests/test_outputs.py +44d9729328960cc04484e8ff23d492ac54edfc83f5910c24301742c895b96920 components/mimo-code/source_bundle/source/instruction.md +5cc7f78314cff7486514a872696334ea7add1614ab4d0e0c575f281a89f7425d components/mimo-code/source_bundle/source/task.toml +336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a components/mimo-code/source_bundle/source/tests/anti_hack_guard.py +544b5385c6ded480cc93e3c39938fce50b1ec7185d6e6052c5d53b9514968921 components/mimo-code/source_bundle/source/tests/fixtures/pristine_env_manifest.json +24593e6c78d47ddcb3e95e62464ca66169005ef390b5bef717a1bc3952f1fb38 components/mimo-code/source_bundle/source/tests/fixtures/regression_cases.json +786d65d844825a6cc7827d64dd9b34f388ef1f2be78c609e3a84ede8ed363bf1 components/mimo-code/source_bundle/source/tests/task_test.sh +5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35 components/mimo-code/source_bundle/source/tests/test.sh +ae66085efc08ce1ac14b78e4aa9635452528c4ace0c2eddb79aeb3c023487a0c components/mimo-code/source_bundle/source/tests/test_outputs.py +b0cbd2dbfe130357ab86c48b3f0ee1acca985828022542d97f1f9d77e147f261 components/pdbthink/DEPENDENCIES.json +0c2bd4c86b8d834a907605e71d8dc3763513da29cf07c324eb718c8818b1ec45 components/pdbthink/Dockerfile +4ac5bc8faf3c53e689d3e1857e81c904da28c239dacc10e69c6f6bee67ba687a components/pdbthink/config.json +7c98afbca1961f056579b344a5552c574582c6c19926578a748519fdd99496d7 components/pdbthink/licenses/DEPENDENCIES.json +c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 components/pdbthink/licenses/LICENSE-PDBTHINK +ce75bb41edfeadb6dbe07aa8a8feacc4ed326c27695327ab56a45d80f38045cc components/pdbthink/licenses/SOURCE.json +56e4865b7517b35a7d316a8881561b622f10af0b29bd8394c59a4316ae285e1c components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/public_task.json +8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py +72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py +8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34 components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py +1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4 components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/gold.json +bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7 components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/test.sh +628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4 components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml +91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verify.py +5d2dfa7c57a5c628a9c12cd097e7b644a155e380f1f6af48233560dbab0b4376 components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/public_task.json +8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py +72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py +8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34 components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py +995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390 components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json +bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7 components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh +628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4 components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml +91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py +7d267c32438351a4d92533f6e9960da36a1e39c768ad56988904029cb90da0c5 components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/public_task.json +8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py +72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py +8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34 components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py +4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7 components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json +bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7 components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh +628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4 components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml +91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py +0078892ae5870080b3417677926bc64f4f87ba9e8110ff400f18954e361455fc components/pdbthink/requirements.lock +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/pdbthink/runtime/common/__init__.py +b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1 components/pdbthink/runtime/common/contracts.py +7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e components/pdbthink/runtime/common/http_routes.py +26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a components/pdbthink/runtime/common/models.py +9f56e761d79bfdb34304a012586cb04d16b435ef6130091a97702e559260a2f2 components/pdbthink/runtime/pdbthink/__init__.py +1683d5e2fab016801207ecdde6cbd4d3730ed8c4ca22aafd0f3bf651dce0faf1 components/pdbthink/runtime/pdbthink/adapter.py +cc89f1e687da1a71af567ac450fd761da0e5d4fe56901695de304aabd81c59bd components/pdbthink/runtime/pdbthink/launch_service.py +7ab1b3b05068cd5b0f20497062a8da5fd905c45e8eee295cb8f2fc5c7aca6577 components/pdbthink/runtime/pdbthink/openenv_app.py +76012b37d916b4044c6fe1da4e7accdf9faa2216f50c73d5b87cd12b7f1d70cf components/pdbthink/runtime/pdbthink/server.py +b1f6f82ff9e113aedd742a8f4b0c18c545020677503765ee913c31e20964b96f components/pdbthink/runtime/pdbthink/transport.py +b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f components/pdbthink/runtime/pdbthink/wire_client.py +58d031f7955f7f774733189b8297a1db7f515bb206c26ac50fad68f580848974 components/tmax/DEPENDENCIES.json +a29f4e2ba9e60f543f7f0ff90c16bc7515fd2175ea7abaacff73f0bd7f7e91e4 components/tmax/FILE_ALLOWLIST.json +9ae187d852f4cd6974fc9c65fba942df4e5586d73ddb3c48916a09376a3d36ac components/tmax/LICENSE_SCOPE.json +f30eb64313c2645348ca3d965c40c9a466eb3754f3302206e44133d19bc87d6a components/tmax/NOTICE.txt +8228f41f6ed3488d787e85f78ec8d9358ff8d5d515c6ec537ab0eb06537048d1 components/tmax/SOURCE.json +9296f353c436adf1f5019adb05854fec1bb4601f8201a3f5763bf3b4116399e5 components/tmax/TASKS.json +9ffea3f8661105381b8db21a63e9d641b4a2f2c6a3cae9c4de963a51d8d5d8d8 components/tmax/config.json +11a6d83734845ad09d809667aa219857a5b985b28c258a2eebf5677668a6bd3b components/tmax/licenses/ODC-BY-1.0.txt +0e66e8816b8f2b4a17d37ec7abc5b8ca5708bae9d71d2c5323d8666d7e7ffa1d components/tmax/licenses/TMAX_DATASET_README.md +836618cb7e01e236878d367272157e4be6a31d538bf8b9f8cc9ed630aac04482 components/tmax/requirements.lock +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/tmax/runtime/common/__init__.py +b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1 components/tmax/runtime/common/contracts.py +7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e components/tmax/runtime/common/http_routes.py +26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a components/tmax/runtime/common/models.py +01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b components/tmax/runtime/native_shell/__init__.py +80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3 components/tmax/runtime/native_shell/actor_launcher.py +1a60616f3539f34ab141b3e58292369936844a5c3c4ceba3f58814e04f30b7fe components/tmax/runtime/native_shell/backend.py +cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53 components/tmax/runtime/native_shell/environment.py +4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1 components/tmax/runtime/native_shell/guard.py +db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b components/tmax/runtime/native_shell/launch_service.py +3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e components/tmax/runtime/native_shell/server.py +6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465 components/tmax/runtime/native_shell/verifier_launcher.py +b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f components/tmax/runtime/native_shell/wire_client.py +eab8396a1b533f70468039f8ac1b5fe9927faf4ded578172ec932ef7bf2af22a components/tmax/tasks/task_000056_f726766b/source/external/app/vibration_data.wav +714f780883970365cfffe408e2c76e75f499005f87551fc84b55d79368e77197 components/tmax/tasks/task_000056_f726766b/source/instruction.md +e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0 components/tmax/tasks/task_000056_f726766b/source/task.toml +3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e components/tmax/tasks/task_000056_f726766b/source/tests/test.sh +327c5346a779a44e27ef0cbd9f107e863d599fc6e47f95f248eaec03c15117c4 components/tmax/tasks/task_000056_f726766b/source/tests/test_final_state.py +a6c4cf2043d8642babb9b546096b3f559a375b59d54a43efebd57e9728466184 components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/find_threshold.sh +4631f1f805e6b826a796502ed5d94e676b3061cf448f2f9225116395aa3bb13b components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/process.sh +f3ae2df41978712dbffe58665a9582e3d0951f211c5cca5ece9f536225d28ba8 components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/serialize.sh +3c04251fe92c30d29ac4d887608f4385176e3bda932594437f82b08a5b348938 components/tmax/tasks/task_000260_7b7cc286/source/external/app/video.mp4 +79c9fd4e4d41524db109d90b0415a4f0a2b9d24bf690fa8d7340ce3cb5ce0975 components/tmax/tasks/task_000260_7b7cc286/source/instruction.md +d36c49060b4ddbca3b13a5aa98cf5b195c07bff725b91107f58a087ec4325423 components/tmax/tasks/task_000260_7b7cc286/source/task.toml +3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e components/tmax/tasks/task_000260_7b7cc286/source/tests/test.sh +aae204101d5c024a0b5cbda42fa686e7d2928fd9be3ad55fd14314b2502182a5 components/tmax/tasks/task_000260_7b7cc286/source/tests/test_final_state.py +170911a153d00eb0f037ca56a2cbd10d4aa2b7a418e25a0f1df58b1c77589788 components/tmax/tasks/task_000663_dff2c340/pristine/backup_catalog.db +feae25374139b4b1d8ec9759d553c591841d9330a071217f46a2e464bd32bbd7 components/tmax/tasks/task_000663_dff2c340/source/instruction.md +85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a components/tmax/tasks/task_000663_dff2c340/source/task.toml +3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e components/tmax/tasks/task_000663_dff2c340/source/tests/test.sh +7a273b9bf8bc61eeec1b8dda674b5f6ba5356abbfd923b413b09d2584c1ef72f components/tmax/tasks/task_000663_dff2c340/source/tests/test_final_state.py +9fe1c89ee823f133d35dea66840ecb7f87d599487524b7aa1d6371e8f664058e components/tmax/tasks/task_005684_3c8594a3/pristine/compliance_audit.db +f4eee4e0643fcfb7399df10e1947ec9dbda28c74bacf307167f443506268f583 components/tmax/tasks/task_005684_3c8594a3/source/instruction.md +5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2 components/tmax/tasks/task_005684_3c8594a3/source/task.toml +3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e components/tmax/tasks/task_005684_3c8594a3/source/tests/test.sh +495630c7ede4e75ef5644c1ee5b69f04969a4059ef094787c19a3014734d3cf2 components/tmax/tasks/task_005684_3c8594a3/source/tests/test_final_state.py +d6b5039ee32f3a43069245984c8fe5a9689028a9aac06e26a64017c54bd11976 components/tmax/tasks/task_008667_2151f271/pristine/data/financial.db +629b28471809f802c58831d100315b83012c0066df3b265a2d379a19e61a2262 components/tmax/tasks/task_008667_2151f271/pristine/data/transactions.jsonl +50d1d10121dfa3b565842fd10f2589ceb91b4459126787af7793cec9cc0d06b1 components/tmax/tasks/task_008667_2151f271/source/instruction.md +d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897 components/tmax/tasks/task_008667_2151f271/source/task.toml +3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e components/tmax/tasks/task_008667_2151f271/source/tests/test.sh +cb73fd0ab1765768ebfecc50054ba13c143cc51be201127515eb495904ddf9e6 components/tmax/tasks/task_008667_2151f271/source/tests/test_final_state.py +909d2e964c0831d8af91b722b4424ed829c261d6b7db1a95180d8a809527ddaf components/tmax/tasks/task_008998_ae4cbe72/pristine/robot_dump.log.gz +f81f86b07681931baabdba313cc4e988c01bff7a1f1d83349dfa939cdaa20669 components/tmax/tasks/task_008998_ae4cbe72/source/instruction.md +c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9 components/tmax/tasks/task_008998_ae4cbe72/source/task.toml +3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e components/tmax/tasks/task_008998_ae4cbe72/source/tests/test.sh +e03b84ca0519367e5f86b7b3a3231afa5209b1971431497699200099035f5014 components/tmax/tasks/task_008998_ae4cbe72/source/tests/test_final_state.py +c44d259c4421b16dc5f0bc3912cdd800f6c25746ea31bede5060c9605b225025 components/tmax/upstream/task_000056_f726766b/environment/Dockerfile +fc9e91cc78e1817d80b4ba8c2dc9a638d0c57959825ee34f5e3d7688ad80dfb9 components/tmax/upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.label.txt +f55a8eec263c9be975b2adccdda6a07c680109b851a89f55779f14076aaa30d5 components/tmax/upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.wav +0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637 components/tmax/upstream/task_000056_f726766b/environment/base_install.sh +70d52288d5c9a7d23bbd63fb086a7f886961a1335632cc6efb892572d197563b components/tmax/upstream/task_000056_f726766b/environment/post_install.sh +e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0 components/tmax/upstream/task_000056_f726766b/task.toml +98f66d958e8ee701c0579095c2e65254a63194845b894a45db2a6180a46a3193 components/tmax/upstream/task_000260_7b7cc286/environment/Dockerfile +4a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd5 components/tmax/upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.label.txt +bf759113108b136ec3b5fa507d035c1e66ac243b52da09fa07ab58566ee27f58 components/tmax/upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.mp4 +0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637 components/tmax/upstream/task_000260_7b7cc286/environment/base_install.sh +ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03 components/tmax/upstream/task_000260_7b7cc286/environment/post_install.sh +483c9171d3e67bec029d9b88cee24d554fa9310a61ec47940312be5f2951bc30 components/tmax/upstream/task_000260_7b7cc286/task.toml +ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535 components/tmax/upstream/task_000663_dff2c340/environment/Dockerfile +a449c18295cee8a3e7ed0c958fe219cbed2d2a8e7fdad924f2679444b3377b94 components/tmax/upstream/task_000663_dff2c340/environment/post_install.sh +85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a components/tmax/upstream/task_000663_dff2c340/task.toml +ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535 components/tmax/upstream/task_005684_3c8594a3/environment/Dockerfile +b431517fec535c62b42b517f9212cbb1e9cf80bdf883a55c02bfba08f0d4c404 components/tmax/upstream/task_005684_3c8594a3/environment/post_install.sh +5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2 components/tmax/upstream/task_005684_3c8594a3/task.toml +ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535 components/tmax/upstream/task_008667_2151f271/environment/Dockerfile +3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841 components/tmax/upstream/task_008667_2151f271/environment/post_install.sh +d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897 components/tmax/upstream/task_008667_2151f271/task.toml +ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535 components/tmax/upstream/task_008998_ae4cbe72/environment/Dockerfile +26dfa63d063430c2370144b8e30c1f905dde4e2722403c1e8131a5a84e2d5e69 components/tmax/upstream/task_008998_ae4cbe72/environment/post_install.sh +c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9 components/tmax/upstream/task_008998_ae4cbe72/task.toml +abea24b268b08f72897859e527fe90c89c08d2afab7305cf52d4255f2feeb897 prepare_source_tree.py +10993deaaa8553929fa0b3b6bf3c1ad100baaaf9ff10ae8ed139a8ec4279a3c4 schema.json +5eba017b2fb18e65bb63d7116df8aa502c90e157c5be4d67021b60a57b7ae848 tasks.jsonl +66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460 upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/environment/Dockerfile +33d86986d7b9d0a12678be7326d02048cf812cb536fc45fdb2837c9772c64ddf upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/instruction.md +f61bc6944b49d7a8095eef3903cd4b10982417f02c04f4d2b47620dd2128f30d upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/prompt.json +eaf162755c72fae0936eab27b370732356f5b184aa1077e543b46f8ce327db7d upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/task.toml +8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py +72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py +8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34 upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py +1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4 upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/gold.json +bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7 upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/test.sh +628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4 upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml +91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/verify.py +66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460 upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/environment/Dockerfile +1eba6ac44775863993c8215f0d146cdccc7e8874a05b694e79db776e375dd7b1 upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/instruction.md +77c1f05eb4f17a1d1b3291d916c999104262acfd9180ef775fa51232228ec2bc upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/prompt.json +3c85ab2cfb5782ee7b40bd4fb0ef1b323d1874e6f2ffb23554b7b630ea46454c upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/task.toml +8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py +72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py +8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34 upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py +995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390 upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json +bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7 upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh +628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4 upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml +91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py +66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460 upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/environment/Dockerfile +21dc586748f23a8630118831399e1c40d62443444d454bf6f5e7f60ba334b06f upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/instruction.md +97d07b9814fff65f7cd78bf968d4854aa2aa75e8535ceb574b35a93dbf087db0 upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/prompt.json +45af241c0dc3ed0b71fff4db4b2f334760bc387aaff0a74a6dc9543cce2effe1 upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/task.toml +8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py +72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py +8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34 upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py +4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7 upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json +bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7 upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh +628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4 upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml +91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py +26ee528d240a5208cf89d540b8e0a3ceb26435a15dc1fbb57f7034c8e6eec980 validate_dataset.py diff --git a/SOURCE_LOCK.json b/SOURCE_LOCK.json new file mode 100644 index 0000000000000000000000000000000000000000..9e6a9a49ea3e40c4187cedd85e38689f5278d1a3 --- /dev/null +++ b/SOURCE_LOCK.json @@ -0,0 +1,4432 @@ +{ + "format": "multidomain-source-lock-v1", + "status": "offline_draft", + "rule": "Expected source hashes are copied from reviewed component records. Recomputing an inventory hash does not establish upstream identity. Materialized databases and delivery adapters are distinguished from original source bytes.", + "source_revisions": { + "mimo-code": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "url": "https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-terminal/tree/b74a53f26a1c7a4070a32a2c96b0dc301dce9472" + }, + "tmax": { + "repository": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "url": "https://huggingface.co/datasets/TMaxxx/TMax-15K-Harbor/tree/48a77eb0b017606c643ed905f96db41672914798", + "original_dataset": { + "id": "allenai/TMax-15K", + "revision": "e3ded940596cc611c9815684ba51a7e8ee0cffc9", + "authors": "Allen Institute for AI (Ai2); Hamish Ivison, Junjie Oscar Yin, Rulin Shao, Teng Xiao, Nathan Lambert, Hannaneh Hajishirzi", + "url": "https://huggingface.co/datasets/allenai/TMax-15K/tree/e3ded940596cc611c9815684ba51a7e8ee0cffc9", + "declared_license": "ODC-BY-1.0", + "license_text": "licenses/ODC-BY-1.0.txt", + "dataset_readme": "licenses/TMAX_DATASET_README.md", + "dataset_readme_sha256": "0e66e8816b8f2b4a17d37ec7abc5b8ca5708bae9d71d2c5323d8666d7e7ffa1d", + "upstream_notice": "The original dataset README states research and educational use in accordance with Ai2 Responsible Use Guidelines, and that included Gemini 3.1 Pro outputs are subject to Google Terms of Service." + } + }, + "math": { + "repository": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "url": "https://huggingface.co/datasets/amphora/MathConstructOptimize-Envs-harbor/tree/66cd5c87d51113c76faaef1b05397f1a6282a0f7" + }, + "awm": { + "repository": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "url": "https://huggingface.co/datasets/Snowflake/AgentWorldModel-1K/tree/dde80a0283fe781bdc51656bce57063dc5650213" + }, + "pdbthink": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "url": "https://huggingface.co/datasets/open-athena/pdbthink-coordinate-tasks/tree/3734406cb97b1702844319f9a5d860cbbf8fe660" + } + }, + "reviewed_records": [ + { + "id": "mimo-code/COMPONENT_MANIFEST.json", + "sha256": "18647d4755104e269272e630575a03f38c3b0c619508ca899e5bbaa6347f9cf2", + "scope": "Reviewed component file hashes; record retained by assembler outside distributable dataset." + }, + { + "id": "awm/ALLOWLIST.json", + "sha256": "3717619363578e543a793f0fbb4147a6190f3f7c14cdbe26695b2e768d92d0ee", + "scope": "Reviewed component file hashes; record retained by assembler outside distributable dataset." + }, + { + "id": "math/FILE_ALLOWLIST.json", + "sha256": "f6e0c00a922d52a38cc1ac79aa0ebc83db27f6dafce7e8919168853cf3dd035e", + "scope": "Reviewed component file hashes; record retained by assembler outside distributable dataset." + }, + { + "id": "pdbthink/PDB_COMPONENT_SOURCE.json", + "sha256": "462e07513666a3fdf210344cc35a69638d18da2ee19b8f860686157869516636", + "scope": "Reviewed component file hashes; record retained by assembler outside distributable dataset." + }, + { + "id": "pdbthink/v2-MANIFEST.json", + "sha256": "4275ccf9cd830e8f225cff8814a08448edd6a87b211c0d7bbef849f5bee0ea74", + "scope": "Previously frozen original PDB source and retained license texts." + }, + { + "id": "tmax/FILE_ALLOWLIST.json", + "sha256": "eb812e240c1ed5d50c28efdcc4b172ade8574571e4fc0cbb01837b6e0bdf13cf", + "scope": "Frozen 80-file component review; exact Harbor archive members and materialized setup outputs are separately identified." + }, + { + "id": "presentation-cleanup-20261011", + "sha256": "7613df9c6ce9960d094ee8128071985c0ab1e9ee125d43c24b33a06bb4184a46", + "scope": "Project adapter comments and packaging text only." + }, + { + "id": "english-documentation-20261011", + "sha256": "bd112e671c83f0c37ac24791b7cd3c18a8f14d8a65287106af3931bab44d63e9", + "scope": "English project documentation and task index descriptions" + } + ], + "files": { + "components/mimo-code/README.txt": { + "sha256": "9825666034cc109ee29e794870e502c4d9ff67b22bee26a7e808eda5676d1b14", + "bytes": 533, + "role": "adapter", + "reviewed_record": "english-documentation-20261011", + "parent_sha256": "83d2abb8ac040977bebacf821096815e09080b3e515712385d6e3e81a170d6d7" + }, + "components/mimo-code/SDK_DEPENDENCIES.json": { + "sha256": "a037cf3ce617aa3e0216bf5e0677d229679bfffdd30dba9057b58bb413c39732", + "bytes": 25904, + "role": "dependency", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json" + }, + "components/mimo-code/SDK_RUNTIME.json": { + "sha256": "1d8034fd8f402d3cfbcb68e6a666ffb8b10f2374d1f2dfaa623a91a320fd7ada", + "bytes": 546, + "role": "dependency", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json" + }, + "components/mimo-code/SOURCE.json": { + "sha256": "150edf38d6ba4b6ba26ec991f256f7e2630935b3951a16e8688d8d86ad1eac85", + "bytes": 1496, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "3c4b7a6e01d993d0ca0d9557c63b1e2a86b8bef3aef07b24ed8fb04e5a925977" + }, + "components/mimo-code/licenses/plaso-Apache-2.0.txt": { + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "bytes": 11358, + "role": "license", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/LICENSE", + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/licenses/requests-Apache-2.0.txt": { + "sha256": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "bytes": 10142, + "role": "license", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/LICENSE", + "sha256": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/Dockerfile": { + "sha256": "54af5390562f313695c706cc01071a28928f25025f50306c02f3f519faaf5b49", + "bytes": 1613, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "6d3906952f2cc96433e46c9643d8db0aeb1ff55d0b1cd738b4289b28295b346c" + }, + "components/mimo-code/source_bundle/config.json": { + "sha256": "a95e52958c35cf9a4b925558ca38029006ed04f9abc89e008f96e8ffd08fd629", + "bytes": 13050, + "role": "adapter", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json" + }, + "components/mimo-code/source_bundle/openenv-requirements.lock": { + "sha256": "836618cb7e01e236878d367272157e4be6a31d538bf8b9f8cc9ed630aac04482", + "bytes": 10667, + "role": "dependency", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json" + }, + "components/mimo-code/source_bundle/pristine/Dockerfile": { + "sha256": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "bytes": 598, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/Dockerfile", + "sha256": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/requirements-shared.txt": { + "sha256": "34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526", + "bytes": 364, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/requirements-shared.txt", + "sha256": "34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/tools/run_regression.py": { + "sha256": "8d76dedce7d7a38ea383d8db3784f3ab808648a3bb19d613efa6e01088daea49", + "bytes": 3802, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/tools/run_regression.py", + "sha256": "8d76dedce7d7a38ea383d8db3784f3ab808648a3bb19d613efa6e01088daea49", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/LICENSE": { + "sha256": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "bytes": 10142, + "role": "license", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/LICENSE", + "sha256": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/pyproject.toml": { + "sha256": "345f26b9f691435e39d0eb6f7f4150a390f43175b22f8d61ac95e7f2827f0a77", + "bytes": 3404, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/pyproject.toml", + "sha256": "345f26b9f691435e39d0eb6f7f4150a390f43175b22f8d61ac95e7f2827f0a77", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__init__.py": { + "sha256": "80534322a1a3167d8775829ee220a6acf4fe455f3f778c4b8e94bcf7fadfa0b5", + "bytes": 5637, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/__init__.py", + "sha256": "80534322a1a3167d8775829ee220a6acf4fe455f3f778c4b8e94bcf7fadfa0b5", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__version__.py": { + "sha256": "abba90670b0370a3dc40d97c2dea46a35d4bec941ff10d7c3cf3098ef04a17f9", + "bytes": 435, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/__version__.py", + "sha256": "abba90670b0370a3dc40d97c2dea46a35d4bec941ff10d7c3cf3098ef04a17f9", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_internal_utils.py": { + "sha256": "4c7d8d132c9898fc7d715e473f3ac74785ddc4ab96d2c9240f87835dc6d981ff", + "bytes": 1542, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/_internal_utils.py", + "sha256": "4c7d8d132c9898fc7d715e473f3ac74785ddc4ab96d2c9240f87835dc6d981ff", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_types.py": { + "sha256": "d06df79f54a279c0cc3faec596c446246d5ad14edfd529eb328defbd62a44a89", + "bytes": 5838, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/_types.py", + "sha256": "d06df79f54a279c0cc3faec596c446246d5ad14edfd529eb328defbd62a44a89", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/adapters.py": { + "sha256": "cc9b1b02694fee0353481fbad84fe3ddbedec4441dba54df7914c63f2aa85937", + "bytes": 27992, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/adapters.py", + "sha256": "cc9b1b02694fee0353481fbad84fe3ddbedec4441dba54df7914c63f2aa85937", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/api.py": { + "sha256": "4d15480ac046f089209798e8650476ef4a28ebe6f81b400758f8ef42ec6b5509", + "bytes": 7152, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/api.py", + "sha256": "4d15480ac046f089209798e8650476ef4a28ebe6f81b400758f8ef42ec6b5509", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/auth.py": { + "sha256": "fdc8bb34a8a5a088b169ca13277d107b0bc94ee63ed5e89dd4f5569d9b2bb04c", + "bytes": 12107, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/auth.py", + "sha256": "fdc8bb34a8a5a088b169ca13277d107b0bc94ee63ed5e89dd4f5569d9b2bb04c", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/certs.py": { + "sha256": "fd9c6b83359cef90ff6c4eeeab8dcc2388da382ebca7d00a499b3c0b434a87e4", + "bytes": 430, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/certs.py", + "sha256": "fd9c6b83359cef90ff6c4eeeab8dcc2388da382ebca7d00a499b3c0b434a87e4", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/compat.py": { + "sha256": "4a51c5ab07b015c298d6ea69d71502979cd3ed6b935d88e4433ce5341dacf584", + "bytes": 2494, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/compat.py", + "sha256": "4a51c5ab07b015c298d6ea69d71502979cd3ed6b935d88e4433ce5341dacf584", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/cookies.py": { + "sha256": "05d12b965c76f229803e17aef1c9969d712e4f4d0f6a06c05e0a47212fd5b417", + "bytes": 21504, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/cookies.py", + "sha256": "05d12b965c76f229803e17aef1c9969d712e4f4d0f6a06c05e0a47212fd5b417", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/exceptions.py": { + "sha256": "c5e18f3352454968e337bb3056f0867df2f37c0a0d2c1a77dc05e7e0b3c0411b", + "bytes": 4564, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/exceptions.py", + "sha256": "c5e18f3352454968e337bb3056f0867df2f37c0a0d2c1a77dc05e7e0b3c0411b", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/help.py": { + "sha256": "e5845e93980b2e25be418fb7fe0b8e6e999fef8f84afc5a43f4546efdc24691f", + "bytes": 4068, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/help.py", + "sha256": "e5845e93980b2e25be418fb7fe0b8e6e999fef8f84afc5a43f4546efdc24691f", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/hooks.py": { + "sha256": "ebd8a02475d31a0e473a8f553e9501ff43645b9563885ad52844e7a63f0d76ab", + "bytes": 1138, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/hooks.py", + "sha256": "ebd8a02475d31a0e473a8f553e9501ff43645b9563885ad52844e7a63f0d76ab", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/models.py": { + "sha256": "557962f283e48bb20604129509979803687c9bf8b43e5d0f38e8d5037a5c2131", + "bytes": 41710, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/models.py", + "sha256": "557962f283e48bb20604129509979803687c9bf8b43e5d0f38e8d5037a5c2131", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/packages.py": { + "sha256": "fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287", + "bytes": 904, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/packages.py", + "sha256": "fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/py.typed": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/py.typed", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/sessions.py": { + "sha256": "3d2089736ced93b2b405624a943f866d22652b17df06a85eb010f86272fc3e7d", + "bytes": 34072, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/sessions.py", + "sha256": "3d2089736ced93b2b405624a943f866d22652b17df06a85eb010f86272fc3e7d", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/status_codes.py": { + "sha256": "1950f47c89cf18019787e07d8ce48f66d6b38e622f7d94d70a90247fee6c040e", + "bytes": 4351, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/status_codes.py", + "sha256": "1950f47c89cf18019787e07d8ce48f66d6b38e622f7d94d70a90247fee6c040e", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/structures.py": { + "sha256": "ba9460c39078f25e6f1d2a24ac941ac6f8d2ee97197fa8c8d0c262d8a1e67a02", + "bytes": 4134, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/structures.py", + "sha256": "ba9460c39078f25e6f1d2a24ac941ac6f8d2ee97197fa8c8d0c262d8a1e67a02", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/utils.py": { + "sha256": "b879cb3f671cf1c28e8ff9b2b02151bcdb8974b4820a514cfdd1f5a038443cd2", + "bytes": 36061, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/src/requests/utils.py", + "sha256": "b879cb3f671cf1c28e8ff9b2b02151bcdb8974b4820a514cfdd1f5a038443cd2", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/tests/__init__.py": { + "sha256": "ac7f253daae0905f9b3dec647cae736bb3c090185aa373b30b3e851599e5342c", + "bytes": 469, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/tests/__init__.py", + "sha256": "ac7f253daae0905f9b3dec647cae736bb3c090185aa373b30b3e851599e5342c", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/tests/conftest.py": { + "sha256": "6d65ffb582519f80a66c5d1ef571e3c33395a199f9e67fcb500c6ad2d7800e0a", + "bytes": 1934, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/tests/conftest.py", + "sha256": "6d65ffb582519f80a66c5d1ef571e3c33395a199f9e67fcb500c6ad2d7800e0a", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine/vendor/requests/tests/test_requests.py": { + "sha256": "91ee3b9532c67d6fd533f9f8a7e910a63eb5a0558e569cc2ac20d2c047a5369d", + "bytes": 108033, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/requests/tests/test_requests.py", + "sha256": "91ee3b9532c67d6fd533f9f8a7e910a63eb5a0558e569cc2ac20d2c047a5369d", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" + } + }, + "components/mimo-code/source_bundle/pristine-other/Dockerfile": { + "sha256": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "bytes": 598, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/Dockerfile", + "sha256": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/requirements-shared.txt": { + "sha256": "34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526", + "bytes": 364, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/requirements-shared.txt", + "sha256": "34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/LICENSE": { + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "bytes": 11358, + "role": "license", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/LICENSE", + "sha256": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/__init__.py": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/dfwinreg/__init__.py", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/errors.py": { + "sha256": "082bb8b1c061c3ce920949abc37528ec77e292758ce68423657cd5d2d87897a0", + "bytes": 47, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/dfwinreg/errors.py", + "sha256": "082bb8b1c061c3ce920949abc37528ec77e292758ce68423657cd5d2d87897a0", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/events.py": { + "sha256": "b92752fa2da3ff17c53e164eccf8a91905ed6fb71551c531d7927ff0a9dab271", + "bytes": 9388, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/containers/events.py", + "sha256": "b92752fa2da3ff17c53e164eccf8a91905ed6fb71551c531d7927ff0a9dab271", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/interface.py": { + "sha256": "22061b1f10090bbecda41391007c7e2295baaf4f1f4797b5babff82bd43a5387", + "bytes": 57, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/containers/interface.py", + "sha256": "22061b1f10090bbecda41391007c7e2295baaf4f1f4797b5babff82bd43a5387", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/manager.py": { + "sha256": "0d84bc47cd82f1d57e884c918b5dd75d81bbc1a80380890b3a54edd420e0f22c", + "bytes": 117, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/containers/manager.py", + "sha256": "0d84bc47cd82f1d57e884c918b5dd75d81bbc1a80380890b3a54edd420e0f22c", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/time_events.py": { + "sha256": "69aa7937cb245410683d37f42ceebaff039d2b5796065f4c0c4618290ffb4a5e", + "bytes": 1533, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/containers/time_events.py", + "sha256": "69aa7937cb245410683d37f42ceebaff039d2b5796065f4c0c4618290ffb4a5e", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/windows_events.py": { + "sha256": "1be04adf9ae090fa68333eb26f087e4d09edecb843340404e9b51bedf32a94aa", + "bytes": 2591, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/containers/windows_events.py", + "sha256": "1be04adf9ae090fa68333eb26f087e4d09edecb843340404e9b51bedf32a94aa", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/lib/definitions.py": { + "sha256": "a11900d7bc98b80e318e0967f0218aca2e304d328954da20139fc342bb2fb697", + "bytes": 5463, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/lib/definitions.py", + "sha256": "a11900d7bc98b80e318e0967f0218aca2e304d328954da20139fc342bb2fb697", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/interface.py": { + "sha256": "e18590112b9db1dfcc0c4df44750678cc886134452e1619248a2ef07544d7143", + "bytes": 8216, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/interface.py", + "sha256": "e18590112b9db1dfcc0c4df44750678cc886134452e1619248a2ef07544d7143", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/mediator.py": { + "sha256": "ff2e0bed3543e230ff9d98b044356199e9419b99cef7faa997d21811d598ab4a", + "bytes": 19710, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/mediator.py", + "sha256": "ff2e0bed3543e230ff9d98b044356199e9419b99cef7faa997d21811d598ab4a", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/plugins.py": { + "sha256": "88a70819243e00cf6557c40c1ebe21eb87ee06272e69c18d7c93ea6c5baac0b4", + "bytes": 237, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/plugins.py", + "sha256": "88a70819243e00cf6557c40c1ebe21eb87ee06272e69c18d7c93ea6c5baac0b4", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_parser.py": { + "sha256": "f5f747e98a017ebd019ddba45c36ea73c5de1f3b48d3238cec8cb44b39919793", + "bytes": 9145, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/winreg_parser.py", + "sha256": "f5f747e98a017ebd019ddba45c36ea73c5de1f3b48d3238cec8cb44b39919793", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/default.py": { + "sha256": "e026e975023b44b9c99dfb22b1d4d4b99d396019aed592d08bf2adc636ccc069", + "bytes": 1117, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/winreg_plugins/default.py", + "sha256": "e026e975023b44b9c99dfb22b1d4d4b99d396019aed592d08bf2adc636ccc069", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/interface.py": { + "sha256": "2ef4e78f16ef5a1c9850aa08615737d01e2953d837dbf4692d9be18f205439e2", + "bytes": 10999, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/winreg_plugins/interface.py", + "sha256": "2ef4e78f16ef5a1c9850aa08615737d01e2953d837dbf4692d9be18f205439e2", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py": { + "sha256": "4711ac18d81ff23cf782b870861ef5f841a14cbfccc23fcaa7d995d6df04ee7e", + "bytes": 2569, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py", + "sha256": "4711ac18d81ff23cf782b870861ef5f841a14cbfccc23fcaa7d995d6df04ee7e", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/services.py": { + "sha256": "b33bf0efb841b2d19941aa2dc1b517fac09b60dc50f2c01841231cd04195ad27", + "bytes": 4596, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/winreg_plugins/services.py", + "sha256": "b33bf0efb841b2d19941aa2dc1b517fac09b60dc50f2c01841231cd04195ad27", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py": { + "sha256": "956ba2a62fdb6860f71a345b4bdeffdda1b90de618f2fc51a29a7ebea829641a", + "bytes": 2521, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py", + "sha256": "956ba2a62fdb6860f71a345b4bdeffdda1b90de618f2fc51a29a7ebea829641a", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/pytz/__init__.py": { + "sha256": "84d16f933ae230cb9c53ec4d0addc397380705017079ee8c5430465b1035a6fb", + "bytes": 45, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/pytz/__init__.py", + "sha256": "84d16f933ae230cb9c53ec4d0addc397380705017079ee8c5430465b1035a6fb", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/requirements.txt": { + "sha256": "ad2fab71ce6887529d53aaedaf50b793a769e8ac34c596342e00491434a6ebd3", + "bytes": 1314, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/requirements.txt", + "sha256": "ad2fab71ce6887529d53aaedaf50b793a769e8ac34c596342e00491434a6ebd3", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/setup.py": { + "sha256": "9c3a29f59a514add92378b7885a35b73a9695631fcc27849ed198fe481f33fc6", + "bytes": 7363, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/setup.py", + "sha256": "9c3a29f59a514add92378b7885a35b73a9695631fcc27849ed198fe481f33fc6", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/100_sub_keys.hiv": { + "sha256": "67aa9abe820736c53b272f93e86569d3aa7ef113fcff02696ebcd34185d991c5", + "bytes": 24576, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/test_data/regf/100_sub_keys.hiv", + "sha256": "67aa9abe820736c53b272f93e86569d3aa7ef113fcff02696ebcd34185d991c5", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv": { + "sha256": "370cdc7037cd01aeeae15dd0e86a44239138425372efd2cf35f066c1fbb36f50", + "bytes": 24576, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv", + "sha256": "370cdc7037cd01aeeae15dd0e86a44239138425372efd2cf35f066c1fbb36f50", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tests/parsers/winreg_plugins/interface.py": { + "sha256": "4e7e2bb2ff10353a6b8ec54b11ed0420b8ab6c45483c7e77e761accb310acd75", + "bytes": 7334, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/tests/parsers/winreg_plugins/interface.py", + "sha256": "4e7e2bb2ff10353a6b8ec54b11ed0420b8ab6c45483c7e77e761accb310acd75", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/__init__.py": { + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "bytes": 0, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/tools/__init__.py", + "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/run_case.py": { + "sha256": "5906eb2e26a100d1b993cc982ebdc7cbb18d74788a70f3446e8e7a50c04b111d", + "bytes": 3920, + "role": "original_input", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "path": "/app/vendor/plaso/tools/run_case.py", + "sha256": "5906eb2e26a100d1b993cc982ebdc7cbb18d74788a70f3446e8e7a50c04b111d", + "kind": "pinned_image_file", + "image_reference": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + } + }, + "components/mimo-code/source_bundle/runtime/code_runtime/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/actor_launcher.py": { + "sha256": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "bytes": 5012, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "254abfeedc1d69cf228f923b5b43452d820c8ba5889fd8595e322e19efc7a896" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/backend.py": { + "sha256": "691b1b428f7134e98b27e402b735b3f6be36439ab64865bf3e4fc343a676ebe3", + "bytes": 14437, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "3621c013ee57df98e942a46d92cf6b8baf2c4a8dcdd09e88d472d48791a89fa1" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/code_child_launcher.py": { + "sha256": "4ebf25639af6ccbe8faad346be45e2b5dd778e659b2a34faec51b6ad62e68102", + "bytes": 817, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "d7b24660bbd7b33a6176b603d70185ffdaefd5c14c656fc5e10942d0aa23995f" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/environment.py": { + "sha256": "ef8546819e3ece598ae9032254beb550f030f703f486bbfa9fe754a321f85430", + "bytes": 1625, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "3aa014087c2978ec0fd5daf920c4553894d3227bfe936f6f4ac7da800a708b07" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/guard.py": { + "sha256": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "bytes": 13254, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "8b24c249acc86d5d4fad2b495072c7927b353471b18bd4fd881ae7deef206d02" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/launch_service.py": { + "sha256": "e5df97cf4e32894de79f90ea5f70074fd83cdcfe191a1c013af737fbbad02025", + "bytes": 2388, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "0f69e15858a99a8027eb713ae823c38db6d20328b72448f05e620ce460e280a4" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/server.py": { + "sha256": "37679a90257e5907fec750293fb74610c95400e46db0a4905973bb6e9a3d96b1", + "bytes": 645, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "9eadc321fddc535430738e35d886ed26d97b748ae59977b70b09b7bc16976dbe" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/trusted_checker.py": { + "sha256": "62ff949eeda90727ac3cae771454b12ea35d4c6fa1b51ae9333f5bdb82fbe94d", + "bytes": 2799, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "650abae5d206df1fda1b15699b9b5a7f4888e1ad93c349f3db1fc9bb3b8e888d" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/verifier_launcher.py": { + "sha256": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "bytes": 962, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "aa03260a2bcc91c9e23fd32dda0d75d1979ee7f4f64e87ea635f6bcd6048b075" + }, + "components/mimo-code/source_bundle/runtime/code_runtime/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "8b05bffad6831c34e38e26926aa121845dc7e4150a6620ef1df690191a84e0d1" + }, + "components/mimo-code/source_bundle/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/mimo-code/source_bundle/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2df4ab6636056806069216ee52576ac979255cb895b49b0c72c3686f3d9c5ae2" + }, + "components/mimo-code/source_bundle/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2876ad9a5d35eeb0e1ebb40346e5d230d8326ac8280ec260459798cf7a4eee18" + }, + "components/mimo-code/source_bundle/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "9fa259555127367477c21ca27f0ee6ac4a49e5f5744ecd91bf23a3ea1d0ab07d" + }, + "components/mimo-code/source_bundle/source/instruction.md": { + "sha256": "44d9729328960cc04484e8ff23d492ac54edfc83f5910c24301742c895b96920", + "bytes": 2035, + "role": "original_instruction", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1005-software-systems/instruction.md", + "sha256": "44d9729328960cc04484e8ff23d492ac54edfc83f5910c24301742c895b96920", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source/task.toml": { + "sha256": "5cc7f78314cff7486514a872696334ea7add1614ab4d0e0c575f281a89f7425d", + "bytes": 3264, + "role": "dependency", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1005-software-systems/task.toml", + "sha256": "5cc7f78314cff7486514a872696334ea7add1614ab4d0e0c575f281a89f7425d", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source/tests/anti_hack_guard.py": { + "sha256": "336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a", + "bytes": 5030, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1005-software-systems/tests/anti_hack_guard.py", + "sha256": "336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source/tests/fixtures/pristine_env_manifest.json": { + "sha256": "544b5385c6ded480cc93e3c39938fce50b1ec7185d6e6052c5d53b9514968921", + "bytes": 3288, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1005-software-systems/tests/fixtures/pristine_env_manifest.json", + "sha256": "544b5385c6ded480cc93e3c39938fce50b1ec7185d6e6052c5d53b9514968921", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source/tests/fixtures/regression_cases.json": { + "sha256": "24593e6c78d47ddcb3e95e62464ca66169005ef390b5bef717a1bc3952f1fb38", + "bytes": 2886, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1005-software-systems/tests/fixtures/regression_cases.json", + "sha256": "24593e6c78d47ddcb3e95e62464ca66169005ef390b5bef717a1bc3952f1fb38", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source/tests/task_test.sh": { + "sha256": "786d65d844825a6cc7827d64dd9b34f388ef1f2be78c609e3a84ede8ed363bf1", + "bytes": 936, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1005-software-systems/tests/task_test.sh", + "sha256": "786d65d844825a6cc7827d64dd9b34f388ef1f2be78c609e3a84ede8ed363bf1", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source/tests/test.sh": { + "sha256": "5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35", + "bytes": 765, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1005-software-systems/tests/test.sh", + "sha256": "5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source/tests/test_outputs.py": { + "sha256": "ae66085efc08ce1ac14b78e4aa9635452528c4ace0c2eddb79aeb3c023487a0c", + "bytes": 7278, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1005-software-systems/tests/test_outputs.py", + "sha256": "ae66085efc08ce1ac14b78e4aa9635452528c4ace0c2eddb79aeb3c023487a0c", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source-other/instruction.md": { + "sha256": "6d55a1b1cb882a951518a74f06dbd70bdb845a3669b4ad0210e4aff0c56d82a3", + "bytes": 1831, + "role": "original_instruction", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1001-security-forensics/instruction.md", + "sha256": "6d55a1b1cb882a951518a74f06dbd70bdb845a3669b4ad0210e4aff0c56d82a3", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source-other/task.toml": { + "sha256": "88538e9f67364bbdea3a753ba3a6cb3cc66ca998e2e6ffe2e92190e36125f1bd", + "bytes": 3324, + "role": "dependency", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1001-security-forensics/task.toml", + "sha256": "88538e9f67364bbdea3a753ba3a6cb3cc66ca998e2e6ffe2e92190e36125f1bd", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source-other/tests/anti_hack_guard.py": { + "sha256": "336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a", + "bytes": 5030, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1001-security-forensics/tests/anti_hack_guard.py", + "sha256": "336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source-other/tests/fixtures/expected.json": { + "sha256": "5ceff9d56caaa93b84f9d8bdc55009efca27f7e3e0fe9f6e7fc18e2f6aca9b1b", + "bytes": 580, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1001-security-forensics/tests/fixtures/expected.json", + "sha256": "5ceff9d56caaa93b84f9d8bdc55009efca27f7e3e0fe9f6e7fc18e2f6aca9b1b", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source-other/tests/fixtures/pristine_env_manifest.json": { + "sha256": "dcd500a72c68f04bd5d7b9faadde661274cb2648fb1d064b79b868908463b756", + "bytes": 3396, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1001-security-forensics/tests/fixtures/pristine_env_manifest.json", + "sha256": "dcd500a72c68f04bd5d7b9faadde661274cb2648fb1d064b79b868908463b756", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source-other/tests/task_test.sh": { + "sha256": "8152f7541a6105f16a8da923f375093607fddf1adba35c816eab455080af061e", + "bytes": 800, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1001-security-forensics/tests/task_test.sh", + "sha256": "8152f7541a6105f16a8da923f375093607fddf1adba35c816eab455080af061e", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source-other/tests/test.sh": { + "sha256": "5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35", + "bytes": 765, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1001-security-forensics/tests/test.sh", + "sha256": "5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35", + "kind": "hugging_face_file" + } + }, + "components/mimo-code/source_bundle/source-other/tests/test_outputs.py": { + "sha256": "266d7ff9688685eef6ee0fbe7a35935dfe1fed615604843d175a9369adb6a279", + "bytes": 1774, + "role": "original_checker", + "reviewed_record": "mimo-code/COMPONENT_MANIFEST.json", + "source": { + "repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "path": "tasks/candidate-1001-security-forensics/tests/test_outputs.py", + "sha256": "266d7ff9688685eef6ee0fbe7a35935dfe1fed615604843d175a9369adb6a279", + "kind": "hugging_face_file" + } + }, + "components/awm/ADAPTATIONS.txt": { + "sha256": "dbaa91cef8aa2714c2761091e7a4f3b026a98add56e4b867b1f3e0c72c7445fd", + "bytes": 331, + "role": "packaging_metadata", + "reviewed_record": "english-documentation-20261011", + "parent_sha256": "726ee5400f83d3b47a4c0fae60e9a085a590c7a9abc8e6d2b910037d89f253ac" + }, + "components/awm/Dockerfile": { + "sha256": "1c26892b11e285d319e7ebc65f6cb275d38e5a4e5b581f9d022b026d72a3a3db", + "bytes": 1358, + "role": "packaging_metadata", + "reviewed_record": "awm/ALLOWLIST.json" + }, + "components/awm/LICENSE_SCOPE.json": { + "sha256": "1ea6a4d0c80da30d5f658364aaef2664cf09f32da0bce23c448e1fc1e4c4a7a6", + "bytes": 908, + "role": "packaging_metadata", + "reviewed_record": "awm/ALLOWLIST.json" + }, + "components/awm/NOTICE": { + "sha256": "4d91952ef79d73182302464db3d190b0427ac04754eb6b7f5b1e8ad739c0bb1c", + "bytes": 643, + "role": "packaging_metadata", + "reviewed_record": "awm/ALLOWLIST.json" + }, + "components/awm/SOURCE_CREDITS.json": { + "sha256": "ae057f0e66d0e924e81f553e729148cd98161bf070283928ef4fb658e9cf3546", + "bytes": 469, + "role": "packaging_metadata", + "reviewed_record": "awm/ALLOWLIST.json" + }, + "components/awm/TASKS.json": { + "sha256": "4d97456d2794c1f347c47f3c32733294d83778165d99b923bae4ebeec15261b2", + "bytes": 3253, + "role": "packaging_metadata", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "62a02077d362556d2ba89732a1d510e3856251ae435b6b0c6fc5c4ab033c0c0a" + }, + "components/awm/awm-requirements.lock": { + "sha256": "65d41089191536d5940648213b09924ba93e55d92df0080634e16d13615fd1ac", + "bytes": 4276, + "role": "dependency_lock", + "reviewed_record": "awm/ALLOWLIST.json" + }, + "components/awm/config.json": { + "sha256": "1639f6ced0ae83cb1f87bb2737578602c1d410b2974ca2a889302e6a186b29fa", + "bytes": 1068, + "role": "packaging_metadata", + "reviewed_record": "awm/ALLOWLIST.json" + }, + "components/awm/private/tasks/awm-accounting-1-invoice/SOURCE.json": { + "sha256": "3a1cc59eece46232d3ebb39df3cbfedd0625ab85bcf5e1d6cb090ea6ecec0e58", + "bytes": 657, + "role": "derived_source_metadata", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": null, + "byte_equal_source_sha256": null + } + }, + "components/awm/private/tasks/awm-accounting-1-invoice/initial.db": { + "sha256": "8ad2959536e44caba47bcbeca9018e47e7157783194d19b429aa8f22a60f4771", + "bytes": 331776, + "role": "materialized_original_seed", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": null, + "byte_equal_source_sha256": null + } + }, + "components/awm/private/tasks/awm-accounting-1-invoice/original_api.py": { + "sha256": "57362b907a2d454bbd29b95dfebb7d84207ce9d7e22533eaf54853ee4fb84990", + "bytes": 87054, + "role": "original_task_api", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_envs.jsonl#scenario=accounting_1;full_code", + "byte_equal_source_sha256": "57362b907a2d454bbd29b95dfebb7d84207ce9d7e22533eaf54853ee4fb84990" + } + }, + "components/awm/private/tasks/awm-accounting-1-invoice/original_verifier.py": { + "sha256": "3cd0d63022caa900e32bda0b0d3ae5c9948ce3c195b77ba1906c7ddebea9c58b", + "bytes": 5951, + "role": "original_task_verifier", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_verifier.pure_code.jsonl#scenario=accounting_1;task_idx=1;verification.code", + "byte_equal_source_sha256": "3cd0d63022caa900e32bda0b0d3ae5c9948ce3c195b77ba1906c7ddebea9c58b" + } + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/SOURCE.json": { + "sha256": "93eda02b7f5e0bd7aca37a2becc3fd20925472a8f33143171e4cc250564ff7b3", + "bytes": 801, + "role": "derived_source_metadata", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": null, + "byte_equal_source_sha256": null + } + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/initial.db": { + "sha256": "9a523ebee8c25ca61aa43075c6263e5d3b310d39157ebddabea4cb754e610a1c", + "bytes": 307200, + "role": "materialized_original_seed", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": null, + "byte_equal_source_sha256": null + } + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/original_api.py": { + "sha256": "ff94326bc0d2a826a2a211512a617f0b9f5d91866b9c77ea17f6502f77b75aa6", + "bytes": 98238, + "role": "original_task_api", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_envs.jsonl#scenario=manufacturing_execution_system_1;full_code", + "byte_equal_source_sha256": "ff94326bc0d2a826a2a211512a617f0b9f5d91866b9c77ea17f6502f77b75aa6" + } + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/original_verifier.py": { + "sha256": "f0cd8fa0f1a17e76f8e87cfbe59a81645a750999f747be36b8d25d9244e5b8f1", + "bytes": 4160, + "role": "original_task_verifier", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_verifier.pure_code.jsonl#scenario=manufacturing_execution_system_1;task_idx=5;verification.code", + "byte_equal_source_sha256": "f0cd8fa0f1a17e76f8e87cfbe59a81645a750999f747be36b8d25d9244e5b8f1" + } + }, + "components/awm/requirements.lock": { + "sha256": "0078892ae5870080b3417677926bc64f4f87ba9e8110ff400f18954e361455fc", + "bytes": 10799, + "role": "dependency_lock", + "reviewed_record": "awm/ALLOWLIST.json" + }, + "components/awm/runtime/awm/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/awm/runtime/awm/adapter.py": { + "sha256": "98218136805b95d2cc5e98e190ef79e6d0a9c2950d8f61844b4672d4e2dac651", + "bytes": 5108, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "df91f0c74051096282c2a136b0ae8cabdb4c24d739d1e506e2e3d06a41be0a49" + }, + "components/awm/runtime/awm/launch_service.py": { + "sha256": "0638af1cd1c6a311ee85109143ec6a59646a5f3d41c4b30312526dec561da33d", + "bytes": 2413, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "3bf920b5a2f90723a5cf29501970d3b4ddc802061ff2d1a6570728125ff19ea2" + }, + "components/awm/runtime/awm/openenv_app.py": { + "sha256": "f47b0cc104a7a962fc932c4d3f3bb8bfcf1524dec049b9c2c33161924038b94e", + "bytes": 3995, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2e393513d340950dab1317c4ba54934526f499599436e658062894fdfa51851f" + }, + "components/awm/runtime/awm/server.py": { + "sha256": "484c7caeaa301b91f468a9e55a251a6b529c6f9d0f2e4951c9602071c40ebcea", + "bytes": 820, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "4a7b8f1300e5957cb359c04eb7f0badab59c22e9119642f2eac6e02cf1e51356" + }, + "components/awm/runtime/awm/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "8b05bffad6831c34e38e26926aa121845dc7e4150a6620ef1df690191a84e0d1" + }, + "components/awm/runtime/awm/worker.py": { + "sha256": "06d2f12af151c8de707360ad950f6298a59668b203be8c64430d9cc602c7df54", + "bytes": 6280, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "33b303c670095b33db57b8506e88b313973b4555980d45f94639497de4dda0b3" + }, + "components/awm/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/awm/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2df4ab6636056806069216ee52576ac979255cb895b49b0c72c3686f3d9c5ae2" + }, + "components/awm/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2876ad9a5d35eeb0e1ebb40346e5d230d8326ac8280ec260459798cf7a4eee18" + }, + "components/awm/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "local_transport_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "9fa259555127367477c21ca27f0ee6ac4a49e5f5744ecd91bf23a3ea1d0ab07d" + }, + "components/awm/upstream/README.md": { + "sha256": "12a0f7eb70edfb5e6fb02f9904c3e06daea24eab392ff4d6cef229ce18237810", + "bytes": 3917, + "role": "original_upstream_metadata_or_row", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "README.md", + "byte_equal_source_sha256": "12a0f7eb70edfb5e6fb02f9904c3e06daea24eab392ff4d6cef229ce18237810", + "note": "For .jsonl this is the exact saved selected row plus trailing newline, not the entire remote file hash." + } + }, + "components/awm/upstream/accounting_1-gen_db.jsonl": { + "sha256": "1cd23311c95c9919621b226c99dcab54faf815300c72cd542a394a5e69463a6e", + "bytes": 13948, + "role": "original_upstream_metadata_or_row", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_db.jsonl", + "byte_equal_source_sha256": "1cd23311c95c9919621b226c99dcab54faf815300c72cd542a394a5e69463a6e", + "note": "For .jsonl this is the exact saved selected row plus trailing newline, not the entire remote file hash." + } + }, + "components/awm/upstream/accounting_1-gen_envs.jsonl": { + "sha256": "99f1883338fa6f4827cb9c6c4c9cf9222c28a2a9842202cbe524921921de3ae3", + "bytes": 90440, + "role": "original_upstream_metadata_or_row", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_envs.jsonl", + "byte_equal_source_sha256": "99f1883338fa6f4827cb9c6c4c9cf9222c28a2a9842202cbe524921921de3ae3", + "note": "For .jsonl this is the exact saved selected row plus trailing newline, not the entire remote file hash." + } + }, + "components/awm/upstream/accounting_1-gen_sample.jsonl": { + "sha256": "28cf8d5611b0d63b9e17d0e991e328c2970cfef5595c08d084f2b1bad7a441fd", + "bytes": 32317, + "role": "original_upstream_metadata_or_row", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_sample.jsonl", + "byte_equal_source_sha256": "28cf8d5611b0d63b9e17d0e991e328c2970cfef5595c08d084f2b1bad7a441fd", + "note": "For .jsonl this is the exact saved selected row plus trailing newline, not the entire remote file hash." + } + }, + "components/awm/upstream/manufacturing_execution_system_1-gen_db.jsonl": { + "sha256": "a50a67f6680c40b779f831067fe84d5633a10af60c6b488a4d6510fa818f45f3", + "bytes": 10985, + "role": "original_upstream_metadata_or_row", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_db.jsonl", + "byte_equal_source_sha256": "a50a67f6680c40b779f831067fe84d5633a10af60c6b488a4d6510fa818f45f3", + "note": "For .jsonl this is the exact saved selected row plus trailing newline, not the entire remote file hash." + } + }, + "components/awm/upstream/manufacturing_execution_system_1-gen_envs.jsonl": { + "sha256": "882e62163cdd51b0dba39ceb6ad110f263001681e68961648a5acad2d9e20c28", + "bytes": 101887, + "role": "original_upstream_metadata_or_row", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_envs.jsonl", + "byte_equal_source_sha256": "882e62163cdd51b0dba39ceb6ad110f263001681e68961648a5acad2d9e20c28", + "note": "For .jsonl this is the exact saved selected row plus trailing newline, not the entire remote file hash." + } + }, + "components/awm/upstream/manufacturing_execution_system_1-gen_sample.jsonl": { + "sha256": "fe9ae64f008a723f8ec10bc02a754a810243f0e97e82221b0ed730faf5cce63a", + "bytes": 33744, + "role": "original_upstream_metadata_or_row", + "reviewed_record": "awm/ALLOWLIST.json", + "source": { + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "path": "gen_sample.jsonl", + "byte_equal_source_sha256": "fe9ae64f008a723f8ec10bc02a754a810243f0e97e82221b0ed730faf5cce63a", + "note": "For .jsonl this is the exact saved selected row plus trailing newline, not the entire remote file hash." + } + }, + "components/math/ADAPTATIONS.txt": { + "sha256": "15c3c4f106c052941f16970b3981ae9c9a7bbe4c913430bcac10edbc14e73151", + "bytes": 253, + "role": "adapter_documentation", + "reviewed_record": "english-documentation-20261011", + "parent_sha256": "f737285b66a06c5927f29c4abc1a88eb0e3e105013d655ef4ea142b2c185e981" + }, + "components/math/NOTICE.txt": { + "sha256": "73b544ecebc5d10e34e72f187bfdccf8ad66c9df4c37b03eeca7323a12401248", + "bytes": 703, + "role": "license_and_attribution", + "reviewed_record": "math/FILE_ALLOWLIST.json" + }, + "components/math/SDK_DEPENDENCIES.json": { + "sha256": "a037cf3ce617aa3e0216bf5e0677d229679bfffdd30dba9057b58bb413c39732", + "bytes": 25904, + "role": "dependency_manifest", + "reviewed_record": "math/FILE_ALLOWLIST.json" + }, + "components/math/SOURCE.json": { + "sha256": "a91ceb6c6b39e532fbef753034f1979d2364672d9bb6a45395c946dd8208befd", + "bytes": 1081, + "role": "metadata", + "reviewed_record": "math/FILE_ALLOWLIST.json" + }, + "components/math/TASKS.json": { + "sha256": "fe67677e50ff773b044feb9122e26a4dbb1dc647a5c88ba9db0adf952167104a", + "bytes": 3905, + "role": "metadata", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "55358840bcbda8eb1efed14464392594a96390c781ff914756eea0acfbe36137" + }, + "components/math/config.json": { + "sha256": "190f2c6c257c0cbc4cb6bfa2efe8e5fdca221b1c18b39aa70331781f2be79afa", + "bytes": 5968, + "role": "runtime_registry", + "reviewed_record": "math/FILE_ALLOWLIST.json" + }, + "components/math/licenses/MathConstraint-LICENSE": { + "sha256": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "bytes": 18656, + "role": "license_and_attribution", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "vireshpati/Math-Constraint", + "source_url": "https://github.com/vireshpati/Math-Constraint/blob/main/LICENSE", + "git_blob_sha": "4ea99c213c5c0c005ae4e80df8e52169d06896ec", + "license": { + "key": "cc-by-4.0", + "name": "Creative Commons Attribution 4.0 International", + "spdx_id": "CC-BY-4.0", + "url": "https://api.github.com/licenses/cc-by-4.0", + "node_id": "MDc6TGljZW5zZTI1" + }, + "sha256": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "retrieval_scope": "license text only; not a claim about the original generator revision" + } + }, + "components/math/licenses/RLVE-LICENSE": { + "sha256": "10afac3400d1abccc7ec2322e07563a3e495c13ac39d3865564aa2e2423b398e", + "bytes": 1069, + "role": "license_and_attribution", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "Zhiyuan-Zeng/RLVE", + "source_url": "https://github.com/Zhiyuan-Zeng/RLVE/blob/main/LICENSE", + "git_blob_sha": "5677eb6d02ee26cd27b6dce1cbfaa9676b1a2382", + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "sha256": "10afac3400d1abccc7ec2322e07563a3e495c13ac39d3865564aa2e2423b398e", + "retrieval_scope": "license text only; not a claim about the original generator revision" + } + }, + "components/math/licenses/UPSTREAM_COLLECTION_LICENSES.md": { + "sha256": "200b2ce93f2a5b9671165f9aea3cc4d89db995352c1e1e3db6d418262b058516", + "bytes": 462, + "role": "license_and_attribution", + "reviewed_record": "math/FILE_ALLOWLIST.json" + }, + "components/math/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/math/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2df4ab6636056806069216ee52576ac979255cb895b49b0c72c3686f3d9c5ae2" + }, + "components/math/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2876ad9a5d35eeb0e1ebb40346e5d230d8326ac8280ec260459798cf7a4eee18" + }, + "components/math/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "9fa259555127367477c21ca27f0ee6ac4a49e5f5744ecd91bf23a3ea1d0ab07d" + }, + "components/math/runtime/native_shell/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/math/runtime/native_shell/actor_launcher.py": { + "sha256": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "bytes": 5012, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "254abfeedc1d69cf228f923b5b43452d820c8ba5889fd8595e322e19efc7a896" + }, + "components/math/runtime/native_shell/backend.py": { + "sha256": "6cc693d7a384d6d76b8c99bfb6af2e5188c03aac81671cfec3414733fb98089a", + "bytes": 13484, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2fb83a818f65fadd7562bdd14b92254b41d740f4d212f4dd8aba58c23c48db52" + }, + "components/math/runtime/native_shell/environment.py": { + "sha256": "cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53", + "bytes": 1616, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "1c1ded0928c4757a87696f818cf9004a29e55f992495ffa0aacde9112dad7fea" + }, + "components/math/runtime/native_shell/guard.py": { + "sha256": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "bytes": 13254, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "8b24c249acc86d5d4fad2b495072c7927b353471b18bd4fd881ae7deef206d02" + }, + "components/math/runtime/native_shell/launch_service.py": { + "sha256": "db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b", + "bytes": 2383, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "c698c3b27e551f9986bf9e5aac9d337bf2e662058f5ba05d0882aaf2008ff98a" + }, + "components/math/runtime/native_shell/server.py": { + "sha256": "3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e", + "bytes": 640, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e993b18fd0e871ee97700a725d2d57722428209c34e6caf0fd86479ca6b7a374" + }, + "components/math/runtime/native_shell/verifier_launcher.py": { + "sha256": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "bytes": 962, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "aa03260a2bcc91c9e23fd32dda0d75d1979ee7f4f64e87ea635f6bcd6048b075" + }, + "components/math/runtime/native_shell/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "execution_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "8b05bffad6831c34e38e26926aa121845dc7e4150a6620ef1df690191a84e0d1" + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile": { + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/environment/instance.json": { + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "bytes": 98, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/environment/instance.json", + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/instruction.md": { + "sha256": "88e4a26e71d8483fbc89627210e4ed07f6dfef0fb16ce3e6d31e84a04bd050f9", + "bytes": 723, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/instruction.md", + "sha256": "88e4a26e71d8483fbc89627210e4ed07f6dfef0fb16ce3e6d31e84a04bd050f9", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/task.toml": { + "sha256": "b62ba527da418f1b84d165707ea56ea805953289b0993cc3176e988ef59c3d32", + "bytes": 694, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/task.toml", + "sha256": "b62ba527da418f1b84d165707ea56ea805953289b0993cc3176e988ef59c3d32", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/tests/check.py": { + "sha256": "3c0290e35201f077926099989cd0e82c10bf091cb33c572cacc02bca075debdb", + "bytes": 809, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/tests/check.py", + "sha256": "3c0290e35201f077926099989cd0e82c10bf091cb33c572cacc02bca075debdb", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/tests/instance.json": { + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "bytes": 98, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/tests/instance.json", + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/tests/run.py": { + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-costas-array-l3-s0/tests/test.sh": { + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile": { + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/environment/instance.json": { + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "bytes": 84, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/environment/instance.json", + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/instruction.md": { + "sha256": "dacf1d28faa912ac766cb9a8859b9a2d08940d2c52a9f8460c85ce0595a16c81", + "bytes": 599, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/instruction.md", + "sha256": "dacf1d28faa912ac766cb9a8859b9a2d08940d2c52a9f8460c85ce0595a16c81", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/task.toml": { + "sha256": "d2ea623dfdf1ab4864399d4231f17b7c6800cc73e1ad9d1c583816d149dca377", + "bytes": 672, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/task.toml", + "sha256": "d2ea623dfdf1ab4864399d4231f17b7c6800cc73e1ad9d1c583816d149dca377", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/tests/check.py": { + "sha256": "923f9e1258610a3cc3d5c2984b1855ed7341af13bc7592ff42aed0e0f91fc74d", + "bytes": 1220, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/tests/check.py", + "sha256": "923f9e1258610a3cc3d5c2984b1855ed7341af13bc7592ff42aed0e0f91fc74d", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/tests/instance.json": { + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "bytes": 84, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/tests/instance.json", + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/tests/run.py": { + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-ramsey-l4-s0/tests/test.sh": { + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile": { + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/environment/instance.json": { + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "bytes": 100, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/environment/instance.json", + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/instruction.md": { + "sha256": "a638ef887b79167571086549b8d9438447d07b800772aac868b3e9a2e6899cd2", + "bytes": 560, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/instruction.md", + "sha256": "a638ef887b79167571086549b8d9438447d07b800772aac868b3e9a2e6899cd2", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/task.toml": { + "sha256": "fb08db6bba18360321c1ac959d0af5f655435579d5cb88864d924897254c7546", + "bytes": 705, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/task.toml", + "sha256": "fb08db6bba18360321c1ac959d0af5f655435579d5cb88864d924897254c7546", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/check.py": { + "sha256": "9514518058e308fc2ae0ec0b8ce8a50993d5dfa09708ac9c3609e1edbbae126a", + "bytes": 1132, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/tests/check.py", + "sha256": "9514518058e308fc2ae0ec0b8ce8a50993d5dfa09708ac9c3609e1edbbae126a", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/instance.json": { + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "bytes": 100, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/tests/instance.json", + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/run.py": { + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "byte_identical": true + } + }, + "components/math/upstream/construct-mc-social-golfers-l4-s0/tests/test.sh": { + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "byte_identical": true + } + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile": { + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "byte_identical": true + } + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json": { + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "bytes": 99, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/environment/instance.json", + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "byte_identical": true + } + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md": { + "sha256": "db8d002ee820a699d6b7b819cb88ed583990529649255af446c22c98889ad370", + "bytes": 579, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/instruction.md", + "sha256": "db8d002ee820a699d6b7b819cb88ed583990529649255af446c22c98889ad370", + "byte_identical": true + } + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/task.toml": { + "sha256": "d42f4225ae8850e6abe3e1b612b0da6f2e896322a3e9e00e6addb988a8f8332a", + "bytes": 741, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/task.toml", + "sha256": "d42f4225ae8850e6abe3e1b612b0da6f2e896322a3e9e00e6addb988a8f8332a", + "byte_identical": true + } + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py": { + "sha256": "930cd10836482427303a497cfa896934ccdc24116879eaa4c5d32a572d01353c", + "bytes": 820, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/tests/check.py", + "sha256": "930cd10836482427303a497cfa896934ccdc24116879eaa4c5d32a572d01353c", + "byte_identical": true + } + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json": { + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "bytes": 99, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/tests/instance.json", + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "byte_identical": true + } + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py": { + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "byte_identical": true + } + }, + "components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh": { + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "byte_identical": true + } + }, + "components/math/FILE_ALLOWLIST.json": { + "sha256": "3391c140ba8b7dd1378d16065c7488379b3114ce3f6009461bf31c416138e2f5", + "bytes": 25394, + "role": "review_record_snapshot", + "reviewed_record": "english-documentation-20261011", + "parent_sha256": "f10d4faf43dd00619b8e5c46560d22741a2c5046fb8e2af17892f3b3a643044a" + }, + "components/math/MANIFEST.json": { + "sha256": "bc17cd61f2a4ce4d05194787d9e25f1d38f8fdd8856d904f1e04f44c6d768211", + "bytes": 6533, + "role": "review_record_snapshot", + "reviewed_record": "english-documentation-20261011", + "parent_sha256": "f92ab48efb26f5cc801aa354eb0fed7d7306d0bb2311bf26bcceb731cb79ee57" + }, + "components/pdbthink/DEPENDENCIES.json": { + "sha256": "b0cbd2dbfe130357ab86c48b3f0ee1acca985828022542d97f1f9d77e147f261", + "bytes": 46444, + "role": "dependency", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/Dockerfile": { + "sha256": "0c2bd4c86b8d834a907605e71d8dc3763513da29cf07c324eb718c8818b1ec45", + "bytes": 1057, + "role": "adapter", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/config.json": { + "sha256": "4ac5bc8faf3c53e689d3e1857e81c904da28c239dacc10e69c6f6bee67ba687a", + "bytes": 3638, + "role": "runtime_registry", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/licenses/DEPENDENCIES.json": { + "sha256": "7c98afbca1961f056579b344a5552c574582c6c19926578a748519fdd99496d7", + "bytes": 54492, + "role": "license", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/licenses/LICENSE-PDBTHINK": { + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "bytes": 11357, + "role": "license", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/licenses/SOURCE.json": { + "sha256": "ce75bb41edfeadb6dbe07aa8a8feacc4ed326c27695327ab56a45d80f38045cc", + "bytes": 872, + "role": "license", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/public_task.json": { + "sha256": "56e4865b7517b35a7d316a8881561b622f10af0b29bd8394c59a4316ae285e1c", + "bytes": 6132, + "role": "delivery_adaptation", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py", + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py", + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py", + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/gold.json": { + "sha256": "1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4", + "bytes": 253, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/gold.json", + "sha256": "1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/test.sh", + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml", + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/verify.py", + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/public_task.json": { + "sha256": "5d2dfa7c57a5c628a9c12cd097e7b644a155e380f1f6af48233560dbab0b4376", + "bytes": 6771, + "role": "delivery_adaptation", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py", + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py", + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py", + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json": { + "sha256": "995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390", + "bytes": 251, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json", + "sha256": "995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh", + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml", + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py", + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/public_task.json": { + "sha256": "7d267c32438351a4d92533f6e9960da36a1e39c768ad56988904029cb90da0c5", + "bytes": 9092, + "role": "delivery_adaptation", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py", + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py", + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py", + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json": { + "sha256": "4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7", + "bytes": 253, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json", + "sha256": "4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh", + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml", + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py", + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "kind": "original_file_preserved_from_v2" + } + }, + "components/pdbthink/requirements.lock": { + "sha256": "0078892ae5870080b3417677926bc64f4f87ba9e8110ff400f18954e361455fc", + "bytes": 10799, + "role": "dependency", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json" + }, + "components/pdbthink/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/pdbthink/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2df4ab6636056806069216ee52576ac979255cb895b49b0c72c3686f3d9c5ae2" + }, + "components/pdbthink/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "2876ad9a5d35eeb0e1ebb40346e5d230d8326ac8280ec260459798cf7a4eee18" + }, + "components/pdbthink/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "9fa259555127367477c21ca27f0ee6ac4a49e5f5744ecd91bf23a3ea1d0ab07d" + }, + "components/pdbthink/runtime/pdbthink/__init__.py": { + "sha256": "9f56e761d79bfdb34304a012586cb04d16b435ef6130091a97702e559260a2f2", + "bytes": 5, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "b087f3335e8ab666acb3a90f3130a6fa8a2908103c9755a0d4bf3a63294751e3" + }, + "components/pdbthink/runtime/pdbthink/adapter.py": { + "sha256": "1683d5e2fab016801207ecdde6cbd4d3730ed8c4ca22aafd0f3bf651dce0faf1", + "bytes": 6708, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "c37048ce62affd08e5220c9cef70970fab56c1db26d4b9c02a09a9d9131995db" + }, + "components/pdbthink/runtime/pdbthink/launch_service.py": { + "sha256": "cc89f1e687da1a71af567ac450fd761da0e5d4fe56901695de304aabd81c59bd", + "bytes": 2443, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "e8ad96b3bd3fd243743ed5a52748c0217a8327c59fd62c2d1c08aac9a4929832" + }, + "components/pdbthink/runtime/pdbthink/openenv_app.py": { + "sha256": "7ab1b3b05068cd5b0f20497062a8da5fd905c45e8eee295cb8f2fc5c7aca6577", + "bytes": 4033, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "6274d7617e0689139f4a3538c0513ab624da0b26814fdef2aa4596b29b510850" + }, + "components/pdbthink/runtime/pdbthink/server.py": { + "sha256": "76012b37d916b4044c6fe1da4e7accdf9faa2216f50c73d5b87cd12b7f1d70cf", + "bytes": 840, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "a8f6e6a197f60b369918362a4b0527eb063102b89cfff345e68af155da210e23" + }, + "components/pdbthink/runtime/pdbthink/transport.py": { + "sha256": "b1f6f82ff9e113aedd742a8f4b0c18c545020677503765ee913c31e20964b96f", + "bytes": 6739, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "d6564315dcc78f4be7a96fe213ab86db994207fae047b92d9b918f7b5b73b668" + }, + "components/pdbthink/runtime/pdbthink/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "adapter", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "8b05bffad6831c34e38e26926aa121845dc7e4150a6620ef1df690191a84e0d1" + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/environment/Dockerfile": { + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "bytes": 144, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/environment/Dockerfile", + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/instruction.md": { + "sha256": "33d86986d7b9d0a12678be7326d02048cf812cb536fc45fdb2837c9772c64ddf", + "bytes": 5198, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/instruction.md", + "sha256": "33d86986d7b9d0a12678be7326d02048cf812cb536fc45fdb2837c9772c64ddf", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/prompt.json": { + "sha256": "f61bc6944b49d7a8095eef3903cd4b10982417f02c04f4d2b47620dd2128f30d", + "bytes": 5309, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/prompt.json", + "sha256": "f61bc6944b49d7a8095eef3903cd4b10982417f02c04f4d2b47620dd2128f30d", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/task.toml": { + "sha256": "eaf162755c72fae0936eab27b370732356f5b184aa1077e543b46f8ce327db7d", + "bytes": 561, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/task.toml", + "sha256": "eaf162755c72fae0936eab27b370732356f5b184aa1077e543b46f8ce327db7d", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py", + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py", + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py", + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/gold.json": { + "sha256": "1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4", + "bytes": 253, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/gold.json", + "sha256": "1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/test.sh", + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml", + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-70c0778d985e571dde37/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-70c0778d985e571dde37/tests/verify.py", + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/environment/Dockerfile": { + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "bytes": 144, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/environment/Dockerfile", + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/instruction.md": { + "sha256": "1eba6ac44775863993c8215f0d146cdccc7e8874a05b694e79db776e375dd7b1", + "bytes": 5829, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/instruction.md", + "sha256": "1eba6ac44775863993c8215f0d146cdccc7e8874a05b694e79db776e375dd7b1", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/prompt.json": { + "sha256": "77c1f05eb4f17a1d1b3291d916c999104262acfd9180ef775fa51232228ec2bc", + "bytes": 5948, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/prompt.json", + "sha256": "77c1f05eb4f17a1d1b3291d916c999104262acfd9180ef775fa51232228ec2bc", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/task.toml": { + "sha256": "3c85ab2cfb5782ee7b40bd4fb0ef1b323d1874e6f2ffb23554b7b630ea46454c", + "bytes": 561, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/task.toml", + "sha256": "3c85ab2cfb5782ee7b40bd4fb0ef1b323d1874e6f2ffb23554b7b630ea46454c", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py", + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py", + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py", + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json": { + "sha256": "995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390", + "bytes": 251, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json", + "sha256": "995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh", + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml", + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py", + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/environment/Dockerfile": { + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "bytes": 144, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/environment/Dockerfile", + "sha256": "66b564f58a409177999eda6eea1e5c8009d88c6d72faffa1bac7c497b800a460", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/instruction.md": { + "sha256": "21dc586748f23a8630118831399e1c40d62443444d454bf6f5e7f60ba334b06f", + "bytes": 8121, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/instruction.md", + "sha256": "21dc586748f23a8630118831399e1c40d62443444d454bf6f5e7f60ba334b06f", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/prompt.json": { + "sha256": "97d07b9814fff65f7cd78bf968d4854aa2aa75e8535ceb574b35a93dbf087db0", + "bytes": 8269, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/prompt.json", + "sha256": "97d07b9814fff65f7cd78bf968d4854aa2aa75e8535ceb574b35a93dbf087db0", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/task.toml": { + "sha256": "45af241c0dc3ed0b71fff4db4b2f334760bc387aaff0a74a6dc9543cce2effe1", + "bytes": 561, + "role": "original_source", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/task.toml", + "sha256": "45af241c0dc3ed0b71fff4db4b2f334760bc387aaff0a74a6dc9543cce2effe1", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py": { + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "bytes": 2383, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py", + "sha256": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py": { + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "bytes": 15164, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py", + "sha256": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py": { + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "bytes": 6699, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py", + "sha256": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json": { + "sha256": "4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7", + "bytes": 253, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json", + "sha256": "4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh": { + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "bytes": 42, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh", + "sha256": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml": { + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "bytes": 160, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml", + "sha256": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "kind": "original_file_preserved_from_v2" + } + }, + "upstream/pdbthink/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py": { + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "bytes": 1558, + "role": "original_checker", + "reviewed_record": "pdbthink/PDB_COMPONENT_SOURCE.json", + "source": { + "repository": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "path": "pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py", + "sha256": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "kind": "original_file_preserved_from_v2" + } + }, + "LICENSES/CC-BY-4.0.txt": { + "sha256": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "bytes": 18656, + "role": "upstream_license_copy", + "reviewed_record": "math/FILE_ALLOWLIST.json", + "source": { + "repo": "vireshpati/Math-Constraint", + "source_url": "https://github.com/vireshpati/Math-Constraint/blob/main/LICENSE", + "git_blob_sha": "4ea99c213c5c0c005ae4e80df8e52169d06896ec", + "license": { + "key": "cc-by-4.0", + "name": "Creative Commons Attribution 4.0 International", + "spdx_id": "CC-BY-4.0", + "url": "https://api.github.com/licenses/cc-by-4.0", + "node_id": "MDc6TGljZW5zZTI1" + }, + "sha256": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "retrieval_scope": "license text only; not a claim about the original generator revision" + } + }, + "LICENSES/Apache-2.0-PDBThink.txt": { + "sha256": "c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4", + "bytes": 11357, + "role": "upstream_license", + "reviewed_record": "pdbthink/v2-MANIFEST.json", + "source": { + "source": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "upstream_path": "LICENSE", + "byte_identical_to_input": true + } + }, + "LICENSES/ODC-BY-1.0.txt": { + "sha256": "11a6d83734845ad09d809667aa219857a5b985b28c258a2eebf5677668a6bd3b", + "bytes": 19977, + "role": "upstream_license", + "reviewed_record": "pdbthink/v2-MANIFEST.json", + "source": { + "source": "Open Data Commons", + "revision": "1.0", + "upstream_path": "https://opendatacommons.org/licenses/by/1-0/", + "byte_identical_to_input": true + } + }, + "LICENSES/MIT-adapters.txt": { + "sha256": "c9d5f2c24789a4ee7502fd1426c6a2090ba766b24f20d0ef663d3b149b7466d3", + "bytes": 1083, + "role": "adapter_license", + "reviewed_record": "pdbthink/v2-MANIFEST.json", + "source": { + "source": "existing project license", + "revision": null, + "upstream_path": "LICENSE", + "byte_identical_to_input": true + } + }, + "components/tmax/DEPENDENCIES.json": { + "sha256": "58d031f7955f7f774733189b8297a1db7f515bb206c26ac50fad68f580848974", + "bytes": 166362, + "role": "installed_dependency_inventory", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "kind": "installed_metadata_from_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + } + }, + "components/tmax/LICENSE_SCOPE.json": { + "sha256": "9ae187d852f4cd6974fc9c65fba942df4e5586d73ddb3c48916a09376a3d36ac", + "bytes": 1360, + "role": "license_and_attribution", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only" + }, + "components/tmax/NOTICE.txt": { + "sha256": "f30eb64313c2645348ca3d965c40c9a466eb3754f3302206e44133d19bc87d6a", + "bytes": 2235, + "role": "license_and_attribution", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only" + }, + "components/tmax/SOURCE.json": { + "sha256": "8228f41f6ed3488d787e85f78ec8d9358ff8d5d515c6ec537ab0eb06537048d1", + "bytes": 3663, + "role": "source_provenance_metadata", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "source_package_only", + "parent_sha256": "b30acbb376179ac85aad2c1596558302d09e0f2674e866e39e956bb416ece6ed" + }, + "components/tmax/TASKS.json": { + "sha256": "9296f353c436adf1f5019adb05854fec1bb4601f8201a3f5763bf3b4116399e5", + "bytes": 18908, + "role": "source_provenance_metadata", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "source_package_only", + "parent_sha256": "aaa14217aea9d309bdde28c4ae292be6eedf7700fd392f18775101d35e218ffb" + }, + "components/tmax/config.json": { + "sha256": "9ffea3f8661105381b8db21a63e9d641b4a2f2c6a3cae9c4de963a51d8d5d8d8", + "bytes": 9224, + "role": "local_runtime_configuration", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + } + }, + "components/tmax/licenses/ODC-BY-1.0.txt": { + "sha256": "11a6d83734845ad09d809667aa219857a5b985b28c258a2eebf5677668a6bd3b", + "bytes": 19977, + "role": "license_and_attribution", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "kind": "license_text", + "license_id": "ODC-BY-1.0" + } + }, + "components/tmax/licenses/TMAX_DATASET_README.md": { + "sha256": "0e66e8816b8f2b4a17d37ec7abc5b8ca5708bae9d71d2c5323d8666d7e7ffa1d", + "bytes": 1830, + "role": "license_and_attribution", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "allenai/TMax-15K", + "revision": "e3ded940596cc611c9815684ba51a7e8ee0cffc9", + "path": "README.md", + "kind": "exact_saved_dataset_readme", + "sha256": "0e66e8816b8f2b4a17d37ec7abc5b8ca5708bae9d71d2c5323d8666d7e7ffa1d" + } + }, + "components/tmax/requirements.lock": { + "sha256": "836618cb7e01e236878d367272157e4be6a31d538bf8b9f8cc9ed630aac04482", + "bytes": 10667, + "role": "sdk_dependency_hash_lock", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "kind": "frozen_rootfs_file", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + } + }, + "components/tmax/runtime/common/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/tmax/runtime/common/contracts.py": { + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "2df4ab6636056806069216ee52576ac979255cb895b49b0c72c3686f3d9c5ae2" + }, + "components/tmax/runtime/common/http_routes.py": { + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "2876ad9a5d35eeb0e1ebb40346e5d230d8326ac8280ec260459798cf7a4eee18" + }, + "components/tmax/runtime/common/models.py": { + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "9fa259555127367477c21ca27f0ee6ac4a49e5f5744ecd91bf23a3ea1d0ab07d" + }, + "components/tmax/runtime/native_shell/__init__.py": { + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "components/tmax/runtime/native_shell/actor_launcher.py": { + "sha256": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "bytes": 5012, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "254abfeedc1d69cf228f923b5b43452d820c8ba5889fd8595e322e19efc7a896" + }, + "components/tmax/runtime/native_shell/backend.py": { + "sha256": "1a60616f3539f34ab141b3e58292369936844a5c3c4ceba3f58814e04f30b7fe", + "bytes": 13860, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "3f7d7c2c894427ebd8cf8e16e5c8007f44412b075a3abf381eb67b1174c67a67" + }, + "components/tmax/runtime/native_shell/environment.py": { + "sha256": "cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53", + "bytes": 1616, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "1c1ded0928c4757a87696f818cf9004a29e55f992495ffa0aacde9112dad7fea" + }, + "components/tmax/runtime/native_shell/guard.py": { + "sha256": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "bytes": 13254, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "8b24c249acc86d5d4fad2b495072c7927b353471b18bd4fd881ae7deef206d02" + }, + "components/tmax/runtime/native_shell/launch_service.py": { + "sha256": "db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b", + "bytes": 2383, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "c698c3b27e551f9986bf9e5aac9d337bf2e662058f5ba05d0882aaf2008ff98a" + }, + "components/tmax/runtime/native_shell/server.py": { + "sha256": "3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e", + "bytes": 640, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "e993b18fd0e871ee97700a725d2d57722428209c34e6caf0fd86479ca6b7a374" + }, + "components/tmax/runtime/native_shell/verifier_launcher.py": { + "sha256": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "bytes": 962, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "aa03260a2bcc91c9e23fd32dda0d75d1979ee7f4f64e87ea635f6bcd6048b075" + }, + "components/tmax/runtime/native_shell/wire_client.py": { + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "local_runtime_adapter", + "reviewed_record": "presentation-cleanup-20261011", + "component_scope": "frozen_image_application", + "source": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "8b05bffad6831c34e38e26926aa121845dc7e4150a6620ef1df690191a84e0d1" + }, + "components/tmax/tasks/task_000056_f726766b/source/external/app/vibration_data.wav": { + "sha256": "eab8396a1b533f70468039f8ac1b5fe9927faf4ded578172ec932ef7bf2af22a", + "bytes": 40058, + "role": "original_materialized_immutable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000056_f726766b/environment/post_install.sh", + "generator_sha256": "70d52288d5c9a7d23bbd63fb086a7f886961a1335632cc6efb892572d197563b", + "container_path": "/app/vibration_data.wav", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_000056_f726766b/source/instruction.md": { + "sha256": "714f780883970365cfffe408e2c76e75f499005f87551fc84b55d79368e77197", + "bytes": 1851, + "role": "original_instruction", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/instruction.md", + "upstream_sha256": "714f780883970365cfffe408e2c76e75f499005f87551fc84b55d79368e77197", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000056_f726766b/source/task.toml": { + "sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "bytes": 981, + "role": "runtime_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/task.toml", + "upstream_sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000056_f726766b/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000056_f726766b/source/tests/test_final_state.py": { + "sha256": "327c5346a779a44e27ef0cbd9f107e863d599fc6e47f95f248eaec03c15117c4", + "bytes": 2866, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/tests/test_final_state.py", + "upstream_sha256": "327c5346a779a44e27ef0cbd9f107e863d599fc6e47f95f248eaec03c15117c4", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/find_threshold.sh": { + "sha256": "a6c4cf2043d8642babb9b546096b3f559a375b59d54a43efebd57e9728466184", + "bytes": 720, + "role": "original_materialized_editable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "generator_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "container_path": "/home/user/pipeline/find_threshold.sh", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/process.sh": { + "sha256": "4631f1f805e6b826a796502ed5d94e676b3061cf448f2f9225116395aa3bb13b", + "bytes": 500, + "role": "original_materialized_editable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "generator_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "container_path": "/home/user/pipeline/process.sh", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_000260_7b7cc286/pristine/pipeline/serialize.sh": { + "sha256": "f3ae2df41978712dbffe58665a9582e3d0951f211c5cca5ece9f536225d28ba8", + "bytes": 303, + "role": "original_materialized_editable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "generator_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "container_path": "/home/user/pipeline/serialize.sh", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_000260_7b7cc286/source/external/app/video.mp4": { + "sha256": "3c04251fe92c30d29ac4d887608f4385176e3bda932594437f82b08a5b348938", + "bytes": 7671, + "role": "original_materialized_immutable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "generator_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "container_path": "/app/video.mp4", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_000260_7b7cc286/source/instruction.md": { + "sha256": "79c9fd4e4d41524db109d90b0415a4f0a2b9d24bf690fa8d7340ce3cb5ce0975", + "bytes": 2015, + "role": "original_instruction", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/instruction.md", + "upstream_sha256": "79c9fd4e4d41524db109d90b0415a4f0a2b9d24bf690fa8d7340ce3cb5ce0975", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000260_7b7cc286/source/task.toml": { + "sha256": "d36c49060b4ddbca3b13a5aa98cf5b195c07bff725b91107f58a087ec4325423", + "bytes": 961, + "role": "runtime_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "adapted_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/task.toml", + "upstream_sha256": "483c9171d3e67bec029d9b88cee24d554fa9310a61ec47940312be5f2951bc30", + "byte_equal": false, + "change": "Existing offline network setting and appended terminal newline; original task.toml retained under upstream/." + } + }, + "components/tmax/tasks/task_000260_7b7cc286/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000260_7b7cc286/source/tests/test_final_state.py": { + "sha256": "aae204101d5c024a0b5cbda42fa686e7d2928fd9be3ad55fd14314b2502182a5", + "bytes": 2007, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/tests/test_final_state.py", + "upstream_sha256": "aae204101d5c024a0b5cbda42fa686e7d2928fd9be3ad55fd14314b2502182a5", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000663_dff2c340/pristine/backup_catalog.db": { + "sha256": "170911a153d00eb0f037ca56a2cbd10d4aa2b7a418e25a0f1df58b1c77589788", + "bytes": 12288, + "role": "original_materialized_immutable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000663_dff2c340/environment/post_install.sh", + "generator_sha256": "a449c18295cee8a3e7ed0c958fe219cbed2d2a8e7fdad924f2679444b3377b94", + "container_path": "/home/user/backup_catalog.db", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_000663_dff2c340/source/instruction.md": { + "sha256": "feae25374139b4b1d8ec9759d553c591841d9330a071217f46a2e464bd32bbd7", + "bytes": 1841, + "role": "original_instruction", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/instruction.md", + "upstream_sha256": "feae25374139b4b1d8ec9759d553c591841d9330a071217f46a2e464bd32bbd7", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000663_dff2c340/source/task.toml": { + "sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "bytes": 852, + "role": "runtime_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/task.toml", + "upstream_sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000663_dff2c340/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + "components/tmax/tasks/task_000663_dff2c340/source/tests/test_final_state.py": { + "sha256": "7a273b9bf8bc61eeec1b8dda674b5f6ba5356abbfd923b413b09d2584c1ef72f", + "bytes": 3341, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/tests/test_final_state.py", + "upstream_sha256": "7a273b9bf8bc61eeec1b8dda674b5f6ba5356abbfd923b413b09d2584c1ef72f", + "byte_equal": true + } + }, + "components/tmax/tasks/task_005684_3c8594a3/pristine/compliance_audit.db": { + "sha256": "9fe1c89ee823f133d35dea66840ecb7f87d599487524b7aa1d6371e8f664058e", + "bytes": 20480, + "role": "original_materialized_immutable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_005684_3c8594a3/environment/post_install.sh", + "generator_sha256": "b431517fec535c62b42b517f9212cbb1e9cf80bdf883a55c02bfba08f0d4c404", + "container_path": "/home/user/compliance_audit.db", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_005684_3c8594a3/source/instruction.md": { + "sha256": "f4eee4e0643fcfb7399df10e1947ec9dbda28c74bacf307167f443506268f583", + "bytes": 1801, + "role": "original_instruction", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/instruction.md", + "upstream_sha256": "f4eee4e0643fcfb7399df10e1947ec9dbda28c74bacf307167f443506268f583", + "byte_equal": true + } + }, + "components/tmax/tasks/task_005684_3c8594a3/source/task.toml": { + "sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "bytes": 850, + "role": "runtime_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/task.toml", + "upstream_sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "byte_equal": true + } + }, + "components/tmax/tasks/task_005684_3c8594a3/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + "components/tmax/tasks/task_005684_3c8594a3/source/tests/test_final_state.py": { + "sha256": "495630c7ede4e75ef5644c1ee5b69f04969a4059ef094787c19a3014734d3cf2", + "bytes": 4306, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/tests/test_final_state.py", + "upstream_sha256": "495630c7ede4e75ef5644c1ee5b69f04969a4059ef094787c19a3014734d3cf2", + "byte_equal": true + } + }, + "components/tmax/tasks/task_008667_2151f271/pristine/data/financial.db": { + "sha256": "d6b5039ee32f3a43069245984c8fe5a9689028a9aac06e26a64017c54bd11976", + "bytes": 20480, + "role": "original_materialized_immutable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_008667_2151f271/environment/post_install.sh", + "generator_sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841", + "container_path": "/home/user/data/financial.db", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_008667_2151f271/pristine/data/transactions.jsonl": { + "sha256": "629b28471809f802c58831d100315b83012c0066df3b265a2d379a19e61a2262", + "bytes": 937, + "role": "original_materialized_immutable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_008667_2151f271/environment/post_install.sh", + "generator_sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841", + "container_path": "/home/user/data/transactions.jsonl", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_008667_2151f271/source/instruction.md": { + "sha256": "50d1d10121dfa3b565842fd10f2589ceb91b4459126787af7793cec9cc0d06b1", + "bytes": 2436, + "role": "original_instruction", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/instruction.md", + "upstream_sha256": "50d1d10121dfa3b565842fd10f2589ceb91b4459126787af7793cec9cc0d06b1", + "byte_equal": true + } + }, + "components/tmax/tasks/task_008667_2151f271/source/task.toml": { + "sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "bytes": 967, + "role": "runtime_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/task.toml", + "upstream_sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "byte_equal": true + } + }, + "components/tmax/tasks/task_008667_2151f271/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + "components/tmax/tasks/task_008667_2151f271/source/tests/test_final_state.py": { + "sha256": "cb73fd0ab1765768ebfecc50054ba13c143cc51be201127515eb495904ddf9e6", + "bytes": 3674, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/tests/test_final_state.py", + "upstream_sha256": "cb73fd0ab1765768ebfecc50054ba13c143cc51be201127515eb495904ddf9e6", + "byte_equal": true + } + }, + "components/tmax/tasks/task_008998_ae4cbe72/pristine/robot_dump.log.gz": { + "sha256": "909d2e964c0831d8af91b722b4424ed829c261d6b7db1a95180d8a809527ddaf", + "bytes": 261, + "role": "original_materialized_immutable_input", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_008998_ae4cbe72/environment/post_install.sh", + "generator_sha256": "26dfa63d063430c2370144b8e30c1f905dde4e2722403c1e8131a5a84e2d5e69", + "container_path": "/home/user/robot_dump.log.gz", + "direct_archive_member": false + } + }, + "components/tmax/tasks/task_008998_ae4cbe72/source/instruction.md": { + "sha256": "f81f86b07681931baabdba313cc4e988c01bff7a1f1d83349dfa939cdaa20669", + "bytes": 1919, + "role": "original_instruction", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/instruction.md", + "upstream_sha256": "f81f86b07681931baabdba313cc4e988c01bff7a1f1d83349dfa939cdaa20669", + "byte_equal": true + } + }, + "components/tmax/tasks/task_008998_ae4cbe72/source/task.toml": { + "sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "bytes": 823, + "role": "runtime_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/task.toml", + "upstream_sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "byte_equal": true + } + }, + "components/tmax/tasks/task_008998_ae4cbe72/source/tests/test.sh": { + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + "components/tmax/tasks/task_008998_ae4cbe72/source/tests/test_final_state.py": { + "sha256": "e03b84ca0519367e5f86b7b3a3231afa5209b1971431497699200099035f5014", + "bytes": 2893, + "role": "original_checker", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "frozen_image_application", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/tests/test_final_state.py", + "upstream_sha256": "e03b84ca0519367e5f86b7b3a3231afa5209b1971431497699200099035f5014", + "byte_equal": true + } + }, + "components/tmax/upstream/task_000056_f726766b/environment/Dockerfile": { + "sha256": "c44d259c4421b16dc5f0bc3912cdd800f6c25746ea31bede5060c9605b225025", + "bytes": 521, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/Dockerfile", + "byte_equal": true, + "upstream_sha256": "c44d259c4421b16dc5f0bc3912cdd800f6c25746ea31bede5060c9605b225025", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.label.txt": { + "sha256": "fc9e91cc78e1817d80b4ba8c2dc9a638d0c57959825ee34f5e3d7688ad80dfb9", + "bytes": 3, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.label.txt", + "byte_equal": true, + "upstream_sha256": "fc9e91cc78e1817d80b4ba8c2dc9a638d0c57959825ee34f5e3d7688ad80dfb9", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.wav": { + "sha256": "f55a8eec263c9be975b2adccdda6a07c680109b851a89f55779f14076aaa30d5", + "bytes": 16044, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.wav", + "byte_equal": true, + "upstream_sha256": "f55a8eec263c9be975b2adccdda6a07c680109b851a89f55779f14076aaa30d5", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000056_f726766b/environment/base_install.sh": { + "sha256": "0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637", + "bytes": 2849, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/base_install.sh", + "byte_equal": true, + "upstream_sha256": "0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000056_f726766b/environment/post_install.sh": { + "sha256": "70d52288d5c9a7d23bbd63fb086a7f886961a1335632cc6efb892572d197563b", + "bytes": 940, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/post_install.sh", + "byte_equal": true, + "upstream_sha256": "70d52288d5c9a7d23bbd63fb086a7f886961a1335632cc6efb892572d197563b", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000056_f726766b/task.toml": { + "sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "bytes": 981, + "role": "upstream_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/task.toml", + "byte_equal": true, + "upstream_sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/Dockerfile": { + "sha256": "98f66d958e8ee701c0579095c2e65254a63194845b894a45db2a6180a46a3193", + "bytes": 521, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/Dockerfile", + "byte_equal": true, + "upstream_sha256": "98f66d958e8ee701c0579095c2e65254a63194845b894a45db2a6180a46a3193", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.label.txt": { + "sha256": "4a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd5", + "bytes": 2, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.label.txt", + "byte_equal": true, + "upstream_sha256": "4a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd5", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.mp4": { + "sha256": "bf759113108b136ec3b5fa507d035c1e66ac243b52da09fa07ab58566ee27f58", + "bytes": 3342, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.mp4", + "byte_equal": true, + "upstream_sha256": "bf759113108b136ec3b5fa507d035c1e66ac243b52da09fa07ab58566ee27f58", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/base_install.sh": { + "sha256": "0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637", + "bytes": 2849, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/base_install.sh", + "byte_equal": true, + "upstream_sha256": "0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000260_7b7cc286/environment/post_install.sh": { + "sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "bytes": 2093, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "byte_equal": true, + "upstream_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000260_7b7cc286/task.toml": { + "sha256": "483c9171d3e67bec029d9b88cee24d554fa9310a61ec47940312be5f2951bc30", + "bytes": 954, + "role": "upstream_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/task.toml", + "byte_equal": true, + "upstream_sha256": "483c9171d3e67bec029d9b88cee24d554fa9310a61ec47940312be5f2951bc30", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000663_dff2c340/environment/Dockerfile": { + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/environment/Dockerfile", + "byte_equal": true, + "upstream_sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000663_dff2c340/environment/post_install.sh": { + "sha256": "a449c18295cee8a3e7ed0c958fe219cbed2d2a8e7fdad924f2679444b3377b94", + "bytes": 1661, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/environment/post_install.sh", + "byte_equal": true, + "upstream_sha256": "a449c18295cee8a3e7ed0c958fe219cbed2d2a8e7fdad924f2679444b3377b94", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_000663_dff2c340/task.toml": { + "sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "bytes": 852, + "role": "upstream_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/task.toml", + "byte_equal": true, + "upstream_sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_005684_3c8594a3/environment/Dockerfile": { + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/environment/Dockerfile", + "byte_equal": true, + "upstream_sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_005684_3c8594a3/environment/post_install.sh": { + "sha256": "b431517fec535c62b42b517f9212cbb1e9cf80bdf883a55c02bfba08f0d4c404", + "bytes": 2072, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/environment/post_install.sh", + "byte_equal": true, + "upstream_sha256": "b431517fec535c62b42b517f9212cbb1e9cf80bdf883a55c02bfba08f0d4c404", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_005684_3c8594a3/task.toml": { + "sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "bytes": 850, + "role": "upstream_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/task.toml", + "byte_equal": true, + "upstream_sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_008667_2151f271/environment/Dockerfile": { + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/environment/Dockerfile", + "byte_equal": true, + "upstream_sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_008667_2151f271/environment/post_install.sh": { + "sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841", + "bytes": 2459, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/environment/post_install.sh", + "byte_equal": true, + "upstream_sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_008667_2151f271/task.toml": { + "sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "bytes": 967, + "role": "upstream_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/task.toml", + "byte_equal": true, + "upstream_sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_008998_ae4cbe72/environment/Dockerfile": { + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/environment/Dockerfile", + "byte_equal": true, + "upstream_sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_008998_ae4cbe72/environment/post_install.sh": { + "sha256": "26dfa63d063430c2370144b8e30c1f905dde4e2722403c1e8131a5a84e2d5e69", + "bytes": 723, + "role": "upstream_environment_reference", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/environment/post_install.sh", + "byte_equal": true, + "upstream_sha256": "26dfa63d063430c2370144b8e30c1f905dde4e2722403c1e8131a5a84e2d5e69", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/upstream/task_008998_ae4cbe72/task.toml": { + "sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "bytes": 823, + "role": "upstream_task_metadata", + "reviewed_record": "tmax/FILE_ALLOWLIST.json", + "component_scope": "source_package_only", + "source": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/task.toml", + "byte_equal": true, + "upstream_sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "hash_record_note": "Copied from reviewed allowlist file entry, whose exact_archive_member/byte_equal provenance applies to this same SHA-256." + } + }, + "components/tmax/FILE_ALLOWLIST.json": { + "sha256": "a29f4e2ba9e60f543f7f0ff90c16bc7515fd2175ea7abaacff73f0bd7f7e91e4", + "bytes": 60752, + "role": "review_record_snapshot", + "reviewed_record": "presentation-cleanup-20261011", + "parent_sha256": "eb812e240c1ed5d50c28efdcc4b172ade8574571e4fc0cbb01837b6e0bdf13cf" + } + }, + "instruction_fields": { + "components/awm/private/tasks/awm-accounting-1-invoice/SOURCE.json#/task": { + "sha256": "a08b48d978d8a70cfea5c6e871d079622fc99ac8438fb38d6d6816bdfa399c99", + "source_record": "gen_tasks.jsonl#scenario=accounting_1;tasks[1]", + "repository": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "encoding": "UTF-8 of decoded JSON string, without an added newline", + "reviewed_record": "awm/ALLOWLIST.json" + }, + "components/awm/private/tasks/awm-manufacturing-1-schedule/SOURCE.json#/task": { + "sha256": "95404884accb6e78e1a8421cf62b7a6379955bf931dd35ccd71900d01f5180e4", + "source_record": "gen_tasks.jsonl#scenario=manufacturing_execution_system_1;tasks[5]", + "repository": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "encoding": "UTF-8 of decoded JSON string, without an added newline", + "reviewed_record": "awm/ALLOWLIST.json" + } + }, + "selected_task_ids": [ + "candidate-1005-software-systems", + "task_008667_2151f271", + "construct-mc-ramsey-l4-s0", + "awm-accounting-1-invoice", + "task_000260_7b7cc286", + "pdbthink-s09-70c0778d985e571dde37", + "task_000663_dff2c340", + "candidate-1001-security-forensics", + "task_000056_f726766b", + "construct-mc-social-golfers-l4-s0", + "pdbthink-s09-7ba4aa076b6bb5633953", + "task_005684_3c8594a3", + "construct-mc-costas-array-l3-s0", + "task_008998_ae4cbe72", + "pdbthink-s09-772d9c283d4255fc0a11" + ], + "schema_sha256": "10993deaaa8553929fa0b3b6bf3c1ad100baaaf9ff10ae8ed139a8ec4279a3c4", + "runtime_registries": { + "mimo-code": { + "path": "components/mimo-code/source_bundle/config.json", + "tasks_pointer": "/tasks", + "id_field": "id", + "instruction_sha256_pointer": "/source_sha256/instruction.md" + }, + "awm": { + "path": "components/awm/config.json", + "tasks_pointer": "/tasks", + "id_field": "task_id" + }, + "math": { + "path": "components/math/config.json", + "tasks_pointer": "/tasks", + "id_field": "id", + "instruction_sha256_pointer": "/source_sha256/instruction.md" + }, + "pdbthink": { + "path": "components/pdbthink/config.json", + "tasks_pointer": "/tasks", + "id_field": "task_id", + "instruction_sha256_pointer": "/original_instruction_sha256" + }, + "tmax": { + "path": "components/tmax/config.json", + "tasks_pointer": "/tasks", + "id_field": "id", + "instruction_sha256_pointer": "/source_sha256/instruction.md" + } + }, + "required_directories": [ + { + "path": "components/tmax/tasks/task_000056_f726766b/pristine", + "role": "frozen_pristine_workspace_root", + "empty": true, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000056_f726766b/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000260_7b7cc286/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000260_7b7cc286/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000663_dff2c340/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_000663_dff2c340/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_005684_3c8594a3/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_005684_3c8594a3/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_008667_2151f271/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_008667_2151f271/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_008998_ae4cbe72/pristine", + "role": "frozen_pristine_workspace_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + }, + { + "path": "components/tmax/tasks/task_008998_ae4cbe72/source", + "role": "frozen_task_source_root", + "empty": false, + "reviewed_record": "tmax/FILE_ALLOWLIST.json" + } + ] +} diff --git a/components/awm/ADAPTATIONS.txt b/components/awm/ADAPTATIONS.txt new file mode 100644 index 0000000000000000000000000000000000000000..669d0690264d3deb4c5e31aa49278b9b4d3cfa64 --- /dev/null +++ b/components/awm/ADAPTATIONS.txt @@ -0,0 +1,3 @@ +Interface: call and finish using the original FastApiMCP business tools. +Reset copies the original seed database; finish runs the original state checker. +Each episode has a 600-second limit. FastApiMCP 0.4.0 and the OpenEnv SDK use separate Python environments. Dependency versions are recorded in the two requirements.lock files. diff --git a/components/awm/Dockerfile b/components/awm/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..79fd058658a48f5839157acab28d1c41ca7ca0a4 --- /dev/null +++ b/components/awm/Dockerfile @@ -0,0 +1,18 @@ +FROM python:3.12-slim-bookworm@sha256:392307d22300de8b5986851a12d9176dfc0fc073e65bf6523ebd7dcbeb23564e +USER root +COPY wheels /tmp/sdk-wheels +COPY requirements.lock /opt/awm/requirements.lock +RUN python -m pip install --no-cache-dir --no-index --find-links=/tmp/sdk-wheels --require-hashes -r /opt/awm/requirements.lock && python -m pip check && rm -rf /tmp/sdk-wheels +COPY awm_wheels /tmp/awm-wheels +COPY awm-requirements.lock /opt/awm/awm-requirements.lock +RUN python -m venv /opt/awm-venv && /opt/awm-venv/bin/python -m pip install --no-cache-dir --no-index --find-links=/tmp/awm-wheels --require-hashes -r /opt/awm/awm-requirements.lock && /opt/awm-venv/bin/python -m pip check && rm -rf /tmp/awm-wheels +COPY runtime /opt/awm/runtime +COPY private /opt/awm/private +COPY config.json /opt/awm/config.json +COPY NOTICE SOURCE_CREDITS.json /opt/awm/ +RUN chmod -R go-rwx /opt/awm && mkdir -p /var/lib/awm && chmod 700 /var/lib/awm +ENV PYTHONPATH=/opt/awm/runtime PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 ENABLE_WEB_INTERFACE=false OPENENV_MODE=simulation GRADIO_ANALYTICS_ENABLED=false HF_HUB_OFFLINE=1 +WORKDIR /opt/awm +EXPOSE 8000 +HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3).read()"] +CMD ["python", "-m", "awm.server"] diff --git a/components/awm/LICENSE_SCOPE.json b/components/awm/LICENSE_SCOPE.json new file mode 100644 index 0000000000000000000000000000000000000000..1fda4aca153866bc9f4e15bcbde51796f619c4cd --- /dev/null +++ b/components/awm/LICENSE_SCOPE.json @@ -0,0 +1,22 @@ +{ + "component": "awm", + "upstream": { + "scope": "Original AWM request text, generated API source, schema/sample rows and pure-code verifiers", + "license": "CC-BY-4.0", + "notice": "NOTICE", + "source_credit": "SOURCE_CREDITS.json", + "materialized_seed": "Frozen database generated from the original schema/sample SQL; not an upstream binary file." + }, + "adapter": { + "scope": "Local transport/packaging adaptations in awm/runtime and configuration metadata", + "note": "Local adaptation; not attributed as upstream AWM source." + }, + "dependencies": { + "scope": "Installed third-party libraries and official OpenEnv SDK", + "note": "Keep respective installed package licenses; these are not relicensed under dataset licenses. Dependency names, versions and wheel hashes are in lock files.", + "lock_files": [ + "requirements.lock", + "awm-requirements.lock" + ] + } +} diff --git a/components/awm/NOTICE b/components/awm/NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..6618914d434420f2049f143024e4e2de3d30b242 --- /dev/null +++ b/components/awm/NOTICE @@ -0,0 +1,6 @@ +This image adapts two unchanged original train tasks from AgentWorldModel-1K. +Authors: Zhaoyang Wang, Canwen Xu, Boyi Liu, Yite Wang, Siwei Han, Zhewei Yao, Huaxiu Yao, Yuxiong He. +Dataset: https://huggingface.co/datasets/Snowflake/AgentWorldModel-1K/tree/dde80a0283fe781bdc51656bce57063dc5650213 +License: Creative Commons Attribution 4.0 International (CC BY 4.0). +License terms: https://creativecommons.org/licenses/by/4.0/ +Changes: shared OpenEnv transport, fixed task selection, isolated per-episode database, original FastApiMCP 0.4.0 worker environment. Original task requests, API source, seed data and pure-code graders are unchanged. diff --git a/components/awm/SOURCE_CREDITS.json b/components/awm/SOURCE_CREDITS.json new file mode 100644 index 0000000000000000000000000000000000000000..0cc1c0e22c40e8d24f704b37682c7a999835161f --- /dev/null +++ b/components/awm/SOURCE_CREDITS.json @@ -0,0 +1,9 @@ +{ + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "url": "https://huggingface.co/datasets/Snowflake/AgentWorldModel-1K/tree/dde80a0283fe781bdc51656bce57063dc5650213", + "license": "CC-BY-4.0", + "authors": "Zhaoyang Wang, Canwen Xu, Boyi Liu, Yite Wang, Siwei Han, Zhewei Yao, Huaxiu Yao, Yuxiong He", + "paper": "https://arxiv.org/abs/2602.10090", + "code": "https://github.com/Snowflake-Labs/agent-world-model" +} diff --git a/components/awm/TASKS.json b/components/awm/TASKS.json new file mode 100644 index 0000000000000000000000000000000000000000..3f21d2f97dec1c030643bb972b6080bea91177cc --- /dev/null +++ b/components/awm/TASKS.json @@ -0,0 +1,72 @@ +[ + { + "task_id": "awm-accounting-1-invoice", + "source_repo": "Snowflake/AgentWorldModel-1K", + "source_revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "source_record": "gen_tasks.jsonl#scenario=accounting_1;tasks[1]", + "source_instruction_sha256": "a08b48d978d8a70cfea5c6e871d079622fc99ac8438fb38d6d6816bdfa399c99", + "original_limits": null, + "original_limits_note": "No numeric episode/CPU/memory limits were found in the selected AWM dataset rows; do not infer defaults.", + "adapter_limits": { + "episode_seconds": 600, + "cpus": 1, + "memory_mb": 2048, + "max_context_length": 32768, + "max_completion_tokens": 32768 + }, + "interface": { + "schema_sha256": "10993deaaa8553929fa0b3b6bf3c1ad100baaaf9ff10ae8ed139a8ec4279a3c4", + "ops": [ + "call", + "finish" + ], + "business_tools": "Unchanged original FastApiMCP 0.4.0 operation names and argument schemas", + "shell": false, + "reset": "Fixed task_id, fresh original seed copy, no random task substitution", + "reward": "0 or 1 from original pure-code state verifier at finish; terminal immutable" + }, + "tool_count": 27, + "original_files_sha256": { + "original_api.py": "57362b907a2d454bbd29b95dfebb7d84207ce9d7e22533eaf54853ee4fb84990", + "original_verifier.py": "3cd0d63022caa900e32bda0b0d3ae5c9948ce3c195b77ba1906c7ddebea9c58b", + "initial.db": "8ad2959536e44caba47bcbeca9018e47e7157783194d19b429aa8f22a60f4771", + "SOURCE.json": "3a1cc59eece46232d3ebb39df3cbfedd0625ab85bcf5e1d6cb090ea6ecec0e58" + }, + "license": "CC-BY-4.0" + }, + { + "task_id": "awm-manufacturing-1-schedule", + "source_repo": "Snowflake/AgentWorldModel-1K", + "source_revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "source_record": "gen_tasks.jsonl#scenario=manufacturing_execution_system_1;tasks[5]", + "source_instruction_sha256": "95404884accb6e78e1a8421cf62b7a6379955bf931dd35ccd71900d01f5180e4", + "original_limits": null, + "original_limits_note": "No numeric episode/CPU/memory limits were found in the selected AWM dataset rows; do not infer defaults.", + "adapter_limits": { + "episode_seconds": 600, + "cpus": 1, + "memory_mb": 2048, + "max_context_length": 32768, + "max_completion_tokens": 32768 + }, + "interface": { + "schema_sha256": "10993deaaa8553929fa0b3b6bf3c1ad100baaaf9ff10ae8ed139a8ec4279a3c4", + "ops": [ + "call", + "finish" + ], + "business_tools": "Unchanged original FastApiMCP 0.4.0 operation names and argument schemas", + "shell": false, + "reset": "Fixed task_id, fresh original seed copy, no random task substitution", + "reward": "0 or 1 from original pure-code state verifier at finish; terminal immutable" + }, + "tool_count": 50, + "original_files_sha256": { + "original_api.py": "ff94326bc0d2a826a2a211512a617f0b9f5d91866b9c77ea17f6502f77b75aa6", + "original_verifier.py": "f0cd8fa0f1a17e76f8e87cfbe59a81645a750999f747be36b8d25d9244e5b8f1", + "initial.db": "9a523ebee8c25ca61aa43075c6263e5d3b310d39157ebddabea4cb754e610a1c", + "SOURCE.json": "93eda02b7f5e0bd7aca37a2becc3fd20925472a8f33143171e4cc250564ff7b3" + }, + "license": "CC-BY-4.0" + } +] diff --git a/components/awm/awm-requirements.lock b/components/awm/awm-requirements.lock new file mode 100644 index 0000000000000000000000000000000000000000..5468ff83c6db5b83f04c1272dfdd8045e5940e30 --- /dev/null +++ b/components/awm/awm-requirements.lock @@ -0,0 +1,44 @@ +annotated-doc==0.0.5 --hash=sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101 +annotated-types==0.8.0 --hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0 +anyio==4.15.1 --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 +attrs==26.1.0 --hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 +certifi==2026.7.22 --hash=sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 +cffi==2.1.1 --hash=sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf +charset-normalizer==3.5.2 --hash=sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649 +click==8.5.0 --hash=sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360 +cryptography==50.0.2 --hash=sha256:630ebfea3bf689d075f82316324ff7433dc447fe6bc1bfc76524b74b4a9567d2 +fastapi==0.115.12 --hash=sha256:e94613d6c05e27be7ffebdd6ea5f388112e5e430c8f7d6494a9d1d88d43e814d +fastapi-mcp==0.4.0 --hash=sha256:d4a3fe7966af24d44e4b412720561c95eb12bed999a4443a88221834b3b15aec +greenlet==3.2.5 --hash=sha256:45fcea7b697b91290b36eafc12fff479aca6ba6500d98ef6f34d5634c7119cbe +h11==0.16.0 --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 +httpcore==1.0.9 --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 +httpx==0.28.1 --hash=sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad +httpx-sse==0.4.3 --hash=sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc +idna==3.20 --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c +jsonschema==4.26.0 --hash=sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce +jsonschema-specifications==2025.9.1 --hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe +markdown-it-py==4.2.0 --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a +mcp==1.26.0 --hash=sha256:904a21c33c25aa98ddbeb47273033c435e595bbacfdb177f4bd87f6dceebe1ca +mdurl==0.1.2 --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 +pycparser==3.11 --hash=sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80 +pydantic==2.12.5 --hash=sha256:e561593fccf61e8a20fc46dfc2dfe075b8be7d0188df33f221ad1f0139180f9d +pydantic_core==2.41.5 --hash=sha256:eceb81a8d74f9267ef4081e246ffd6d129da5d87e37a77c9bde550cb04870c1c +pydantic-settings==2.15.0 --hash=sha256:0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42 +Pygments==2.21.0 --hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 +PyJWT==2.15.1 --hash=sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193 +python-dotenv==1.2.4 --hash=sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc +python-multipart==0.0.32 --hash=sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23 +referencing==0.37.0 --hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231 +requests==2.34.2 --hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 +rich==15.0.0 --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb +rpds-py==2026.9.1 --hash=sha256:addeda51556dac7c1a2f14cda62db8b621cd12afba3091d03a96c72932387eab +shellingham==1.5.4 --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 +SQLAlchemy==2.0.41 --hash=sha256:6145afea51ff0af7f2564a05fa95eb46f542919e6523729663a5d285ecb3cf5e +sse-starlette==3.0.3 --hash=sha256:af5bf5a6f3933df1d9c7f8539633dc8444ca6a97ab2e2a7cd3b6e431ac03a431 +starlette==0.46.2 --hash=sha256:595633ce89f8ffa71a015caed34a5b2dc1c0cdb3f0f1fbd1e69339cf2abeec35 +tomli==2.5.0 --hash=sha256:6cf74416bdc94ae458b14e37286c1073081850ac8459a00d0c5efef5d44294c6 +typer==0.27.3 --hash=sha256:e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff +typing_extensions==4.16.0 --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 +typing-inspection==0.4.4 --hash=sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147 +urllib3==2.8.0 --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 +uvicorn==0.54.0 --hash=sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf diff --git a/components/awm/config.json b/components/awm/config.json new file mode 100644 index 0000000000000000000000000000000000000000..602fec7e0936a0a70ad9d8d4ca8824768400442a --- /dev/null +++ b/components/awm/config.json @@ -0,0 +1,26 @@ +{ + "tasks": [ + { + "task_id": "awm-accounting-1-invoice", + "split": "train", + "original_sha256": { + "original_api.py": "57362b907a2d454bbd29b95dfebb7d84207ce9d7e22533eaf54853ee4fb84990", + "original_verifier.py": "3cd0d63022caa900e32bda0b0d3ae5c9948ce3c195b77ba1906c7ddebea9c58b", + "initial.db": "8ad2959536e44caba47bcbeca9018e47e7157783194d19b429aa8f22a60f4771", + "SOURCE.json": "3a1cc59eece46232d3ebb39df3cbfedd0625ab85bcf5e1d6cb090ea6ecec0e58" + }, + "timeout_seconds": 600 + }, + { + "task_id": "awm-manufacturing-1-schedule", + "split": "train", + "original_sha256": { + "original_api.py": "ff94326bc0d2a826a2a211512a617f0b9f5d91866b9c77ea17f6502f77b75aa6", + "original_verifier.py": "f0cd8fa0f1a17e76f8e87cfbe59a81645a750999f747be36b8d25d9244e5b8f1", + "initial.db": "9a523ebee8c25ca61aa43075c6263e5d3b310d39157ebddabea4cb754e610a1c", + "SOURCE.json": "93eda02b7f5e0bd7aca37a2becc3fd20925472a8f33143171e4cc250564ff7b3" + }, + "timeout_seconds": 600 + } + ] +} diff --git a/components/awm/private/tasks/awm-accounting-1-invoice/SOURCE.json b/components/awm/private/tasks/awm-accounting-1-invoice/SOURCE.json new file mode 100644 index 0000000000000000000000000000000000000000..427479f654af805d8b07096d2e36a59e5ca3a5b6 --- /dev/null +++ b/components/awm/private/tasks/awm-accounting-1-invoice/SOURCE.json @@ -0,0 +1,11 @@ +{ + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "scenario": "accounting_1", + "task_idx": 1, + "task": "Create an invoice for customer 'Acme Design Studio' dated 2025-01-05 with due_date 2025-02-04 containing two line_items ('Logo redesign' quantity 1 unit_price 1200 with no discount and 'Brand guideline document' quantity 1 unit_price 800 with a 10% discount), assign it to department 'Design', and mark its tax_category as 'Standard Sales Tax 8.5%'.", + "task_id": "awm-accounting-1-invoice", + "license": "CC-BY-4.0", + "split": "train", + "original_format": "FastAPI through FastApiMCP 0.4.0" +} diff --git a/components/awm/private/tasks/awm-accounting-1-invoice/initial.db b/components/awm/private/tasks/awm-accounting-1-invoice/initial.db new file mode 100644 index 0000000000000000000000000000000000000000..a72da2cfbb5d89f256ea864e1671fb383ec02d51 --- /dev/null +++ b/components/awm/private/tasks/awm-accounting-1-invoice/initial.db @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8ad2959536e44caba47bcbeca9018e47e7157783194d19b429aa8f22a60f4771 +size 331776 diff --git a/components/awm/private/tasks/awm-accounting-1-invoice/original_api.py b/components/awm/private/tasks/awm-accounting-1-invoice/original_api.py new file mode 100644 index 0000000000000000000000000000000000000000..19187d21c055fd8aebb6156490266776a14a7faa --- /dev/null +++ b/components/awm/private/tasks/awm-accounting-1-invoice/original_api.py @@ -0,0 +1,1767 @@ +from fastapi import FastAPI, Query, Path, Body +from pydantic import BaseModel, Field, ConfigDict +from typing import Optional, List, Dict +from datetime import datetime, date +import os +from sqlalchemy import ( + create_engine, + Column, + Integer, + String, + DateTime, + Date, + Float, + Text, + ForeignKey, + CheckConstraint, + Index, +) +from sqlalchemy.orm import declarative_base, relationship, sessionmaker + +database_url = os.getenv("DATABASE_PATH", "sqlite:///outputs/databases/zenledger_small_business_accounting_suite.db") +engine = create_engine(database_url, future=True) +SessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False, future=True) +Base = declarative_base() + +class User(Base): + __tablename__ = "users" + id = Column(Integer, primary_key=True) + username = Column(Text, unique=True, nullable=False) + email = Column(Text, unique=True, nullable=False) + full_name = Column(Text) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class Department(Base): + __tablename__ = "departments" + id = Column(Integer, primary_key=True) + name = Column(Text, unique=True, nullable=False) + description = Column(Text) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class TaxCategory(Base): + __tablename__ = "tax_categories" + id = Column(Integer, primary_key=True) + name = Column(Text, unique=True, nullable=False) + description = Column(Text) + rate = Column(Float, nullable=False) + is_compound = Column(Integer, nullable=False, default=0) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class PaymentTerm(Base): + __tablename__ = "payment_terms" + id = Column(Integer, primary_key=True) + name = Column(Text, unique=True, nullable=False) + days = Column(Integer, nullable=False) + description = Column(Text) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class Customer(Base): + __tablename__ = "customers" + id = Column(Integer, primary_key=True) + name = Column(Text, unique=True, nullable=False) + billing_email = Column(Text) + payment_terms_id = Column(Integer, ForeignKey("payment_terms.id")) + default_tax_category_id = Column(Integer, ForeignKey("tax_categories.id")) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class Account(Base): + __tablename__ = "accounts" + id = Column(Integer, primary_key=True) + name = Column(Text, unique=True, nullable=False) + code = Column(Text) + type = Column(Text, nullable=False) + sub_type = Column(Text) + is_active = Column(Integer, nullable=False, default=1) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class Vendor(Base): + __tablename__ = "vendors" + id = Column(Integer, primary_key=True) + name = Column(Text, unique=True, nullable=False) + contact_email = Column(Text) + payment_terms_id = Column(Integer, ForeignKey("payment_terms.id")) + default_expense_category_id = Column(Integer, ForeignKey("accounts.id")) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class BankAccount(Base): + __tablename__ = "bank_accounts" + id = Column(Integer, primary_key=True) + name = Column(Text, unique=True, nullable=False) + institution_name = Column(Text) + account_number_masked = Column(Text) + account_id = Column(Integer, ForeignKey("accounts.id"), nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class Invoice(Base): + __tablename__ = "invoices" + id = Column(Integer, primary_key=True) + invoice_number = Column(Text, unique=True, nullable=False) + customer_id = Column(Integer, ForeignKey("customers.id"), nullable=False) + department_id = Column(Integer, ForeignKey("departments.id")) + tax_category_id = Column(Integer, ForeignKey("tax_categories.id")) + invoice_date = Column(Date, nullable=False) + due_date = Column(Date, nullable=False) + currency = Column(Text, nullable=False, default="USD") + status = Column(Text, nullable=False) + subtotal = Column(Float, nullable=False, default=0.0) + tax_amount = Column(Float, nullable=False, default=0.0) + total = Column(Float, nullable=False, default=0.0) + balance_due = Column(Float, nullable=False, default=0.0) + payment_terms_id = Column(Integer, ForeignKey("payment_terms.id")) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class InvoiceLineItem(Base): + __tablename__ = "invoice_line_items" + id = Column(Integer, primary_key=True) + invoice_id = Column(Integer, ForeignKey("invoices.id", ondelete="CASCADE"), nullable=False) + description = Column(Text, nullable=False) + quantity = Column(Float, nullable=False) + unit_price = Column(Float, nullable=False) + discount_percent = Column(Float, nullable=False, default=0.0) + line_subtotal = Column(Float, nullable=False, default=0.0) + tax_amount = Column(Float, nullable=False, default=0.0) + total = Column(Float, nullable=False, default=0.0) + revenue_account_id = Column(Integer, ForeignKey("accounts.id")) + department_id = Column(Integer, ForeignKey("departments.id")) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class Payment(Base): + __tablename__ = "payments" + id = Column(Integer, primary_key=True) + customer_id = Column(Integer, ForeignKey("customers.id"), nullable=False) + payment_date = Column(Date, nullable=False) + settlement_date = Column(Date) + amount = Column(Float, nullable=False) + currency = Column(Text, nullable=False, default="USD") + method = Column(Text, nullable=False) + reference = Column(Text) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class PaymentApplication(Base): + __tablename__ = "payment_applications" + id = Column(Integer, primary_key=True) + payment_id = Column(Integer, ForeignKey("payments.id", ondelete="CASCADE"), nullable=False) + invoice_id = Column(Integer, ForeignKey("invoices.id", ondelete="CASCADE"), nullable=False) + amount = Column(Float, nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class Bill(Base): + __tablename__ = "bills" + id = Column(Integer, primary_key=True) + bill_number = Column(Text) + vendor_id = Column(Integer, ForeignKey("vendors.id"), nullable=False) + bill_date = Column(Date, nullable=False) + due_date = Column(Date) + currency = Column(Text, nullable=False, default="USD") + amount = Column(Float, nullable=False) + description = Column(Text) + department_id = Column(Integer, ForeignKey("departments.id")) + reimbursement_status = Column(Text, nullable=False) + payment_terms_id = Column(Integer, ForeignKey("payment_terms.id")) + status = Column(Text, nullable=False, default="open") + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class RecurringExpense(Base): + __tablename__ = "recurring_expenses" + id = Column(Integer, primary_key=True) + name = Column(Text, nullable=False) + vendor_id = Column(Integer, ForeignKey("vendors.id")) + amount = Column(Float, nullable=False) + expense_account_id = Column(Integer, ForeignKey("accounts.id"), nullable=False) + department_id = Column(Integer, ForeignKey("departments.id")) + frequency = Column(Text, nullable=False) + next_run_date = Column(Date, nullable=False) + end_date = Column(Date) + is_active = Column(Integer, nullable=False, default=1) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class BankTransaction(Base): + __tablename__ = "bank_transactions" + id = Column(Integer, primary_key=True) + bank_account_id = Column(Integer, ForeignKey("bank_accounts.id"), nullable=False) + transaction_date = Column(Date, nullable=False) + posted_date = Column(Date) + description = Column(Text, nullable=False) + amount = Column(Float, nullable=False) + external_id = Column(Text) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class JournalEntry(Base): + __tablename__ = "journal_entries" + id = Column(Integer, primary_key=True) + entry_date = Column(Date, nullable=False) + description = Column(Text) + department_id = Column(Integer, ForeignKey("departments.id")) + source = Column(Text) + source_id = Column(Integer) + created_by_user_id = Column(Integer, ForeignKey("users.id")) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class JournalEntryLine(Base): + __tablename__ = "journal_entry_lines" + id = Column(Integer, primary_key=True) + journal_entry_id = Column(Integer, ForeignKey("journal_entries.id", ondelete="CASCADE"), nullable=False) + account_id = Column(Integer, ForeignKey("accounts.id"), nullable=False) + department_id = Column(Integer, ForeignKey("departments.id")) + description = Column(Text) + debit = Column(Float, nullable=False, default=0.0) + credit = Column(Float, nullable=False, default=0.0) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class BankTransactionJournalLink(Base): + __tablename__ = "bank_transaction_journal_links" + id = Column(Integer, primary_key=True) + bank_transaction_id = Column(Integer, ForeignKey("bank_transactions.id", ondelete="CASCADE"), nullable=False) + journal_entry_id = Column(Integer, ForeignKey("journal_entries.id", ondelete="CASCADE"), nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + +class RecurringInvoice(Base): + __tablename__ = "recurring_invoices" + id = Column(Integer, primary_key=True) + customer_id = Column(Integer, ForeignKey("customers.id"), nullable=False) + name = Column(Text, nullable=False) + description = Column(Text) + quantity = Column(Float, nullable=False) + unit_price = Column(Float, nullable=False) + discount_percent = Column(Float, nullable=False, default=0.0) + frequency = Column(Text, nullable=False) + next_run_date = Column(Date, nullable=False) + end_date = Column(Date) + payment_terms_id = Column(Integer, ForeignKey("payment_terms.id")) + tax_category_id = Column(Integer, ForeignKey("tax_categories.id")) + department_id = Column(Integer, ForeignKey("departments.id")) + currency = Column(Text, nullable=False, default="USD") + is_active = Column(Integer, nullable=False, default=1) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +class AccountingPeriod(Base): + __tablename__ = "accounting_periods" + id = Column(Integer, primary_key=True) + start_date = Column(Date, nullable=False) + end_date = Column(Date, nullable=False) + close_date = Column(Date) + is_locked = Column(Integer, nullable=False, default=0) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime) + +Index("idx_users_email", User.email) +Index("idx_departments_name", Department.name, unique=True) +Index("idx_tax_categories_name", TaxCategory.name, unique=True) +Index("idx_payment_terms_name", PaymentTerm.name, unique=True) +Index("idx_customers_name", Customer.name, unique=True) +Index("idx_customers_payment_terms_id", Customer.payment_terms_id) +Index("idx_customers_tax_category_id", Customer.default_tax_category_id) +Index("idx_vendors_name", Vendor.name, unique=True) +Index("idx_vendors_payment_terms_id", Vendor.payment_terms_id) +Index("idx_vendors_expense_category_id", Vendor.default_expense_category_id) +Index("idx_accounts_name", Account.name, unique=True) +Index("idx_accounts_type", Account.type) +Index("idx_bank_accounts_name", BankAccount.name, unique=True) +Index("idx_bank_accounts_account_id", BankAccount.account_id) +Index("idx_invoices_invoice_number", Invoice.invoice_number, unique=True) +Index("idx_invoices_customer_id", Invoice.customer_id) +Index("idx_invoices_department_id", Invoice.department_id) +Index("idx_invoices_tax_category_id", Invoice.tax_category_id) +Index("idx_invoices_invoice_date", Invoice.invoice_date) +Index("idx_invoice_line_items_invoice_id", InvoiceLineItem.invoice_id) +Index("idx_invoice_line_items_department_id", InvoiceLineItem.department_id) +Index("idx_payments_customer_id", Payment.customer_id) +Index("idx_payments_payment_date", Payment.payment_date) +Index("idx_payment_applications_payment_id", PaymentApplication.payment_id) +Index("idx_payment_applications_invoice_id", PaymentApplication.invoice_id) +Index("idx_bills_vendor_id", Bill.vendor_id) +Index("idx_bills_department_id", Bill.department_id) +Index("idx_bills_bill_date", Bill.bill_date) +Index("idx_recurring_expenses_vendor_id", RecurringExpense.vendor_id) +Index("idx_recurring_expenses_next_run_date", RecurringExpense.next_run_date) +Index("idx_recurring_expenses_department_id", RecurringExpense.department_id) +Index("idx_bank_transactions_account_id", BankTransaction.bank_account_id) +Index("idx_bank_transactions_date", BankTransaction.transaction_date) +Index("idx_journal_entries_entry_date", JournalEntry.entry_date) +Index("idx_journal_entries_department_id", JournalEntry.department_id) +Index("idx_journal_entry_lines_entry_id", JournalEntryLine.journal_entry_id) +Index("idx_journal_entry_lines_account_id", JournalEntryLine.account_id) +Index("idx_journal_entry_lines_department_id", JournalEntryLine.department_id) +Index("idx_bt_journal_links_bt_id", BankTransactionJournalLink.bank_transaction_id) +Index("idx_bt_journal_links_je_id", BankTransactionJournalLink.journal_entry_id) +Index("idx_recurring_invoices_customer_id", RecurringInvoice.customer_id) +Index("idx_recurring_invoices_next_run_date", RecurringInvoice.next_run_date) +Index("idx_recurring_invoices_department_id", RecurringInvoice.department_id) +Index("idx_accounting_periods_start_end", AccountingPeriod.start_date, AccountingPeriod.end_date) +Index("idx_accounting_periods_is_locked", AccountingPeriod.is_locked) + +Base.metadata.create_all(engine) + +app = FastAPI(title="ZenLedger Small Business Accounting Suite API", version="1.0.0") + +class CustomerCreateRequest(BaseModel): + name: str = Field(..., description="Customer legal or display name (must be unique)", example="Acme Design Studio") + billing_email: Optional[str] = Field(None, description="Primary billing email address for invoices", example="billing@acmedesign.com") + payment_terms_id: Optional[int] = Field(None, description="ID of payment_terms row to use as default terms", example=2) + default_tax_category_id: Optional[int] = Field(None, description="ID of tax_categories row used as default customer tax", example=1) + +class CustomerResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Unique customer identifier", example=10) + name: str = Field(..., description="Customer name", example="Acme Design Studio") + billing_email: Optional[str] = Field(None, description="Customer billing email", example="billing@acmedesign.com") + payment_terms_id: Optional[int] = Field(None, description="Linked payment_terms.id or null", example=3) + default_tax_category_id: Optional[int] = Field(None, description="Linked tax_categories.id or null", example=1) + created_at: Optional[datetime] = Field(None, description="Timestamp when customer was created (ISO 8601)", example="2025-01-04T10:15:23Z") + updated_at: Optional[datetime] = Field(None, description="Timestamp for last update or null", example=None) + +class CustomersListResponse(BaseModel): + customers: List[CustomerResponse] = Field(..., description="List of customers", example=[]) + +class PaymentTermResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Payment terms ID", example=3) + name: str = Field(..., description="Name of payment terms", example="Net 30") + days: int = Field(..., description="Number of days from invoice date to due date", example=30) + description: Optional[str] = Field(None, description="Optional description", example="Payment due 30 days from invoice date") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2024-01-01T00:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example=None) + +class PaymentTermsListResponse(BaseModel): + payment_terms: List[PaymentTermResponse] = Field(..., description="List of payment terms", example=[]) + +class TaxCategoryResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Tax category ID", example=1) + name: str = Field(..., description="Tax category name", example="Standard Sales Tax 8.5%") + description: Optional[str] = Field(None, description="Optional description of when this tax applies", example="Standard local sales tax") + rate: float = Field(..., description="Tax rate as decimal (e.g., 0.085 for 8.5%)", example=0.085) + is_compound: bool = Field(..., description="True if tax is compounded with other taxes", example=False) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2024-01-01T00:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example=None) + +class TaxCategoriesListResponse(BaseModel): + tax_categories: List[TaxCategoryResponse] = Field(..., description="List of tax categories", example=[]) + +class DepartmentResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Department ID", example=2) + name: str = Field(..., description="Department name", example="Design") + description: Optional[str] = Field(None, description="Optional department description", example="Design and creative services") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2024-01-01T00:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example=None) + +class DepartmentsListResponse(BaseModel): + departments: List[DepartmentResponse] = Field(..., description="List of departments", example=[]) + +class AccountResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Account ID", example=50) + name: str = Field(..., description="Account name", example="Software Subscriptions") + code: Optional[str] = Field(None, description="Optional account code", example="6100") + type: str = Field(..., description="High-level account type", example="expense") + sub_type: Optional[str] = Field(None, description="Optional subtype classification", example="Operating Expense") + is_active: bool = Field(..., description="Whether account can be posted to", example=True) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2024-01-01T00:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example=None) + +class AccountsListResponse(BaseModel): + accounts: List[AccountResponse] = Field(..., description="List of accounts", example=[]) + +class BankAccountResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Bank account ID", example=1) + name: str = Field(..., description="Display name for the bank account", example="Chase Business Checking ****1023") + institution_name: Optional[str] = Field(None, description="Financial institution name", example="Chase") + account_number_masked: Optional[str] = Field(None, description="Masked bank account number", example="****1023") + account_id: int = Field(..., description="Linked GL account ID", example=101) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2024-01-01T00:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example=None) + +class BankAccountsListResponse(BaseModel): + bank_accounts: List[BankAccountResponse] = Field(..., description="List of bank accounts", example=[]) + +class InvoiceCreateRequest(BaseModel): + invoice_number: str = Field(..., description="Unique invoice number", example="INV-2025-001") + customer_id: int = Field(..., description="Customer ID that this invoice belongs to", example=10) + invoice_date: str = Field(..., description="Invoice date in ISO format YYYY-MM-DD", example="2025-01-05") + due_date: str = Field(..., description="Due date in ISO format YYYY-MM-DD", example="2025-02-04") + department_id: Optional[int] = Field(None, description="Department responsible for this invoice", example=2) + tax_category_id: Optional[int] = Field(None, description="Tax category applied at invoice level", example=1) + payment_terms_id: Optional[int] = Field(None, description="Payment terms to apply; defaults to customer terms if omitted", example=3) + currency: Optional[str] = Field("USD", description="Currency code, defaults to USD", example="USD") + status: Optional[str] = Field("draft", description="Initial status (draft or open)", example="open") + +class InvoiceResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Invoice ID", example=1001) + invoice_number: str = Field(..., description="Unique invoice number", example="INV-2025-001") + customer_id: int = Field(..., description="Linked customer ID", example=10) + department_id: Optional[int] = Field(None, description="Linked department ID", example=2) + tax_category_id: Optional[int] = Field(None, description="Linked tax category ID", example=1) + invoice_date: date = Field(..., description="Invoice date", example="2025-01-05") + due_date: date = Field(..., description="Due date", example="2025-02-04") + currency: str = Field(..., description="Currency code", example="USD") + status: str = Field(..., description="Invoice status", example="open") + subtotal: float = Field(..., description="Sum of line_subtotals before tax", example=2000.0) + tax_amount: float = Field(..., description="Total tax applied to invoice", example=170.0) + total: float = Field(..., description="Invoice total including tax", example=2170.0) + balance_due: float = Field(..., description="Remaining balance due on invoice", example=2170.0) + payment_terms_id: Optional[int] = Field(None, description="Linked payment_terms ID", example=3) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-05T09:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class InvoiceLineItemCreateRequest(BaseModel): + invoice_id: int = Field(..., description="ID of the invoice this line belongs to", example=1001) + description: str = Field(..., description="Description of the product or service", example="Logo redesign") + quantity: float = Field(..., description="Quantity of units sold", example=1.0) + unit_price: float = Field(..., description="Price per unit", example=1200.0) + discount_percent: Optional[float] = Field(0.0, description="Discount percentage applied to this line", example=10.0) + revenue_account_id: Optional[int] = Field(None, description="Revenue account to credit for this line", example=400) + department_id: Optional[int] = Field(None, description="Department for this line; overrides invoice department", example=2) + +class InvoiceLineItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Invoice line item ID", example=5001) + invoice_id: int = Field(..., description="Parent invoice ID", example=1001) + description: str = Field(..., description="Line item description", example="Logo redesign") + quantity: float = Field(..., description="Quantity", example=1.0) + unit_price: float = Field(..., description="Unit price", example=1200.0) + discount_percent: float = Field(..., description="Discount percent", example=0.0) + line_subtotal: float = Field(..., description="Subtotal before tax for this line", example=1200.0) + tax_amount: float = Field(..., description="Tax for this line", example=102.0) + total: float = Field(..., description="Total including tax for this line", example=1302.0) + revenue_account_id: Optional[int] = Field(None, description="Linked revenue account ID", example=400) + department_id: Optional[int] = Field(None, description="Linked department ID", example=2) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-05T09:10:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class InvoiceRecalculateTotalsResponse(BaseModel): + invoice_id: int = Field(..., description="Invoice ID", example=1001) + subtotal: float = Field(..., description="Updated subtotal", example=2000.0) + tax_amount: float = Field(..., description="Updated tax amount", example=170.0) + total: float = Field(..., description="Updated total", example=2170.0) + balance_due: float = Field(..., description="Updated balance due after payments", example=1270.0) + +class InvoicesListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Invoice ID", example=1001) + invoice_number: str = Field(..., description="Invoice number", example="INV-2025-001") + customer_id: int = Field(..., description="Customer ID", example=10) + invoice_date: date = Field(..., description="Invoice date", example="2025-01-05") + due_date: date = Field(..., description="Due date", example="2025-02-04") + status: str = Field(..., description="Invoice status", example="open") + subtotal: float = Field(..., description="Subtotal amount", example=2000.0) + tax_amount: float = Field(..., description="Tax amount", example=170.0) + total: float = Field(..., description="Total invoice amount", example=2170.0) + balance_due: float = Field(..., description="Outstanding balance", example=1270.0) + department_id: Optional[int] = Field(None, description="Linked department ID", example=2) + tax_category_id: Optional[int] = Field(None, description="Linked tax category ID", example=1) + payment_terms_id: Optional[int] = Field(None, description="Linked payment terms ID", example=3) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-05T09:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-10T10:00:00Z") + +class InvoicesListResponse(BaseModel): + invoices: List[InvoicesListItemResponse] = Field(..., description="List of invoices", example=[]) + +class PaymentCreateRequest(BaseModel): + customer_id: int = Field(..., description="Customer who made the payment", example=10) + payment_date: str = Field(..., description="Date payment was received (YYYY-MM-DD)", example="2025-01-10") + settlement_date: Optional[str] = Field(None, description="Date payment settled in bank (YYYY-MM-DD)", example="2025-01-10") + amount: float = Field(..., description="Gross payment amount", example=900.0) + currency: Optional[str] = Field("USD", description="Currency code (defaults to USD)", example="USD") + method: str = Field(..., description="Payment method description", example="Credit Card") + reference: Optional[str] = Field(None, description="External reference or transaction ID", example="STRIPE-12345") + +class PaymentResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Payment ID", example=2001) + customer_id: int = Field(..., description="Customer ID", example=10) + payment_date: date = Field(..., description="Payment date", example="2025-01-10") + settlement_date: Optional[date] = Field(None, description="Settlement date", example="2025-01-10") + amount: float = Field(..., description="Payment amount", example=900.0) + currency: str = Field(..., description="Payment currency", example="USD") + method: str = Field(..., description="Payment method", example="Credit Card") + reference: Optional[str] = Field(None, description="External reference ID", example="STRIPE-12345") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-10T12:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class PaymentApplicationCreateRequest(BaseModel): + payment_id: int = Field(..., description="Payment to allocate", example=2001) + invoice_id: int = Field(..., description="Invoice receiving this payment portion", example=1001) + amount: float = Field(..., description="Amount applied from payment to invoice", example=900.0) + +class PaymentApplicationResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Payment application ID", example=3001) + payment_id: int = Field(..., description="Linked payment ID", example=2001) + invoice_id: int = Field(..., description="Linked invoice ID", example=1001) + amount: float = Field(..., description="Amount applied", example=900.0) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-10T12:05:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class VendorCreateRequest(BaseModel): + name: str = Field(..., description="Vendor legal or display name", example="PixelPrint Supplies") + contact_email: Optional[str] = Field(None, description="Vendor accounts payable contact email", example="accounts@pixelprint.com") + payment_terms_id: Optional[int] = Field(None, description="Default payment terms for this vendor", example=2) + default_expense_category_id: Optional[int] = Field(None, description="Default expense account for purchases from this vendor", example=60) + +class VendorResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Vendor ID", example=20) + name: str = Field(..., description="Vendor name", example="PixelPrint Supplies") + contact_email: Optional[str] = Field(None, description="Vendor email", example="accounts@pixelprint.com") + payment_terms_id: Optional[int] = Field(None, description="Linked payment_terms ID", example=2) + default_expense_category_id: Optional[int] = Field(None, description="Linked default expense account ID", example=60) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-03T08:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class VendorsListResponse(BaseModel): + vendors: List[VendorResponse] = Field(..., description="List of vendors", example=[]) + +class BillCreateRequest(BaseModel): + bill_number: Optional[str] = Field(None, description="Vendor-provided bill or invoice number", example="BILL-2025-001") + vendor_id: int = Field(..., description="Vendor this bill is from", example=20) + bill_date: str = Field(..., description="Date on the vendor bill (YYYY-MM-DD)", example="2025-01-03") + due_date: Optional[str] = Field(None, description="Due date if known (YYYY-MM-DD)", example="2025-01-18") + currency: Optional[str] = Field("USD", description="Bill currency code", example="USD") + amount: float = Field(..., description="Total bill amount", example=325.5) + description: Optional[str] = Field(None, description="Description of the bill or purpose", example="Printer ink and paper") + department_id: Optional[int] = Field(None, description="Department to expense this bill to", example=3) + reimbursement_status: str = Field(..., description="Reimbursement status (Not Reimbursable, Reimbursable, Reimbursed)", example="Not Reimbursable") + payment_terms_id: Optional[int] = Field(None, description="Payment terms used for due_date calculation", example=1) + status: Optional[str] = Field("open", description="Bill status (open, paid, void)", example="open") + +class BillResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Bill ID", example=7001) + bill_number: Optional[str] = Field(None, description="Vendor bill number", example="BILL-2025-001") + vendor_id: int = Field(..., description="Vendor ID", example=20) + bill_date: date = Field(..., description="Bill date", example="2025-01-03") + due_date: Optional[date] = Field(None, description="Due date", example="2025-01-18") + currency: str = Field(..., description="Currency code", example="USD") + amount: float = Field(..., description="Bill amount", example=325.5) + description: Optional[str] = Field(None, description="Bill description", example="Printer ink and paper") + department_id: Optional[int] = Field(None, description="Department ID", example=3) + reimbursement_status: str = Field(..., description="Reimbursement status", example="Not Reimbursable") + payment_terms_id: Optional[int] = Field(None, description="Payment terms ID", example=1) + status: str = Field(..., description="Bill status", example="open") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-03T09:30:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class RecurringExpenseCreateRequest(BaseModel): + name: str = Field(..., description="Name of the recurring expense", example="Monthly Co-working Space Rent") + vendor_id: Optional[int] = Field(None, description="Vendor providing the recurring service", example=30) + amount: float = Field(..., description="Recurring amount for each run", example=650.0) + expense_account_id: int = Field(..., description="Expense account ID to debit", example=80) + department_id: Optional[int] = Field(None, description="Department that bears this recurring expense", example=4) + frequency: str = Field(..., description="Run frequency (daily, weekly, monthly, quarterly, yearly)", example="monthly") + next_run_date: str = Field(..., description="Next date the template should generate an expense (YYYY-MM-DD)", example="2025-02-01") + end_date: Optional[str] = Field(None, description="Date after which no more runs occur", example="2025-12-01") + is_active: Optional[bool] = Field(True, description="Whether this template is active", example=True) + +class RecurringExpenseResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Recurring expense template ID", example=9001) + name: str = Field(..., description="Template name", example="Monthly Co-working Space Rent") + vendor_id: Optional[int] = Field(None, description="Vendor ID", example=30) + amount: float = Field(..., description="Recurring amount", example=650.0) + expense_account_id: int = Field(..., description="Expense account ID", example=80) + department_id: Optional[int] = Field(None, description="Department ID", example=4) + frequency: str = Field(..., description="Frequency", example="monthly") + next_run_date: date = Field(..., description="Next run date", example="2025-02-01") + end_date: Optional[date] = Field(None, description="End date", example="2025-12-01") + is_active: bool = Field(..., description="Whether template is active", example=True) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-15T09:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class BankTransactionItemRequest(BaseModel): + transaction_date: str = Field(..., description="Transaction date (YYYY-MM-DD)", example="2025-01-01") + posted_date: Optional[str] = Field(None, description="Posted date (YYYY-MM-DD)", example="2025-01-02") + description: str = Field(..., description="Bank description", example="Client payment ACME") + amount: float = Field(..., description="Transaction amount (positive or negative)", example=1500.0) + external_id: Optional[str] = Field(None, description="External bank transaction identifier", example="txn_001") + +class BankTransactionsBatchImportRequest(BaseModel): + bank_account_id: int = Field(..., description="Bank account ID these transactions belong to", example=1) + transactions: List[BankTransactionItemRequest] = Field(..., description="Array of bank transactions to import", example=[]) + +class BankTransactionResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Bank transaction ID", example=6001) + bank_account_id: int = Field(..., description="Bank account ID", example=1) + transaction_date: date = Field(..., description="Transaction date", example="2025-01-01") + posted_date: Optional[date] = Field(None, description="Posted date", example="2025-01-02") + description: str = Field(..., description="Transaction description", example="Client payment ACME") + amount: float = Field(..., description="Transaction amount", example=1500.0) + external_id: Optional[str] = Field(None, description="External transaction ID", example="txn_001") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-07T10:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class BankTransactionsBatchImportResponse(BaseModel): + bank_transactions: List[BankTransactionResponse] = Field(..., description="Imported bank transactions", example=[]) + +class BankTransactionsListResponse(BaseModel): + bank_transactions: List[BankTransactionResponse] = Field(..., description="List of bank transactions", example=[]) + +class JournalEntryCreateRequest(BaseModel): + entry_date: str = Field(..., description="Date of the journal entry (YYYY-MM-DD)", example="2024-12-31") + description: Optional[str] = Field(None, description="Narrative description of the entry", example="Year-end accrual for expenses") + department_id: Optional[int] = Field(None, description="Department that this entry belongs to", example=4) + source: Optional[str] = Field(None, description="System source of this entry", example="manual") + source_id: Optional[int] = Field(None, description="External source ID if applicable", example=None) + +class JournalEntryResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Journal entry ID", example=8001) + entry_date: date = Field(..., description="Entry date", example="2024-12-31") + description: Optional[str] = Field(None, description="Entry description", example="Year-end accrual for expenses") + department_id: Optional[int] = Field(None, description="Department ID", example=4) + source: Optional[str] = Field(None, description="Source system", example="manual") + source_id: Optional[int] = Field(None, description="Source record ID", example=None) + created_by_user_id: Optional[int] = Field(None, description="User who created the entry (always 1)", example=1) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2024-12-31T23:50:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class JournalEntryLineCreateRequest(BaseModel): + journal_entry_id: int = Field(..., description="Parent journal entry ID", example=8001) + account_id: int = Field(..., description="Account to debit or credit", example=50) + department_id: Optional[int] = Field(None, description="Department for this line if different from header", example=4) + description: Optional[str] = Field(None, description="Line-specific description", example="Accrual for December software expenses") + debit: Optional[float] = Field(0.0, description="Debit amount (0 if this is a credit line)", example=300.0) + credit: Optional[float] = Field(0.0, description="Credit amount (0 if this is a debit line)", example=0.0) + +class JournalEntryLineResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Journal entry line ID", example=8101) + journal_entry_id: int = Field(..., description="Parent journal entry ID", example=8001) + account_id: int = Field(..., description="Account ID", example=50) + department_id: Optional[int] = Field(None, description="Department ID", example=4) + description: Optional[str] = Field(None, description="Line description", example="Accrual for December software expenses") + debit: float = Field(..., description="Debit amount", example=300.0) + credit: float = Field(..., description="Credit amount", example=0.0) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2024-12-31T23:51:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class BankTransactionJournalLinkCreateRequest(BaseModel): + bank_transaction_id: int = Field(..., description="Bank transaction ID being reconciled", example=6001) + journal_entry_id: int = Field(..., description="Journal entry ID representing the accounting for this transaction", example=8005) + +class BankTransactionJournalLinkResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Link ID", example=90001) + bank_transaction_id: int = Field(..., description="Bank transaction ID", example=6001) + journal_entry_id: int = Field(..., description="Journal entry ID", example=8005) + created_at: Optional[datetime] = Field(None, description="Link creation timestamp", example="2025-01-07T11:00:00Z") + +class RecurringInvoiceCreateRequest(BaseModel): + customer_id: int = Field(..., description="Customer who will receive recurring invoices", example=15) + name: str = Field(..., description="Name of the recurring invoice template", example="Monthly SEO Retainer") + description: Optional[str] = Field(None, description="Description of the service or product", example="Monthly SEO services retainer") + quantity: float = Field(..., description="Quantity per recurring invoice", example=1.0) + unit_price: float = Field(..., description="Unit price per run", example=1500.0) + discount_percent: Optional[float] = Field(0.0, description="Discount percent per run", example=0.0) + frequency: str = Field(..., description="Frequency (daily, weekly, monthly, quarterly, yearly)", example="monthly") + next_run_date: str = Field(..., description="Date of next invoice generation (YYYY-MM-DD)", example="2025-02-01") + end_date: Optional[str] = Field(None, description="Final date for invoice generation", example="2025-07-01") + payment_terms_id: Optional[int] = Field(None, description="Payment terms applied to generated invoices", example=4) + tax_category_id: Optional[int] = Field(None, description="Tax category for generated invoices", example=5) + department_id: Optional[int] = Field(None, description="Department for generated invoices", example=2) + currency: Optional[str] = Field("USD", description="Currency for generated invoices", example="USD") + is_active: Optional[bool] = Field(True, description="Whether this recurring schedule is active", example=True) + +class RecurringInvoiceResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Recurring invoice template ID", example=9501) + customer_id: int = Field(..., description="Customer ID", example=15) + name: str = Field(..., description="Template name", example="Monthly SEO Retainer") + description: Optional[str] = Field(None, description="Template description", example="Monthly SEO services retainer") + quantity: float = Field(..., description="Quantity per invoice", example=1.0) + unit_price: float = Field(..., description="Unit price", example=1500.0) + discount_percent: float = Field(..., description="Discount percent", example=0.0) + frequency: str = Field(..., description="Frequency", example="monthly") + next_run_date: date = Field(..., description="Next run date", example="2025-02-01") + end_date: Optional[date] = Field(None, description="End date", example="2025-07-01") + payment_terms_id: Optional[int] = Field(None, description="Payment terms ID", example=4) + tax_category_id: Optional[int] = Field(None, description="Tax category ID", example=5) + department_id: Optional[int] = Field(None, description="Department ID", example=2) + currency: str = Field(..., description="Currency", example="USD") + is_active: bool = Field(..., description="Whether template is active", example=True) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-20T09:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class AccountingPeriodCreateRequest(BaseModel): + start_date: str = Field(..., description="Start date of the period (YYYY-MM-DD)", example="2024-01-01") + end_date: str = Field(..., description="End date of the period (YYYY-MM-DD)", example="2024-12-31") + close_date: Optional[str] = Field(None, description="Date when the period was closed", example="2024-12-31") + is_locked: Optional[bool] = Field(False, description="Whether the period is locked against changes", example=True) + +class AccountingPeriodUpdateRequest(BaseModel): + close_date: Optional[str] = Field(None, description="New close date or null to clear", example="2024-12-31") + is_locked: Optional[bool] = Field(None, description="Set true to lock or false to unlock", example=True) + +class AccountingPeriodResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Accounting period ID", example=10001) + start_date: date = Field(..., description="Start date", example="2024-01-01") + end_date: date = Field(..., description="End date", example="2024-12-31") + close_date: Optional[date] = Field(None, description="Close date or null", example="2024-12-31") + is_locked: bool = Field(..., description="Locked flag", example=True) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2024-12-31T23:55:00Z") + updated_at: Optional[datetime] = Field(None, description="Update timestamp", example=None) + +class ProfitAndLossReportResponse(BaseModel): + start_date: str = Field(..., description="Report start date", example="2025-01-01") + end_date: str = Field(..., description="Report end date", example="2025-01-31") + department_id: Optional[int] = Field(None, description="Department filter or null if not filtered", example=2) + total_revenue: float = Field(..., description="Sum of income account balances for the period", example=5000.0) + total_expenses: float = Field(..., description="Sum of expense account balances for the period", example=3000.0) + net_profit: float = Field(..., description="total_revenue - total_expenses", example=2000.0) + detail: Dict[str, List[Dict[str, Optional[float]]]] = Field(..., description="Optional breakdown of accounts", example={"income_accounts": [], "expense_accounts": []}) + +@app.post( + "/api/customers", + response_model=CustomerResponse, + summary="Create a new customer", + description="Create a customer with optional payment terms and tax category.", + tags=["customers"], + operation_id="create_customer", +) +async def create_customer_endpoint(body: CustomerCreateRequest = Body(...)) -> CustomerResponse: + session = SessionLocal() + customer = Customer( + name=body.name, + billing_email=body.billing_email, + payment_terms_id=body.payment_terms_id, + default_tax_category_id=body.default_tax_category_id, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(customer) + session.commit() + session.refresh(customer) + session.close() + return CustomerResponse( + id=customer.id, + name=customer.name, + billing_email=customer.billing_email, + payment_terms_id=customer.payment_terms_id, + default_tax_category_id=customer.default_tax_category_id, + created_at=customer.created_at, + updated_at=customer.updated_at, + ) + +@app.get( + "/api/customers", + response_model=CustomersListResponse, + summary="List customers with optional filters", + description="Retrieve customers filtered by name or billing email.", + tags=["customers"], + operation_id="list_customers", +) +async def list_customers_endpoint( + name: Optional[str] = Query(None, description="Filter by exact or partial customer name", example="Acme"), + billing_email: Optional[str] = Query(None, description="Filter customers by billing_email exact match", example="billing@acmedesign.com"), + limit: Optional[int] = Query(50, description="Maximum number of records to return", example=50), + offset: Optional[int] = Query(0, description="Number of records to skip for pagination", example=0), +) -> CustomersListResponse: + session = SessionLocal() + query = session.query(Customer) + if name is not None: + query = query.filter(Customer.name.contains(name)) + if billing_email is not None: + query = query.filter(Customer.billing_email == billing_email) + customers = query.offset(offset).limit(limit).all() + session.close() + return CustomersListResponse(customers=customers) + +@app.get( + "/api/customers/{customer_id}", + response_model=CustomerResponse, + summary="Get a single customer by ID", + description="Fetch one customer by ID to inspect billing settings.", + tags=["customers"], + operation_id="get_customer", +) +async def get_customer_endpoint( + customer_id: int = Path(..., description="Customer ID to retrieve", example=10) +) -> CustomerResponse: + session = SessionLocal() + customer = session.query(Customer).filter(Customer.id == customer_id).first() + session.close() + if customer is None: + return CustomerResponse( + id=0, + name="", + billing_email=None, + payment_terms_id=None, + default_tax_category_id=None, + created_at=None, + updated_at=None, + ) + return CustomerResponse( + id=customer.id, + name=customer.name, + billing_email=customer.billing_email, + payment_terms_id=customer.payment_terms_id, + default_tax_category_id=customer.default_tax_category_id, + created_at=customer.created_at, + updated_at=customer.updated_at, + ) + +@app.get( + "/api/payment_terms", + response_model=PaymentTermsListResponse, + summary="List payment terms", + description="Retrieve payment_terms records optionally filtered by name.", + tags=["payment_terms"], + operation_id="list_payment_terms", +) +async def list_payment_terms_endpoint( + name: Optional[str] = Query(None, description="Filter terms by name", example="Net 30") +) -> PaymentTermsListResponse: + session = SessionLocal() + query = session.query(PaymentTerm) + if name is not None: + query = query.filter(PaymentTerm.name.contains(name)) + payment_terms = query.all() + session.close() + return PaymentTermsListResponse(payment_terms=payment_terms) + +@app.get( + "/api/tax_categories", + response_model=TaxCategoriesListResponse, + summary="List tax categories", + description="Retrieve available tax_categories optionally filtered by name.", + tags=["tax_categories"], + operation_id="list_tax_categories", +) +async def list_tax_categories_endpoint( + name: Optional[str] = Query(None, description="Filter tax categories by exact or partial name", example="Standard Sales Tax 8.5%") +) -> TaxCategoriesListResponse: + session = SessionLocal() + query = session.query(TaxCategory) + if name is not None: + query = query.filter(TaxCategory.name.contains(name)) + rows = query.all() + tax_categories: List[TaxCategoryResponse] = [] + for r in rows: + tax_categories.append( + TaxCategoryResponse( + id=r.id, + name=r.name, + description=r.description, + rate=r.rate, + is_compound=bool(r.is_compound), + created_at=r.created_at, + updated_at=r.updated_at, + ) + ) + session.close() + return TaxCategoriesListResponse(tax_categories=tax_categories) + +@app.get( + "/api/departments", + response_model=DepartmentsListResponse, + summary="List departments", + description="Retrieve departments to map human-readable names to IDs.", + tags=["departments"], + operation_id="list_departments", +) +async def list_departments_endpoint( + name: Optional[str] = Query(None, description="Filter departments by name", example="Design") +) -> DepartmentsListResponse: + session = SessionLocal() + query = session.query(Department) + if name is not None: + query = query.filter(Department.name.contains(name)) + departments = query.all() + session.close() + return DepartmentsListResponse(departments=departments) + +@app.get( + "/api/accounts", + response_model=AccountsListResponse, + summary="List chart of accounts", + description="Retrieve accounts filtered by type or name.", + tags=["accounts"], + operation_id="list_accounts", +) +async def list_accounts_endpoint( + type: Optional[str] = Query(None, description="Filter accounts by type (asset, liability, equity, income, expense, contra)", example="expense"), + name: Optional[str] = Query(None, description="Filter accounts by name", example="Software Subscriptions"), +) -> AccountsListResponse: + session = SessionLocal() + query = session.query(Account) + if type is not None: + query = query.filter(Account.type == type) + if name is not None: + query = query.filter(Account.name.contains(name)) + rows = query.all() + accounts_list: List[AccountResponse] = [] + for a in rows: + accounts_list.append( + AccountResponse( + id=a.id, + name=a.name, + code=a.code, + type=a.type, + sub_type=a.sub_type, + is_active=bool(a.is_active), + created_at=a.created_at, + updated_at=a.updated_at, + ) + ) + session.close() + return AccountsListResponse(accounts=accounts_list) + +@app.get( + "/api/bank_accounts", + response_model=BankAccountsListResponse, + summary="List bank accounts", + description="Retrieve bank_accounts to find IDs for bank transactions.", + tags=["bank_accounts"], + operation_id="list_bank_accounts", +) +async def list_bank_accounts_endpoint( + name: Optional[str] = Query(None, description="Filter bank accounts by name", example="Chase Business Checking ****1023") +) -> BankAccountsListResponse: + session = SessionLocal() + query = session.query(BankAccount) + if name is not None: + query = query.filter(BankAccount.name.contains(name)) + bank_accounts = query.all() + session.close() + return BankAccountsListResponse(bank_accounts=bank_accounts) + +@app.post( + "/api/invoices", + response_model=InvoiceResponse, + summary="Create a new invoice header", + description="Create an invoice record without line items.", + tags=["invoices"], + operation_id="create_invoice", +) +async def create_invoice_endpoint(body: InvoiceCreateRequest = Body(...)) -> InvoiceResponse: + session = SessionLocal() + invoice = Invoice( + invoice_number=body.invoice_number, + customer_id=body.customer_id, + department_id=body.department_id, + tax_category_id=body.tax_category_id, + invoice_date=date.fromisoformat(body.invoice_date), + due_date=date.fromisoformat(body.due_date), + currency=body.currency if body.currency is not None else "USD", + status=body.status if body.status is not None else "draft", + subtotal=0.0, + tax_amount=0.0, + total=0.0, + balance_due=0.0, + payment_terms_id=body.payment_terms_id, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(invoice) + session.commit() + session.refresh(invoice) + session.close() + return InvoiceResponse( + id=invoice.id, + invoice_number=invoice.invoice_number, + customer_id=invoice.customer_id, + department_id=invoice.department_id, + tax_category_id=invoice.tax_category_id, + invoice_date=invoice.invoice_date, + due_date=invoice.due_date, + currency=invoice.currency, + status=invoice.status, + subtotal=invoice.subtotal, + tax_amount=invoice.tax_amount, + total=invoice.total, + balance_due=invoice.balance_due, + payment_terms_id=invoice.payment_terms_id, + created_at=invoice.created_at, + updated_at=invoice.updated_at, + ) + +@app.post( + "/api/invoice_line_items", + response_model=InvoiceLineItemResponse, + summary="Add a line item to an invoice", + description="Create an invoice line and update invoice totals.", + tags=["invoices", "invoice_line_items"], + operation_id="create_invoice_line_item", +) +async def create_invoice_line_item_endpoint( + body: InvoiceLineItemCreateRequest = Body(...) +) -> InvoiceLineItemResponse: + session = SessionLocal() + invoice = session.query(Invoice).filter(Invoice.id == body.invoice_id).first() + tax_rate = 0.0 + if invoice is not None and invoice.tax_category_id is not None: + tax_cat = session.query(TaxCategory).filter(TaxCategory.id == invoice.tax_category_id).first() + if tax_cat is not None: + tax_rate = tax_cat.rate + discount_percent = body.discount_percent if body.discount_percent is not None else 0.0 + gross = body.quantity * body.unit_price + discount_amount = gross * (discount_percent / 100.0) + line_subtotal = gross - discount_amount + tax_amount = line_subtotal * tax_rate + total = line_subtotal + tax_amount + item = InvoiceLineItem( + invoice_id=body.invoice_id, + description=body.description, + quantity=body.quantity, + unit_price=body.unit_price, + discount_percent=discount_percent, + line_subtotal=line_subtotal, + tax_amount=tax_amount, + total=total, + revenue_account_id=body.revenue_account_id, + department_id=body.department_id if body.department_id is not None else (invoice.department_id if invoice is not None else None), + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(item) + if invoice is not None: + subtotal_sum = session.query(InvoiceLineItem).filter(InvoiceLineItem.invoice_id == invoice.id).all() + subtotal_value = 0.0 + tax_value = 0.0 + total_value = 0.0 + for li in subtotal_sum: + subtotal_value += li.line_subtotal + tax_value += li.tax_amount + total_value += li.total + subtotal_value += line_subtotal + tax_value += tax_amount + total_value += total + invoice.subtotal = subtotal_value + invoice.tax_amount = tax_value + invoice.total = total_value + payments = session.query(PaymentApplication).filter(PaymentApplication.invoice_id == invoice.id).all() + paid_amount = 0.0 + for p in payments: + paid_amount += p.amount + invoice.balance_due = invoice.total - paid_amount + invoice.updated_at = datetime.utcnow() + session.commit() + session.refresh(item) + session.close() + return InvoiceLineItemResponse( + id=item.id, + invoice_id=item.invoice_id, + description=item.description, + quantity=item.quantity, + unit_price=item.unit_price, + discount_percent=item.discount_percent, + line_subtotal=item.line_subtotal, + tax_amount=item.tax_amount, + total=item.total, + revenue_account_id=item.revenue_account_id, + department_id=item.department_id, + created_at=item.created_at, + updated_at=item.updated_at, + ) + +@app.post( + "/api/invoices/{invoice_id}/recalculate_totals", + response_model=InvoiceRecalculateTotalsResponse, + summary="Recalculate invoice totals", + description="Recompute totals from line items and applied payments.", + tags=["invoices"], + operation_id="recalculate_invoice_totals", +) +async def recalculate_invoice_totals_endpoint( + invoice_id: int = Path(..., description="Invoice ID whose totals should be recalculated", example=1001) +) -> InvoiceRecalculateTotalsResponse: + session = SessionLocal() + invoice = session.query(Invoice).filter(Invoice.id == invoice_id).first() + if invoice is None: + session.close() + return InvoiceRecalculateTotalsResponse(invoice_id=0, subtotal=0.0, tax_amount=0.0, total=0.0, balance_due=0.0) + lines = session.query(InvoiceLineItem).filter(InvoiceLineItem.invoice_id == invoice_id).all() + subtotal = 0.0 + tax_amount = 0.0 + total = 0.0 + for li in lines: + subtotal += li.line_subtotal + tax_amount += li.tax_amount + total += li.total + payments = session.query(PaymentApplication).filter(PaymentApplication.invoice_id == invoice_id).all() + paid_amount = 0.0 + for pa in payments: + paid_amount += pa.amount + invoice.subtotal = subtotal + invoice.tax_amount = tax_amount + invoice.total = total + invoice.balance_due = total - paid_amount + invoice.updated_at = datetime.utcnow() + session.commit() + session.close() + return InvoiceRecalculateTotalsResponse( + invoice_id=invoice_id, + subtotal=subtotal, + tax_amount=tax_amount, + total=total, + balance_due=invoice.balance_due, + ) + +@app.get( + "/api/invoices", + response_model=InvoicesListResponse, + summary="List invoices with filters", + description="Retrieve invoices filtered by number, customer, status, or dates.", + tags=["invoices"], + operation_id="list_invoices", +) +async def list_invoices_endpoint( + invoice_number: Optional[str] = Query(None, description="Filter by invoice_number", example="INV-2025-001"), + customer_id: Optional[int] = Query(None, description="Filter invoices for a given customer ID", example=10), + status: Optional[str] = Query(None, description="Filter by invoice status (draft, open, paid, void)", example="open"), + from_date: Optional[str] = Query(None, description="Filter by minimum invoice_date (YYYY-MM-DD)", example="2025-01-01"), + to_date: Optional[str] = Query(None, description="Filter by maximum invoice_date (YYYY-MM-DD)", example="2025-01-31"), + limit: Optional[int] = Query(50, description="Max number of invoices to return", example=50), + offset: Optional[int] = Query(0, description="Number of invoices to skip", example=0), +) -> InvoicesListResponse: + session = SessionLocal() + query = session.query(Invoice) + if invoice_number is not None: + query = query.filter(Invoice.invoice_number == invoice_number) + if customer_id is not None: + query = query.filter(Invoice.customer_id == customer_id) + if status is not None: + query = query.filter(Invoice.status == status) + if from_date is not None: + query = query.filter(Invoice.invoice_date >= date.fromisoformat(from_date)) + if to_date is not None: + query = query.filter(Invoice.invoice_date <= date.fromisoformat(to_date)) + invoices = query.offset(offset).limit(limit).all() + session.close() + return InvoicesListResponse(invoices=invoices) + +@app.post( + "/api/payments", + response_model=PaymentResponse, + summary="Record a customer payment", + description="Create a payment row for a customer without allocations.", + tags=["payments"], + operation_id="create_payment", +) +async def create_payment_endpoint(body: PaymentCreateRequest = Body(...)) -> PaymentResponse: + session = SessionLocal() + payment = Payment( + customer_id=body.customer_id, + payment_date=date.fromisoformat(body.payment_date), + settlement_date=date.fromisoformat(body.settlement_date) if body.settlement_date is not None else None, + amount=body.amount, + currency=body.currency if body.currency is not None else "USD", + method=body.method, + reference=body.reference, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(payment) + session.commit() + session.refresh(payment) + session.close() + return PaymentResponse( + id=payment.id, + customer_id=payment.customer_id, + payment_date=payment.payment_date, + settlement_date=payment.settlement_date, + amount=payment.amount, + currency=payment.currency, + method=payment.method, + reference=payment.reference, + created_at=payment.created_at, + updated_at=payment.updated_at, + ) + +@app.post( + "/api/payment_applications", + response_model=PaymentApplicationResponse, + summary="Apply a payment to an invoice", + description="Allocate part or all of a payment amount to a specific invoice.", + tags=["payments", "payment_applications"], + operation_id="create_payment_application", +) +async def create_payment_application_endpoint( + body: PaymentApplicationCreateRequest = Body(...) +) -> PaymentApplicationResponse: + session = SessionLocal() + payment_app = PaymentApplication( + payment_id=body.payment_id, + invoice_id=body.invoice_id, + amount=body.amount, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(payment_app) + invoice = session.query(Invoice).filter(Invoice.id == body.invoice_id).first() + if invoice is not None: + payments = session.query(PaymentApplication).filter(PaymentApplication.invoice_id == body.invoice_id).all() + total_applied = 0.0 + for p in payments: + total_applied += p.amount + total_applied += body.amount + invoice.balance_due = invoice.total - total_applied + if invoice.balance_due <= 0: + invoice.status = "paid" + invoice.updated_at = datetime.utcnow() + session.commit() + session.refresh(payment_app) + session.close() + return PaymentApplicationResponse( + id=payment_app.id, + payment_id=payment_app.payment_id, + invoice_id=payment_app.invoice_id, + amount=payment_app.amount, + created_at=payment_app.created_at, + updated_at=payment_app.updated_at, + ) + +@app.post( + "/api/vendors", + response_model=VendorResponse, + summary="Create a new vendor", + description="Create a vendor with default payment terms and expense category.", + tags=["vendors"], + operation_id="create_vendor", +) +async def create_vendor_endpoint(body: VendorCreateRequest = Body(...)) -> VendorResponse: + session = SessionLocal() + vendor = Vendor( + name=body.name, + contact_email=body.contact_email, + payment_terms_id=body.payment_terms_id, + default_expense_category_id=body.default_expense_category_id, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(vendor) + session.commit() + session.refresh(vendor) + session.close() + return VendorResponse( + id=vendor.id, + name=vendor.name, + contact_email=vendor.contact_email, + payment_terms_id=vendor.payment_terms_id, + default_expense_category_id=vendor.default_expense_category_id, + created_at=vendor.created_at, + updated_at=vendor.updated_at, + ) + +@app.get( + "/api/vendors", + response_model=VendorsListResponse, + summary="List vendors", + description="Retrieve vendors to find IDs when creating bills.", + tags=["vendors"], + operation_id="list_vendors", +) +async def list_vendors_endpoint( + name: Optional[str] = Query(None, description="Filter vendors by name", example="PixelPrint") +) -> VendorsListResponse: + session = SessionLocal() + query = session.query(Vendor) + if name is not None: + query = query.filter(Vendor.name.contains(name)) + vendors = query.all() + session.close() + return VendorsListResponse(vendors=vendors) + +@app.post( + "/api/bills", + response_model=BillResponse, + summary="Create a bill", + description="Create a bills row for vendor expenses.", + tags=["bills"], + operation_id="create_bill", +) +async def create_bill_endpoint(body: BillCreateRequest = Body(...)) -> BillResponse: + session = SessionLocal() + bill = Bill( + bill_number=body.bill_number, + vendor_id=body.vendor_id, + bill_date=date.fromisoformat(body.bill_date), + due_date=date.fromisoformat(body.due_date) if body.due_date is not None else None, + currency=body.currency if body.currency is not None else "USD", + amount=body.amount, + description=body.description, + department_id=body.department_id, + reimbursement_status=body.reimbursement_status, + payment_terms_id=body.payment_terms_id, + status=body.status if body.status is not None else "open", + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(bill) + session.commit() + session.refresh(bill) + session.close() + return BillResponse( + id=bill.id, + bill_number=bill.bill_number, + vendor_id=bill.vendor_id, + bill_date=bill.bill_date, + due_date=bill.due_date, + currency=bill.currency, + amount=bill.amount, + description=bill.description, + department_id=bill.department_id, + reimbursement_status=bill.reimbursement_status, + payment_terms_id=bill.payment_terms_id, + status=bill.status, + created_at=bill.created_at, + updated_at=bill.updated_at, + ) + +@app.post( + "/api/recurring_expenses", + response_model=RecurringExpenseResponse, + summary="Create a recurring expense template", + description="Create recurring_expenses templates such as monthly rent.", + tags=["recurring_expenses"], + operation_id="create_recurring_expense", +) +async def create_recurring_expense_endpoint( + body: RecurringExpenseCreateRequest = Body(...) +) -> RecurringExpenseResponse: + session = SessionLocal() + recurring = RecurringExpense( + name=body.name, + vendor_id=body.vendor_id, + amount=body.amount, + expense_account_id=body.expense_account_id, + department_id=body.department_id, + frequency=body.frequency, + next_run_date=date.fromisoformat(body.next_run_date), + end_date=date.fromisoformat(body.end_date) if body.end_date is not None else None, + is_active=1 if (body.is_active if body.is_active is not None else True) else 0, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(recurring) + session.commit() + session.refresh(recurring) + session.close() + return RecurringExpenseResponse( + id=recurring.id, + name=recurring.name, + vendor_id=recurring.vendor_id, + amount=recurring.amount, + expense_account_id=recurring.expense_account_id, + department_id=recurring.department_id, + frequency=recurring.frequency, + next_run_date=recurring.next_run_date, + end_date=recurring.end_date, + is_active=bool(recurring.is_active), + created_at=recurring.created_at, + updated_at=recurring.updated_at, + ) + +@app.post( + "/api/bank_transactions/batch_import", + response_model=BankTransactionsBatchImportResponse, + summary="Import a batch of bank transactions", + description="Insert multiple bank_transactions for a bank account in one call.", + tags=["bank_transactions"], + operation_id="batch_import_bank_transactions", +) +async def batch_import_bank_transactions_endpoint( + body: BankTransactionsBatchImportRequest = Body(...) +) -> BankTransactionsBatchImportResponse: + session = SessionLocal() + created_items: List[BankTransactionResponse] = [] + for t in body.transactions: + bt = BankTransaction( + bank_account_id=body.bank_account_id, + transaction_date=date.fromisoformat(t.transaction_date), + posted_date=date.fromisoformat(t.posted_date) if t.posted_date is not None else None, + description=t.description, + amount=t.amount, + external_id=t.external_id, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(bt) + session.commit() + session.refresh(bt) + created_items.append( + BankTransactionResponse( + id=bt.id, + bank_account_id=bt.bank_account_id, + transaction_date=bt.transaction_date, + posted_date=bt.posted_date, + description=bt.description, + amount=bt.amount, + external_id=bt.external_id, + created_at=bt.created_at, + updated_at=bt.updated_at, + ) + ) + session.close() + return BankTransactionsBatchImportResponse(bank_transactions=created_items) + +@app.get( + "/api/bank_transactions", + response_model=BankTransactionsListResponse, + summary="List bank transactions", + description="Retrieve bank_transactions for a bank account filtered by date.", + tags=["bank_transactions"], + operation_id="list_bank_transactions", +) +async def list_bank_transactions_endpoint( + bank_account_id: int = Query(..., description="Bank account ID to filter transactions", example=1), + from_date: Optional[str] = Query(None, description="Minimum transaction_date (YYYY-MM-DD)", example="2025-01-01"), + to_date: Optional[str] = Query(None, description="Maximum transaction_date (YYYY-MM-DD)", example="2025-01-07"), + limit: Optional[int] = Query(100, description="Maximum number of records", example=100), + offset: Optional[int] = Query(0, description="Records to skip", example=0), +) -> BankTransactionsListResponse: + session = SessionLocal() + query = session.query(BankTransaction).filter(BankTransaction.bank_account_id == bank_account_id) + if from_date is not None: + query = query.filter(BankTransaction.transaction_date >= date.fromisoformat(from_date)) + if to_date is not None: + query = query.filter(BankTransaction.transaction_date <= date.fromisoformat(to_date)) + transactions = query.offset(offset).limit(limit).all() + session.close() + return BankTransactionsListResponse(bank_transactions=transactions) + +@app.post( + "/api/journal_entries", + response_model=JournalEntryResponse, + summary="Create a journal entry header", + description="Create a journal_entries header with entry_date and description.", + tags=["journal_entries"], + operation_id="create_journal_entry", +) +async def create_journal_entry_endpoint( + body: JournalEntryCreateRequest = Body(...) +) -> JournalEntryResponse: + session = SessionLocal() + entry = JournalEntry( + entry_date=date.fromisoformat(body.entry_date), + description=body.description, + department_id=body.department_id, + source=body.source, + source_id=body.source_id, + created_by_user_id=1, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(entry) + session.commit() + session.refresh(entry) + session.close() + return JournalEntryResponse( + id=entry.id, + entry_date=entry.entry_date, + description=entry.description, + department_id=entry.department_id, + source=entry.source, + source_id=entry.source_id, + created_by_user_id=entry.created_by_user_id, + created_at=entry.created_at, + updated_at=entry.updated_at, + ) + +@app.post( + "/api/journal_entry_lines", + response_model=JournalEntryLineResponse, + summary="Add a line to a journal entry", + description="Create a journal_entry_lines row for an account with debit or credit.", + tags=["journal_entries", "journal_entry_lines"], + operation_id="create_journal_entry_line", +) +async def create_journal_entry_line_endpoint( + body: JournalEntryLineCreateRequest = Body(...) +) -> JournalEntryLineResponse: + session = SessionLocal() + debit_value = body.debit if body.debit is not None else 0.0 + credit_value = body.credit if body.credit is not None else 0.0 + line = JournalEntryLine( + journal_entry_id=body.journal_entry_id, + account_id=body.account_id, + department_id=body.department_id, + description=body.description, + debit=debit_value, + credit=credit_value, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(line) + session.commit() + session.refresh(line) + session.close() + return JournalEntryLineResponse( + id=line.id, + journal_entry_id=line.journal_entry_id, + account_id=line.account_id, + department_id=line.department_id, + description=line.description, + debit=line.debit, + credit=line.credit, + created_at=line.created_at, + updated_at=line.updated_at, + ) + +@app.post( + "/api/bank_transaction_journal_links", + response_model=BankTransactionJournalLinkResponse, + summary="Link a bank transaction to a journal entry", + description="Create a bank_transaction_journal_links row to connect bank_transactions with journal_entries.", + tags=["bank_transactions", "journal_entries"], + operation_id="create_bank_transaction_journal_link", +) +async def create_bank_transaction_journal_link_endpoint( + body: BankTransactionJournalLinkCreateRequest = Body(...) +) -> BankTransactionJournalLinkResponse: + session = SessionLocal() + link = BankTransactionJournalLink( + bank_transaction_id=body.bank_transaction_id, + journal_entry_id=body.journal_entry_id, + created_at=datetime.utcnow(), + ) + session.add(link) + session.commit() + session.refresh(link) + session.close() + return BankTransactionJournalLinkResponse( + id=link.id, + bank_transaction_id=link.bank_transaction_id, + journal_entry_id=link.journal_entry_id, + created_at=link.created_at, + ) + +@app.post( + "/api/recurring_invoices", + response_model=RecurringInvoiceResponse, + summary="Create a recurring invoice schedule", + description="Create a recurring_invoices template specifying settings.", + tags=["recurring_invoices"], + operation_id="create_recurring_invoice", +) +async def create_recurring_invoice_endpoint( + body: RecurringInvoiceCreateRequest = Body(...) +) -> RecurringInvoiceResponse: + session = SessionLocal() + recurring = RecurringInvoice( + customer_id=body.customer_id, + name=body.name, + description=body.description, + quantity=body.quantity, + unit_price=body.unit_price, + discount_percent=body.discount_percent if body.discount_percent is not None else 0.0, + frequency=body.frequency, + next_run_date=date.fromisoformat(body.next_run_date), + end_date=date.fromisoformat(body.end_date) if body.end_date is not None else None, + payment_terms_id=body.payment_terms_id, + tax_category_id=body.tax_category_id, + department_id=body.department_id, + currency=body.currency if body.currency is not None else "USD", + is_active=1 if (body.is_active if body.is_active is not None else True) else 0, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(recurring) + session.commit() + session.refresh(recurring) + session.close() + return RecurringInvoiceResponse( + id=recurring.id, + customer_id=recurring.customer_id, + name=recurring.name, + description=recurring.description, + quantity=recurring.quantity, + unit_price=recurring.unit_price, + discount_percent=recurring.discount_percent, + frequency=recurring.frequency, + next_run_date=recurring.next_run_date, + end_date=recurring.end_date, + payment_terms_id=recurring.payment_terms_id, + tax_category_id=recurring.tax_category_id, + department_id=recurring.department_id, + currency=recurring.currency, + is_active=bool(recurring.is_active), + created_at=recurring.created_at, + updated_at=recurring.updated_at, + ) + +@app.post( + "/api/accounting_periods", + response_model=AccountingPeriodResponse, + summary="Create an accounting period", + description="Create an accounting_periods row representing a fiscal period.", + tags=["accounting_periods"], + operation_id="create_accounting_period", +) +async def create_accounting_period_endpoint( + body: AccountingPeriodCreateRequest = Body(...) +) -> AccountingPeriodResponse: + session = SessionLocal() + period = AccountingPeriod( + start_date=date.fromisoformat(body.start_date), + end_date=date.fromisoformat(body.end_date), + close_date=date.fromisoformat(body.close_date) if body.close_date is not None else None, + is_locked=1 if (body.is_locked if body.is_locked is not None else False) else 0, + created_at=datetime.utcnow(), + updated_at=None, + ) + session.add(period) + session.commit() + session.refresh(period) + session.close() + return AccountingPeriodResponse( + id=period.id, + start_date=period.start_date, + end_date=period.end_date, + close_date=period.close_date, + is_locked=bool(period.is_locked), + created_at=period.created_at, + updated_at=period.updated_at, + ) + +@app.patch( + "/api/accounting_periods/{period_id}", + response_model=AccountingPeriodResponse, + summary="Update an accounting period lock status", + description="Update close_date and is_locked for an accounting period.", + tags=["accounting_periods"], + operation_id="update_accounting_period_lock", +) +async def update_accounting_period_lock_endpoint( + period_id: int = Path(..., description="Accounting period ID to update", example=10001), + body: AccountingPeriodUpdateRequest = Body(...), +) -> AccountingPeriodResponse: + session = SessionLocal() + period = session.query(AccountingPeriod).filter(AccountingPeriod.id == period_id).first() + if period is None: + session.close() + return AccountingPeriodResponse( + id=0, + start_date=date.fromisoformat("1970-01-01"), + end_date=date.fromisoformat("1970-01-01"), + close_date=None, + is_locked=False, + created_at=None, + updated_at=None, + ) + if body.close_date is not None: + period.close_date = date.fromisoformat(body.close_date) + if body.close_date is None and body.close_date is not ...: + if body.close_date is None: + period.close_date = None + if body.is_locked is not None: + period.is_locked = 1 if body.is_locked else 0 + period.updated_at = datetime.utcnow() + session.commit() + session.refresh(period) + session.close() + return AccountingPeriodResponse( + id=period.id, + start_date=period.start_date, + end_date=period.end_date, + close_date=period.close_date, + is_locked=bool(period.is_locked), + created_at=period.created_at, + updated_at=period.updated_at, + ) + +@app.get( + "/api/reports/profit_and_loss", + response_model=ProfitAndLossReportResponse, + summary="Generate a profit and loss report", + description="Compute revenue, expenses, and net profit for a date range.", + tags=["reports"], + operation_id="generate_profit_and_loss", +) +async def generate_profit_and_loss_endpoint( + start_date: str = Query(..., description="Start date for the report (YYYY-MM-DD)", example="2025-01-01"), + end_date: str = Query(..., description="End date for the report (YYYY-MM-DD)", example="2025-01-31"), + department_id: Optional[int] = Query(None, description="Optional department filter to restrict results", example=2), +) -> ProfitAndLossReportResponse: + session = SessionLocal() + start = date.fromisoformat(start_date) + end = date.fromisoformat(end_date) + entries_query = session.query(JournalEntry).filter( + JournalEntry.entry_date >= start, JournalEntry.entry_date <= end + ) + if department_id is not None: + entries_query = entries_query.filter(JournalEntry.department_id == department_id) + entries = entries_query.all() + entry_ids = [e.id for e in entries] + lines_query = session.query(JournalEntryLine).filter(JournalEntryLine.journal_entry_id.in_(entry_ids)) if entry_ids else session.query(JournalEntryLine).filter(JournalEntryLine.id == -1) + if department_id is not None: + lines_query = lines_query.filter( + (JournalEntryLine.department_id == department_id) | (JournalEntryLine.department_id.is_(None)) + ) + lines = lines_query.all() + account_ids = list({l.account_id for l in lines}) + accounts = {} + if account_ids: + account_rows = session.query(Account).filter(Account.id.in_(account_ids)).all() + for a in account_rows: + accounts[a.id] = a + total_revenue = 0.0 + total_expenses = 0.0 + income_details: List[Dict[str, Optional[float]]] = [] + expense_details: List[Dict[str, Optional[float]]] = [] + income_map: Dict[int, float] = {} + expense_map: Dict[int, float] = {} + for l in lines: + a = accounts.get(l.account_id) + if a is None: + continue + net_amount = l.debit - l.credit + if a.type == "income": + amount = -net_amount + total_revenue += amount + income_map[a.id] = income_map.get(a.id, 0.0) + amount + if a.type == "expense": + amount = net_amount + total_expenses += amount + expense_map[a.id] = expense_map.get(a.id, 0.0) + amount + for aid, amt in income_map.items(): + a = accounts.get(aid) + if a is not None: + income_details.append({"account_id": float(a.id), "account_name": a.name, "amount": amt}) + for aid, amt in expense_map.items(): + a = accounts.get(aid) + if a is not None: + expense_details.append({"account_id": float(a.id), "account_name": a.name, "amount": amt}) + net_profit = total_revenue - total_expenses + session.close() + detail = { + "income_accounts": income_details, + "expense_accounts": expense_details, + } + return ProfitAndLossReportResponse( + start_date=start_date, + end_date=end_date, + department_id=department_id, + total_revenue=total_revenue, + total_expenses=total_expenses, + net_profit=net_profit, + detail=detail, + ) + +if __name__ == "__main__": + import uvicorn, os + host = os.getenv("HOST", "127.0.0.1") + port = int(os.getenv("PORT", "8000")) + uvicorn.run(app, host=host, port=port) \ No newline at end of file diff --git a/components/awm/private/tasks/awm-accounting-1-invoice/original_verifier.py b/components/awm/private/tasks/awm-accounting-1-invoice/original_verifier.py new file mode 100644 index 0000000000000000000000000000000000000000..019e2d68315d01b634129aa3499b6125cad3c817 --- /dev/null +++ b/components/awm/private/tasks/awm-accounting-1-invoice/original_verifier.py @@ -0,0 +1,145 @@ +def verify_task_completion(initial_db_path: str, final_db_path: str, final_answer: str | None = None) -> dict: + import sqlite3 + + def safe_query(db_path: str, query: str, params: tuple = ()) -> list: + try: + conn = sqlite3.connect(f"file:{db_path}?mode=ro", uri=True) + cursor = conn.cursor() + cursor.execute(query, params) + results = cursor.fetchall() + conn.close() + return results + except Exception: + return [] + + # Get customer_id for 'Acme Design Studio' + customer_query = "SELECT id FROM customers WHERE name = 'Acme Design Studio'" + customer_result = safe_query(final_db_path, customer_query) + if not customer_result: + return {"result": "others"} + customer_id = customer_result[0][0] + + # Get department_id for 'Design' + dept_query = "SELECT id FROM departments WHERE name = 'Design'" + dept_result = safe_query(final_db_path, dept_query) + if not dept_result: + return {"result": "others"} + dept_id = dept_result[0][0] + + # Get tax_category_id for 'Standard Sales Tax 8.5%' + tax_query = "SELECT id, rate FROM tax_categories WHERE name = 'Standard Sales Tax 8.5%'" + tax_result = safe_query(final_db_path, tax_query) + if not tax_result: + return {"result": "others"} + tax_category_id = tax_result[0][0] + tax_rate = tax_result[0][1] + + # Find invoices in initial state for this customer with these dates + initial_invoice_query = """SELECT id FROM invoices + WHERE customer_id = ? AND invoice_date = '2025-01-05' AND due_date = '2025-02-04' + AND department_id = ? AND tax_category_id = ?""" + initial_invoices = safe_query(initial_db_path, initial_invoice_query, + (customer_id, dept_id, tax_category_id)) + + # Find invoices in final state for this customer with these dates + final_invoice_query = """SELECT id, subtotal, tax_amount, total FROM invoices + WHERE customer_id = ? AND invoice_date = '2025-01-05' AND due_date = '2025-02-04' + AND department_id = ? AND tax_category_id = ?""" + final_invoices = safe_query(final_db_path, final_invoice_query, + (customer_id, dept_id, tax_category_id)) + + # Check if a new invoice was created + if len(final_invoices) <= len(initial_invoices): + return {"result": "others"} + + # Find the newly created invoice(s) + initial_invoice_ids = set(inv[0] for inv in initial_invoices) + new_invoices = [inv for inv in final_invoices if inv[0] not in initial_invoice_ids] + + if not new_invoices: + return {"result": "others"} + + # Check each new invoice to find one that matches our requirements + for invoice in new_invoices: + invoice_id = invoice[0] + invoice_subtotal = invoice[1] + invoice_tax = invoice[2] + invoice_total = invoice[3] + + # Get line items for this invoice + line_items_query = """SELECT description, quantity, unit_price, discount_percent, + line_subtotal, tax_amount, total, department_id + FROM invoice_line_items WHERE invoice_id = ? ORDER BY id""" + line_items = safe_query(final_db_path, line_items_query, (invoice_id,)) + + # Must have exactly 2 line items + if len(line_items) != 2: + continue + + # Check first line item: 'Logo redesign' + item1 = line_items[0] + if item1[0] != 'Logo redesign': + continue + if abs(item1[1] - 1.0) > 0.001: # quantity + continue + if abs(item1[2] - 1200.0) > 0.001: # unit_price + continue + if abs(item1[3] - 0.0) > 0.001: # discount_percent + continue + if item1[7] != dept_id: # department_id + continue + + # Calculate expected values for item1 + expected_subtotal1 = 1200.0 * 1.0 * (1 - 0.0 / 100.0) + expected_tax1 = expected_subtotal1 * tax_rate + expected_total1 = expected_subtotal1 + expected_tax1 + + if abs(item1[4] - expected_subtotal1) > 0.01: # line_subtotal + continue + if abs(item1[5] - expected_tax1) > 0.01: # tax_amount + continue + if abs(item1[6] - expected_total1) > 0.01: # total + continue + + # Check second line item: 'Brand guideline document' + item2 = line_items[1] + if item2[0] != 'Brand guideline document': + continue + if abs(item2[1] - 1.0) > 0.001: # quantity + continue + if abs(item2[2] - 800.0) > 0.001: # unit_price + continue + if abs(item2[3] - 10.0) > 0.001: # discount_percent + continue + if item2[7] != dept_id: # department_id + continue + + # Calculate expected values for item2 + expected_subtotal2 = 800.0 * 1.0 * (1 - 10.0 / 100.0) + expected_tax2 = expected_subtotal2 * tax_rate + expected_total2 = expected_subtotal2 + expected_tax2 + + if abs(item2[4] - expected_subtotal2) > 0.01: # line_subtotal + continue + if abs(item2[5] - expected_tax2) > 0.01: # tax_amount + continue + if abs(item2[6] - expected_total2) > 0.01: # total + continue + + # Verify invoice totals match sum of line items + total_subtotal = expected_subtotal1 + expected_subtotal2 + total_tax = expected_tax1 + expected_tax2 + total_amount = expected_total1 + expected_total2 + + if abs(invoice_subtotal - total_subtotal) > 0.01: + continue + if abs(invoice_tax - total_tax) > 0.01: + continue + if abs(invoice_total - total_amount) > 0.01: + continue + + # All checks passed for this invoice + return {"result": "complete"} + + # No invoice matched all requirements + return {"result": "others"} \ No newline at end of file diff --git a/components/awm/private/tasks/awm-manufacturing-1-schedule/SOURCE.json b/components/awm/private/tasks/awm-manufacturing-1-schedule/SOURCE.json new file mode 100644 index 0000000000000000000000000000000000000000..6665fd2e7baab982e51ca115e73fd36290ac850e --- /dev/null +++ b/components/awm/private/tasks/awm-manufacturing-1-schedule/SOURCE.json @@ -0,0 +1,11 @@ +{ + "repo": "Snowflake/AgentWorldModel-1K", + "revision": "dde80a0283fe781bdc51656bce57063dc5650213", + "scenario": "manufacturing_execution_system_1", + "task_idx": 5, + "task": "For job 'J-2025-0332', create three job_tasks: (1) cutting at work_center 'Laser Cutter LC-01' requiring_skill_level = 'intermediate' with planned_start '2026-01-05T08:00:00' and planned_finish '2026-01-05T10:00:00'; (2) welding at 'Weld Cell WC-02' requiring_skill_level = 'advanced' from '2026-01-05T11:00:00' to '2026-01-05T14:00:00'; and (3) painting at 'Paint Booth PB-01' requiring_skill_level = 'intermediate' from '2026-01-06T09:00:00' to '2026-01-06T11:00:00'.", + "task_id": "awm-manufacturing-1-schedule", + "license": "CC-BY-4.0", + "split": "train", + "original_format": "FastAPI through FastApiMCP 0.4.0" +} diff --git a/components/awm/private/tasks/awm-manufacturing-1-schedule/initial.db b/components/awm/private/tasks/awm-manufacturing-1-schedule/initial.db new file mode 100644 index 0000000000000000000000000000000000000000..aa5f2e2f4bde2c04adcee209edac8561ebc1819e --- /dev/null +++ b/components/awm/private/tasks/awm-manufacturing-1-schedule/initial.db @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9a523ebee8c25ca61aa43075c6263e5d3b310d39157ebddabea4cb754e610a1c +size 307200 diff --git a/components/awm/private/tasks/awm-manufacturing-1-schedule/original_api.py b/components/awm/private/tasks/awm-manufacturing-1-schedule/original_api.py new file mode 100644 index 0000000000000000000000000000000000000000..d9c68402cfcc243ee543da7292d5410ff9c4c1e1 --- /dev/null +++ b/components/awm/private/tasks/awm-manufacturing-1-schedule/original_api.py @@ -0,0 +1,1524 @@ +from fastapi import FastAPI, Query, Path, Body +from pydantic import BaseModel, Field, ConfigDict +from typing import Optional, List +from sqlalchemy import create_engine, Column, Integer, String, Float, DateTime, Date, ForeignKey, UniqueConstraint, Index, REAL +from sqlalchemy.orm import declarative_base, relationship, sessionmaker +from datetime import datetime +import os + +database_url = os.getenv("DATABASE_PATH", "sqlite:///outputs/databases/craftbench_custom_manufacturing_job_tracker.db") +engine = create_engine(database_url, connect_args={"check_same_thread": False} if database_url.startswith("sqlite") else {}) +SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) +Base = declarative_base() + +class User(Base): + __tablename__ = "users" + id = Column(Integer, primary_key=True) + username = Column(String, unique=True, nullable=False, index=True) + email = Column(String, unique=True, nullable=False, index=True) + full_name = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + +class Customer(Base): + __tablename__ = "customers" + id = Column(Integer, primary_key=True) + name = Column(String, unique=True, nullable=False, index=True) + billing_address = Column(String, nullable=False) + contact_person = Column(String) + email = Column(String) + phone = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + +class ProductTemplate(Base): + __tablename__ = "product_templates" + id = Column(Integer, primary_key=True) + name = Column(String, unique=True, nullable=False, index=True) + description = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + +class ProductTemplateOption(Base): + __tablename__ = "product_template_options" + id = Column(Integer, primary_key=True) + product_template_id = Column(Integer, ForeignKey("product_templates.id", ondelete="CASCADE"), nullable=False) + option_name = Column(String, nullable=False) + option_value = Column(String, nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + __table_args__ = (UniqueConstraint("product_template_id", "option_name", "option_value"),) + product_template = relationship("ProductTemplate", foreign_keys=[product_template_id]) + +class StandardTaskSequence(Base): + __tablename__ = "standard_task_sequences" + id = Column(Integer, primary_key=True) + product_template_id = Column(Integer, ForeignKey("product_templates.id", ondelete="CASCADE"), nullable=False) + sequence_order = Column(Integer, nullable=False) + task_name = Column(String, nullable=False) + default_planned_duration_hours = Column(REAL, nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + __table_args__ = (UniqueConstraint("product_template_id", "sequence_order"),) + product_template = relationship("ProductTemplate", foreign_keys=[product_template_id]) + +class CustomSpec(Base): + __tablename__ = "custom_specs" + id = Column(Integer, primary_key=True) + customer_id = Column(Integer, ForeignKey("customers.id", ondelete="RESTRICT"), nullable=False) + product_template_id = Column(Integer, ForeignKey("product_templates.id", ondelete="RESTRICT"), nullable=False) + notes = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + customer = relationship("Customer", foreign_keys=[customer_id]) + product_template = relationship("ProductTemplate", foreign_keys=[product_template_id]) + +class CustomSpecOption(Base): + __tablename__ = "custom_spec_options" + id = Column(Integer, primary_key=True) + custom_spec_id = Column(Integer, ForeignKey("custom_specs.id", ondelete="CASCADE"), nullable=False) + option_name = Column(String, nullable=False) + option_value = Column(String, nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + __table_args__ = (UniqueConstraint("custom_spec_id", "option_name"),) + custom_spec = relationship("CustomSpec", foreign_keys=[custom_spec_id]) + +class CustomSpecNumericParam(Base): + __tablename__ = "custom_spec_numeric_params" + id = Column(Integer, primary_key=True) + custom_spec_id = Column(Integer, ForeignKey("custom_specs.id", ondelete="CASCADE"), nullable=False) + param_name = Column(String, nullable=False) + param_value = Column(REAL, nullable=False) + unit = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + __table_args__ = (UniqueConstraint("custom_spec_id", "param_name"),) + custom_spec = relationship("CustomSpec", foreign_keys=[custom_spec_id]) + +class Quote(Base): + __tablename__ = "quotes" + id = Column(Integer, primary_key=True) + quote_number = Column(String, unique=True, nullable=False) + customer_id = Column(Integer, ForeignKey("customers.id", ondelete="RESTRICT"), nullable=False) + custom_spec_id = Column(Integer, ForeignKey("custom_specs.id", ondelete="SET NULL")) + estimated_hours = Column(REAL, nullable=False) + material_cost = Column(REAL, nullable=False) + labor_rate = Column(REAL, nullable=False) + status = Column(String, nullable=False) + internal_note = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + customer = relationship("Customer", foreign_keys=[customer_id]) + custom_spec = relationship("CustomSpec", foreign_keys=[custom_spec_id]) + +class Job(Base): + __tablename__ = "jobs" + id = Column(Integer, primary_key=True) + job_number = Column(String, unique=True, nullable=False, index=True) + customer_id = Column(Integer, ForeignKey("customers.id", ondelete="RESTRICT"), nullable=False) + quote_id = Column(Integer, ForeignKey("quotes.id", ondelete="SET NULL")) + custom_spec_id = Column(Integer, ForeignKey("custom_specs.id", ondelete="SET NULL")) + priority = Column(String, nullable=False) + due_date = Column(Date) + status = Column(String, nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + customer = relationship("Customer", foreign_keys=[customer_id]) + quote = relationship("Quote", foreign_keys=[quote_id]) + custom_spec = relationship("CustomSpec", foreign_keys=[custom_spec_id]) + +class WorkCenter(Base): + __tablename__ = "work_centers" + id = Column(Integer, primary_key=True) + name = Column(String, unique=True, nullable=False, index=True) + description = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + +class JobTask(Base): + __tablename__ = "job_tasks" + id = Column(Integer, primary_key=True) + task_code = Column(String, unique=True, nullable=False) + job_id = Column(Integer, ForeignKey("jobs.id", ondelete="CASCADE"), nullable=False) + sequence_order = Column(Integer, nullable=False) + task_name = Column(String, nullable=False) + work_center_id = Column(Integer, ForeignKey("work_centers.id", ondelete="RESTRICT"), nullable=False) + requiring_skill_level = Column(String) + planned_start = Column(DateTime) + planned_finish = Column(DateTime) + planned_duration_hours = Column(REAL) + actual_start = Column(DateTime) + actual_finish = Column(DateTime) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + __table_args__ = (UniqueConstraint("job_id", "sequence_order"),) + job = relationship("Job", foreign_keys=[job_id]) + work_center = relationship("WorkCenter", foreign_keys=[work_center_id]) + +class TimeLog(Base): + __tablename__ = "time_logs" + id = Column(Integer, primary_key=True) + job_task_id = Column(Integer, ForeignKey("job_tasks.id", ondelete="CASCADE"), nullable=False) + operator_username = Column(String, nullable=False) + work_center_id = Column(Integer, ForeignKey("work_centers.id", ondelete="RESTRICT"), nullable=False) + log_start = Column(DateTime, default=datetime.utcnow) + actual_duration_hours = Column(REAL, nullable=False) + scrap_quantity = Column(Integer, default=0) + note = Column(String) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + job_task = relationship("JobTask", foreign_keys=[job_task_id]) + work_center = relationship("WorkCenter", foreign_keys=[work_center_id]) + +class Material(Base): + __tablename__ = "materials" + id = Column(Integer, primary_key=True) + name = Column(String, unique=True, nullable=False, index=True) + unit_of_measure = Column(String, nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + +class InventoryLot(Base): + __tablename__ = "inventory_lots" + id = Column(Integer, primary_key=True) + lot_number = Column(String, unique=True, nullable=False, index=True) + material_id = Column(Integer, ForeignKey("materials.id", ondelete="RESTRICT"), nullable=False) + on_hand_quantity = Column(REAL, nullable=False) + reserved_quantity = Column(REAL, nullable=False, default=0) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + material = relationship("Material", foreign_keys=[material_id]) + +class MaterialReservation(Base): + __tablename__ = "material_reservations" + id = Column(Integer, primary_key=True) + job_id = Column(Integer, ForeignKey("jobs.id", ondelete="CASCADE"), nullable=False) + inventory_lot_id = Column(Integer, ForeignKey("inventory_lots.id", ondelete="RESTRICT"), nullable=False) + quantity = Column(REAL, nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + job = relationship("Job", foreign_keys=[job_id]) + inventory_lot = relationship("InventoryLot", foreign_keys=[inventory_lot_id]) + +class Shipment(Base): + __tablename__ = "shipments" + id = Column(Integer, primary_key=True) + shipment_number = Column(String, unique=True, nullable=False) + job_id = Column(Integer, ForeignKey("jobs.id", ondelete="RESTRICT"), nullable=False) + customer_id = Column(Integer, ForeignKey("customers.id", ondelete="RESTRICT"), nullable=False) + delivery_status = Column(String, nullable=False) + shipped_at = Column(DateTime) + delivered_at = Column(DateTime) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + job = relationship("Job", foreign_keys=[job_id]) + customer = relationship("Customer", foreign_keys=[customer_id]) + +class ShipmentPackage(Base): + __tablename__ = "shipment_packages" + id = Column(Integer, primary_key=True) + shipment_id = Column(Integer, ForeignKey("shipments.id", ondelete="CASCADE"), nullable=False) + package_number = Column(Integer, nullable=False) + weight_kg = Column(REAL, nullable=False) + tracking_number = Column(String, nullable=False) + created_at = Column(DateTime, default=datetime.utcnow) + updated_at = Column(DateTime, default=datetime.utcnow) + __table_args__ = (UniqueConstraint("shipment_id", "package_number"), UniqueConstraint("tracking_number"),) + shipment = relationship("Shipment", foreign_keys=[shipment_id]) + +Index("idx_users_username", User.username) +Index("idx_users_email", User.email) +Index("idx_customers_name", Customer.name) +Index("idx_product_templates_name", ProductTemplate.name) +Index("idx_pto_template", ProductTemplateOption.product_template_id) +Index("idx_pto_name_value", ProductTemplateOption.option_name, ProductTemplateOption.option_value) +Index("idx_sts_template", StandardTaskSequence.product_template_id) +Index("idx_custom_specs_customer", CustomSpec.customer_id) +Index("idx_custom_specs_template", CustomSpec.product_template_id) +Index("idx_quotes_customer", Quote.customer_id) +Index("idx_quotes_status", Quote.status) +Index("idx_jobs_job_number", Job.job_number) +Index("idx_jobs_customer", Job.customer_id) +Index("idx_jobs_status", Job.status) +Index("idx_jobs_due_date", Job.due_date) +Index("idx_work_centers_name", WorkCenter.name) +Index("idx_job_tasks_job", JobTask.job_id) +Index("idx_job_tasks_work_center", JobTask.work_center_id) +Index("idx_job_tasks_planned_range", JobTask.planned_start, JobTask.planned_finish) +Index("idx_time_logs_job_task", TimeLog.job_task_id) +Index("idx_time_logs_work_center", TimeLog.work_center_id) +Index("idx_time_logs_log_start", TimeLog.log_start) +Index("idx_materials_name", Material.name) +Index("idx_inventory_lots_material", InventoryLot.material_id) +Index("idx_inventory_lots_lot_number", InventoryLot.lot_number) +Index("idx_material_reservations_job", MaterialReservation.job_id) +Index("idx_material_reservations_lot", MaterialReservation.inventory_lot_id) +Index("idx_shipments_job", Shipment.job_id) +Index("idx_shipments_customer", Shipment.customer_id) +Index("idx_shipments_status", Shipment.delivery_status) +Index("idx_shipment_packages_shipment", ShipmentPackage.shipment_id) +Index("idx_shipment_packages_tracking", ShipmentPackage.tracking_number) + +Base.metadata.create_all(bind=engine) + +app = FastAPI(title="CraftBench Custom Manufacturing Job Tracker", version="1.0.0") + +class CustomerCreateRequest(BaseModel): + name: str = Field(..., description="Unique customer name", example="Acme Robotics LLC") + billing_address: str = Field(..., description="Full billing address", example="1200 Industrial Way, Dayton, OH 45402") + contact_person: Optional[str] = Field(None, description="Primary contact person name", example="Maria Santos") + email: Optional[str] = Field(None, description="Primary contact email", example="m.santos@acmerobotics.com") + phone: Optional[str] = Field(None, description="Primary contact phone", example="+1-937-555-0142") + +class CustomerResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Customer primary key", example=1) + name: str = Field(..., description="Customer name", example="Acme Robotics LLC") + billing_address: str = Field(..., description="Billing address", example="1200 Industrial Way, Dayton, OH 45402") + contact_person: Optional[str] = Field(None, description="Contact person", example="Maria Santos") + email: Optional[str] = Field(None, description="Contact email", example="m.santos@acmerobotics.com") + phone: Optional[str] = Field(None, description="Contact phone", example="+1-937-555-0142") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T10:15:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T10:15:00Z") + +class CustomersListResponse(BaseModel): + items: List[CustomerResponse] = Field(..., description="List of customers", example=[]) + total: int = Field(..., description="Total customers matching filter", example=1) + +class ProductTemplateCreateRequest(BaseModel): + name: str = Field(..., description="Unique product template name", example="Steel Workbench Pro") + description: Optional[str] = Field(None, description="Template description", example="Heavy-duty steel workbench for industrial use") + +class ProductTemplateResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Product template primary key", example=1) + name: str = Field(..., description="Template name", example="Steel Workbench Pro") + description: Optional[str] = Field(None, description="Template description", example="Heavy-duty steel workbench for industrial use") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T10:20:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T10:20:00Z") + +class ProductTemplatesListResponse(BaseModel): + items: List[ProductTemplateResponse] = Field(..., description="List of product templates", example=[]) + total: int = Field(..., description="Total templates matching filter", example=1) + +class ProductTemplateOptionCreateRequest(BaseModel): + option_name: str = Field(..., description="Name of the option", example="color") + option_value: str = Field(..., description="Allowed value for the option", example="blue") + +class ProductTemplateOptionResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Option primary key", example=1) + product_template_id: int = Field(..., description="Associated product template ID", example=1) + option_name: str = Field(..., description="Option name", example="color") + option_value: str = Field(..., description="Option value", example="blue") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T10:25:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T10:25:00Z") + +class ProductTemplateOptionsListResponse(BaseModel): + items: List[ProductTemplateOptionResponse] = Field(..., description="List of template options", example=[]) + +class StandardTaskSequenceCreateRequest(BaseModel): + sequence_order: int = Field(..., description="Order of this task in the sequence", example=1) + task_name: str = Field(..., description="Name of the task operation", example="cutting") + default_planned_duration_hours: float = Field(..., description="Default planned duration in hours", example=1.5) + +class StandardTaskSequenceResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Standard task primary key", example=1) + product_template_id: int = Field(..., description="Template ID", example=1) + sequence_order: int = Field(..., description="Sequence order index", example=1) + task_name: str = Field(..., description="Task name", example="cutting") + default_planned_duration_hours: float = Field(..., description="Planned duration in hours", example=1.5) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T10:30:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T10:30:00Z") + +class StandardTaskSequencesListResponse(BaseModel): + items: List[StandardTaskSequenceResponse] = Field(..., description="Standard task sequence steps", example=[]) + +class CustomSpecCreateRequest(BaseModel): + customer_id: int = Field(..., description="Customer ID owning the spec", example=1) + product_template_id: int = Field(..., description="Product template ID", example=1) + notes: Optional[str] = Field(None, description="Freeform notes about the custom spec", example="Blue 6ft workbench with powder coat") + +class CustomSpecResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Custom spec primary key", example=1) + customer_id: int = Field(..., description="Customer ID", example=1) + product_template_id: int = Field(..., description="Product template ID", example=1) + notes: Optional[str] = Field(None, description="Notes", example="Blue 6ft workbench with powder coat") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T10:35:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T10:35:00Z") + +class CustomSpecsListResponse(BaseModel): + items: List[CustomSpecResponse] = Field(..., description="Custom specs", example=[]) + total: int = Field(..., description="Total matching custom specs", example=1) + +class CustomSpecOptionUpsertRequest(BaseModel): + option_name: str = Field(..., description="Option name", example="color") + option_value: str = Field(..., description="Option value to store", example="blue") + +class CustomSpecOptionResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Custom spec option ID", example=1) + custom_spec_id: int = Field(..., description="Parent custom spec ID", example=1) + option_name: str = Field(..., description="Option name", example="color") + option_value: str = Field(..., description="Option value", example="blue") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T10:40:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T10:45:00Z") + +class CustomSpecOptionsListResponse(BaseModel): + items: List[CustomSpecOptionResponse] = Field(..., description="Custom spec options", example=[]) + +class CustomSpecNumericParamUpsertRequest(BaseModel): + param_name: str = Field(..., description="Parameter name", example="length") + param_value: float = Field(..., description="Numeric value", example=1830.0) + unit: Optional[str] = Field(None, description="Measurement unit", example="mm") + +class CustomSpecNumericParamResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Numeric param ID", example=1) + custom_spec_id: int = Field(..., description="Custom spec ID", example=1) + param_name: str = Field(..., description="Parameter name", example="length") + param_value: float = Field(..., description="Parameter value", example=1830.0) + unit: Optional[str] = Field(None, description="Parameter unit", example="mm") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T10:45:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T10:50:00Z") + +class CustomSpecNumericParamsListResponse(BaseModel): + items: List[CustomSpecNumericParamResponse] = Field(..., description="Numeric parameters", example=[]) + +class QuoteCreateRequest(BaseModel): + quote_number: str = Field(..., description="Unique quote number", example="Q-2025-0147") + customer_id: int = Field(..., description="Customer ID for this quote", example=1) + custom_spec_id: Optional[int] = Field(None, description="Linked custom spec ID", example=1) + estimated_hours: float = Field(..., description="Estimated labor hours", example=12.0) + material_cost: float = Field(..., description="Estimated material cost", example=420.0) + labor_rate: float = Field(..., description="Labor rate per hour", example=65.0) + status: str = Field(..., description="Quote status", example="sent") + internal_note: Optional[str] = Field(None, description="Internal reference note", example="Rush order requested") + +class QuoteResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Quote ID", example=1) + quote_number: str = Field(..., description="Quote number", example="Q-2025-0147") + customer_id: int = Field(..., description="Customer ID", example=1) + custom_spec_id: Optional[int] = Field(None, description="Custom spec ID or null", example=1) + estimated_hours: float = Field(..., description="Estimated hours", example=12.0) + material_cost: float = Field(..., description="Material cost", example=420.0) + labor_rate: float = Field(..., description="Labor rate", example=65.0) + status: str = Field(..., description="Quote status", example="sent") + internal_note: Optional[str] = Field(None, description="Internal note", example="Rush order requested") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T10:55:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T10:55:00Z") + +class QuotesListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Quote ID", example=1) + quote_number: str = Field(..., description="Quote number", example="Q-2025-0147") + customer_id: int = Field(..., description="Customer ID", example=1) + status: str = Field(..., description="Quote status", example="accepted") + estimated_hours: float = Field(..., description="Estimated hours", example=12.0) + material_cost: float = Field(..., description="Material cost", example=420.0) + labor_rate: float = Field(..., description="Labor rate", example=65.0) + +class QuotesListResponse(BaseModel): + items: List[QuotesListItemResponse] = Field(..., description="Quotes", example=[]) + total: int = Field(..., description="Total matching quotes", example=1) + +class QuoteUpdateRequest(BaseModel): + status: Optional[str] = Field(None, description="New status for the quote", example="sent") + internal_note: Optional[str] = Field(None, description="Updated internal note", example="Customer confirmed") + +class QuoteUpdateResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Quote ID", example=1) + quote_number: str = Field(..., description="Quote number", example="Q-2025-0147") + status: str = Field(..., description="Updated status", example="sent") + internal_note: Optional[str] = Field(None, description="Updated note", example="Customer confirmed") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-02T09:00:00Z") + +class JobCreateRequest(BaseModel): + job_number: str = Field(..., description="Unique job number", example="J-2025-0332") + customer_id: int = Field(..., description="Customer ID", example=1) + quote_id: Optional[int] = Field(None, description="Linked quote ID", example=1) + custom_spec_id: Optional[int] = Field(None, description="Linked custom spec ID", example=1) + priority: str = Field(..., description="Job priority", example="high") + due_date: Optional[datetime] = Field(None, description="Job due date (YYYY-MM-DD)", example="2026-01-20T00:00:00") + status: str = Field(..., description="Job status", example="planned") + +class JobResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Job ID", example=1) + job_number: str = Field(..., description="Job number", example="J-2025-0332") + customer_id: int = Field(..., description="Customer ID", example=1) + quote_id: Optional[int] = Field(None, description="Quote ID", example=1) + custom_spec_id: Optional[int] = Field(None, description="Custom spec ID", example=1) + priority: str = Field(..., description="Job priority", example="high") + due_date: Optional[datetime] = Field(None, description="Due date", example="2026-01-20T00:00:00") + status: str = Field(..., description="Job status", example="planned") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T11:00:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T11:00:00Z") + +class JobsListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Job ID", example=1) + job_number: str = Field(..., description="Job number", example="J-2025-0332") + customer_id: int = Field(..., description="Customer ID", example=1) + status: str = Field(..., description="Job status", example="planned") + priority: str = Field(..., description="Job priority", example="high") + due_date: Optional[datetime] = Field(None, description="Due date", example="2026-01-20T00:00:00") + +class JobsListResponse(BaseModel): + items: List[JobsListItemResponse] = Field(..., description="Jobs", example=[]) + total: int = Field(..., description="Total matching jobs", example=1) + +class JobUpdateRequest(BaseModel): + status: Optional[str] = Field(None, description="New job status", example="shipped") + priority: Optional[str] = Field(None, description="New job priority", example="high") + due_date: Optional[datetime] = Field(None, description="Updated job due date", example="2026-01-22T00:00:00") + +class JobUpdateResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Job ID", example=1) + job_number: str = Field(..., description="Job number", example="J-2025-0279") + status: str = Field(..., description="Updated status", example="shipped") + priority: str = Field(..., description="Updated priority", example="high") + due_date: Optional[datetime] = Field(None, description="Updated due date", example="2026-01-22T00:00:00") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-02T10:00:00Z") + +class WorkCenterCreateRequest(BaseModel): + name: str = Field(..., description="Unique work center name", example="Laser Cutter LC-01") + description: Optional[str] = Field(None, description="Description of the work center", example="High power laser cutting machine") + +class WorkCenterResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Work center ID", example=1) + name: str = Field(..., description="Work center name", example="Laser Cutter LC-01") + description: Optional[str] = Field(None, description="Work center description", example="High power laser cutting machine") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T11:10:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T11:10:00Z") + +class WorkCentersListResponse(BaseModel): + items: List[WorkCenterResponse] = Field(..., description="Work centers", example=[]) + +class JobTaskCreateRequest(BaseModel): + task_code: str = Field(..., description="Unique task code", example="JT-8793") + job_id: int = Field(..., description="Associated job ID", example=1) + sequence_order: int = Field(..., description="Order within the job sequence", example=1) + task_name: str = Field(..., description="Task operation name", example="cutting") + work_center_id: int = Field(..., description="Work center ID for this task", example=1) + requiring_skill_level: Optional[str] = Field(None, description="Required operator skill level", example="intermediate") + planned_start: Optional[datetime] = Field(None, description="Planned start datetime in ISO8601", example="2026-01-05T08:00:00") + planned_finish: Optional[datetime] = Field(None, description="Planned finish datetime in ISO8601", example="2026-01-05T10:00:00") + planned_duration_hours: Optional[float] = Field(None, description="Planned duration in hours", example=2.0) + +class JobTaskResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Job task ID", example=1) + task_code: str = Field(..., description="Unique task code", example="JT-8793") + job_id: int = Field(..., description="Job ID", example=1) + sequence_order: int = Field(..., description="Sequence order", example=1) + task_name: str = Field(..., description="Task name", example="cutting") + work_center_id: int = Field(..., description="Work center ID", example=1) + requiring_skill_level: Optional[str] = Field(None, description="Required skill level", example="intermediate") + planned_start: Optional[datetime] = Field(None, description="Planned start datetime", example="2026-01-05T08:00:00") + planned_finish: Optional[datetime] = Field(None, description="Planned finish datetime", example="2026-01-05T10:00:00") + planned_duration_hours: Optional[float] = Field(None, description="Planned duration hours", example=2.0) + actual_start: Optional[datetime] = Field(None, description="Actual start datetime or null", example=None) + actual_finish: Optional[datetime] = Field(None, description="Actual finish datetime or null", example=None) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T11:15:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T11:15:00Z") + +class JobTasksListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Task ID", example=1) + task_code: str = Field(..., description="Task code", example="JT-8793") + job_id: int = Field(..., description="Job ID", example=1) + sequence_order: int = Field(..., description="Sequence order", example=1) + task_name: str = Field(..., description="Task name", example="cutting") + work_center_id: int = Field(..., description="Work center ID", example=1) + planned_start: Optional[datetime] = Field(None, description="Planned start", example="2026-01-05T08:00:00") + planned_finish: Optional[datetime] = Field(None, description="Planned finish", example="2026-01-05T10:00:00") + planned_duration_hours: Optional[float] = Field(None, description="Planned duration", example=2.0) + +class JobTasksListResponse(BaseModel): + items: List[JobTasksListItemResponse] = Field(..., description="Job tasks", example=[]) + total: int = Field(..., description="Total matching tasks", example=3) + +class TimeLogCreateRequest(BaseModel): + job_task_id: int = Field(..., description="Job task ID being logged", example=1) + operator_username: str = Field(..., description="Username of the operator", example="op_jwilliams") + work_center_id: int = Field(..., description="Work center ID where work was performed", example=2) + log_start: Optional[datetime] = Field(None, description="Start datetime of the log; defaults to now", example="2026-01-05T11:05:00") + actual_duration_hours: float = Field(..., description="Actual duration in hours", example=2.4) + scrap_quantity: Optional[int] = Field(None, description="Quantity scrapped during this log", example=1) + note: Optional[str] = Field(None, description="Notes about the work performed", example="Rewelded one bracket") + +class TimeLogResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Time log ID", example=1) + job_task_id: int = Field(..., description="Job task ID", example=1) + operator_username: str = Field(..., description="Operator username", example="op_jwilliams") + work_center_id: int = Field(..., description="Work center ID", example=2) + log_start: Optional[datetime] = Field(None, description="Log start datetime", example="2026-01-05T11:05:00") + actual_duration_hours: float = Field(..., description="Actual duration hours", example=2.4) + scrap_quantity: Optional[int] = Field(None, description="Scrap quantity", example=1) + note: Optional[str] = Field(None, description="Log note", example="Rewelded one bracket") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2026-01-05T13:50:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2026-01-05T13:50:00Z") + +class TimeLogsListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Time log ID", example=1) + job_task_id: int = Field(..., description="Job task ID", example=1) + operator_username: str = Field(..., description="Operator username", example="op_jwilliams") + work_center_id: int = Field(..., description="Work center ID", example=2) + log_start: Optional[datetime] = Field(None, description="Log start datetime", example="2026-01-05T11:05:00") + actual_duration_hours: float = Field(..., description="Duration hours", example=2.4) + scrap_quantity: Optional[int] = Field(None, description="Scrap quantity", example=1) + +class TimeLogsListResponse(BaseModel): + items: List[TimeLogsListItemResponse] = Field(..., description="Time logs", example=[]) + total: int = Field(..., description="Total matching time logs", example=5) + +class MaterialCreateRequest(BaseModel): + name: str = Field(..., description="Unique material name", example="Cold Rolled Steel Sheet 2mm") + unit_of_measure: str = Field(..., description="Unit of measure", example="kg") + +class MaterialResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Material ID", example=1) + name: str = Field(..., description="Material name", example="Cold Rolled Steel Sheet 2mm") + unit_of_measure: str = Field(..., description="Unit of measure", example="kg") + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T11:25:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T11:25:00Z") + +class MaterialsListResponse(BaseModel): + items: List[MaterialResponse] = Field(..., description="Materials", example=[]) + +class InventoryLotCreateRequest(BaseModel): + lot_number: str = Field(..., description="Unique lot identifier", example="LOT-CRS-2401") + material_id: int = Field(..., description="Associated material ID", example=1) + on_hand_quantity: float = Field(..., description="Initial on hand quantity", example=1000.0) + reserved_quantity: Optional[float] = Field(0.0, description="Initial reserved quantity", example=0.0) + +class InventoryLotResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Inventory lot ID", example=1) + lot_number: str = Field(..., description="Lot number", example="LOT-CRS-2401") + material_id: int = Field(..., description="Material ID", example=1) + on_hand_quantity: float = Field(..., description="On hand quantity", example=1000.0) + reserved_quantity: float = Field(..., description="Reserved quantity", example=150.0) + created_at: Optional[datetime] = Field(None, description="Creation time", example="2025-01-01T11:30:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update time", example="2025-01-01T11:30:00Z") + +class InventoryLotsListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Lot ID", example=1) + lot_number: str = Field(..., description="Lot number", example="LOT-CRS-2401") + material_id: int = Field(..., description="Material ID", example=1) + on_hand_quantity: float = Field(..., description="On hand quantity", example=850.0) + reserved_quantity: float = Field(..., description="Reserved quantity", example=150.0) + +class InventoryLotsListResponse(BaseModel): + items: List[InventoryLotsListItemResponse] = Field(..., description="Inventory lots", example=[]) + +class InventoryLotAdjustRequest(BaseModel): + on_hand_delta: Optional[float] = Field(None, description="Delta to apply to on_hand_quantity", example=-150.0) + reserved_delta: Optional[float] = Field(None, description="Delta to apply to reserved_quantity", example=150.0) + +class InventoryLotAdjustResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Inventory lot ID", example=1) + lot_number: str = Field(..., description="Lot number", example="LOT-CRS-2401") + on_hand_quantity: float = Field(..., description="Updated on hand quantity", example=850.0) + reserved_quantity: float = Field(..., description="Updated reserved quantity", example=150.0) + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-02T09:00:00Z") + +class MaterialReservationCreateRequest(BaseModel): + job_id: int = Field(..., description="Job ID that is reserving material", example=1) + inventory_lot_id: int = Field(..., description="Inventory lot ID to reserve from", example=1) + quantity: float = Field(..., description="Quantity to reserve", example=150.0) + +class MaterialReservationResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Material reservation ID", example=1) + job_id: int = Field(..., description="Job ID", example=1) + inventory_lot_id: int = Field(..., description="Inventory lot ID", example=1) + quantity: float = Field(..., description="Reserved quantity", example=150.0) + created_at: Optional[datetime] = Field(None, description="Creation timestamp", example="2025-01-01T11:35:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update timestamp", example="2025-01-01T11:35:00Z") + +class MaterialReservationsListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Reservation ID", example=1) + job_id: int = Field(..., description="Job ID", example=1) + inventory_lot_id: int = Field(..., description="Inventory lot ID", example=1) + quantity: float = Field(..., description="Reserved quantity", example=150.0) + +class MaterialReservationsListResponse(BaseModel): + items: List[MaterialReservationsListItemResponse] = Field(..., description="Material reservations", example=[]) + +class ShipmentCreateRequest(BaseModel): + shipment_number: str = Field(..., description="Unique shipment number", example="SHP-2025-0101") + job_id: int = Field(..., description="Job ID being shipped", example=1) + customer_id: int = Field(..., description="Customer receiving the shipment", example=1) + delivery_status: str = Field(..., description="Shipment status", example="in_transit") + shipped_at: Optional[datetime] = Field(None, description="Datetime when shipment left the facility", example="2026-01-10T15:00:00") + delivered_at: Optional[datetime] = Field(None, description="Datetime when shipment was delivered", example=None) + +class ShipmentResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Shipment ID", example=1) + shipment_number: str = Field(..., description="Shipment number", example="SHP-2025-0101") + job_id: int = Field(..., description="Job ID", example=1) + customer_id: int = Field(..., description="Customer ID", example=1) + delivery_status: str = Field(..., description="Shipment status", example="in_transit") + shipped_at: Optional[datetime] = Field(None, description="Shipped datetime", example="2026-01-10T15:00:00") + delivered_at: Optional[datetime] = Field(None, description="Delivered datetime or null", example=None) + created_at: Optional[datetime] = Field(None, description="Creation time", example="2026-01-10T15:05:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update time", example="2026-01-10T15:05:00Z") + +class ShipmentsListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Shipment ID", example=1) + shipment_number: str = Field(..., description="Shipment number", example="SHP-2025-0101") + job_id: int = Field(..., description="Job ID", example=1) + customer_id: int = Field(..., description="Customer ID", example=1) + delivery_status: str = Field(..., description="Shipment status", example="in_transit") + +class ShipmentsListResponse(BaseModel): + items: List[ShipmentsListItemResponse] = Field(..., description="Shipments", example=[]) + +class ShipmentUpdateRequest(BaseModel): + delivery_status: Optional[str] = Field(None, description="New delivery status", example="delivered") + shipped_at: Optional[datetime] = Field(None, description="Updated shipped_at datetime", example="2026-01-10T15:00:00") + delivered_at: Optional[datetime] = Field(None, description="Updated delivered_at datetime", example="2026-01-15T11:30:00") + +class ShipmentUpdateResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Shipment ID", example=1) + shipment_number: str = Field(..., description="Shipment number", example="SHP-2025-0101") + delivery_status: str = Field(..., description="Updated delivery status", example="delivered") + shipped_at: Optional[datetime] = Field(None, description="Shipped datetime", example="2026-01-10T15:00:00") + delivered_at: Optional[datetime] = Field(None, description="Delivered datetime", example="2026-01-15T11:30:00") + updated_at: Optional[datetime] = Field(None, description="Last update time", example="2026-01-15T11:35:00Z") + +class ShipmentPackageCreateRequest(BaseModel): + shipment_id: int = Field(..., description="Shipment ID that this package belongs to", example=1) + package_number: int = Field(..., description="Sequential package number within the shipment", example=1) + weight_kg: float = Field(..., description="Weight of the package in kg", example=45.0) + tracking_number: str = Field(..., description="Unique tracking number", example="CBX123456US") + +class ShipmentPackageResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Shipment package ID", example=1) + shipment_id: int = Field(..., description="Shipment ID", example=1) + package_number: int = Field(..., description="Package number within shipment", example=1) + weight_kg: float = Field(..., description="Package weight in kg", example=45.0) + tracking_number: str = Field(..., description="Tracking number", example="CBX123456US") + created_at: Optional[datetime] = Field(None, description="Creation time", example="2026-01-10T15:10:00Z") + updated_at: Optional[datetime] = Field(None, description="Last update time", example="2026-01-10T15:10:00Z") + +class ShipmentPackagesListItemResponse(BaseModel): + model_config = ConfigDict(from_attributes=True) + id: int = Field(..., description="Package ID", example=1) + shipment_id: int = Field(..., description="Shipment ID", example=1) + package_number: int = Field(..., description="Package number", example=1) + weight_kg: float = Field(..., description="Weight in kg", example=38.5) + tracking_number: str = Field(..., description="Tracking number", example="CBX123457US") + +class ShipmentPackagesListResponse(BaseModel): + items: List[ShipmentPackagesListItemResponse] = Field(..., description="Shipment packages", example=[]) + +class CapacityTaskItem(BaseModel): + job_task_id: int = Field(..., description="Job task ID", example=10) + task_code: str = Field(..., description="Task code", example="JT-8801") + job_id: int = Field(..., description="Job ID", example=5) + task_name: str = Field(..., description="Task name", example="cutting") + planned_start: Optional[datetime] = Field(None, description="Planned start datetime", example="2026-01-05T08:00:00") + planned_finish: Optional[datetime] = Field(None, description="Planned finish datetime", example="2026-01-05T10:00:00") + planned_duration_hours: Optional[float] = Field(None, description="Planned hours for this task", example=2.0) + actual_hours: float = Field(..., description="Sum of actual_duration_hours from time_logs", example=1.8) + +class CapacityUtilizationResponse(BaseModel): + work_center_id: int = Field(..., description="Analyzed work center ID", example=1) + planned_from: datetime = Field(..., description="Start of analysis window", example="2026-01-01T00:00:00") + planned_to: datetime = Field(..., description="End of analysis window", example="2026-01-31T23:59:59") + total_planned_hours: float = Field(..., description="Sum of planned_duration_hours", example=120.0) + total_actual_hours: float = Field(..., description="Sum of actual_duration_hours", example=98.5) + job_tasks: List[CapacityTaskItem] = Field(..., description="Job tasks scheduled in the period", example=[]) + +@app.post("/api/customers", response_model=CustomerResponse, summary="Create a new customer", description="Add a new customer with billing and contact details", tags=["customers"], operation_id="create_customer") +async def create_customer(request: CustomerCreateRequest = Body(...)) -> CustomerResponse: + session = SessionLocal() + obj = Customer( + name=request.name, + billing_address=request.billing_address, + contact_person=request.contact_person, + email=request.email, + phone=request.phone, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return CustomerResponse.model_validate(obj) + +@app.get("/api/customers", response_model=CustomersListResponse, summary="List customers with optional name filter", description="Retrieve customers, optionally filtering by exact or partial name", tags=["customers"], operation_id="list_customers") +async def list_customers(name: Optional[str] = Query(None, description="Filter by name containing this text", example="Acme"), limit: Optional[int] = Query(50, description="Maximum records to return", example=50), offset: Optional[int] = Query(0, description="Offset for pagination", example=0)) -> CustomersListResponse: + session = SessionLocal() + query = session.query(Customer) + if name is not None: + query = query.filter(Customer.name.contains(name)) + total = query.count() + objs = query.offset(offset).limit(limit).all() + items = [CustomerResponse.model_validate(o) for o in objs] + session.close() + return CustomersListResponse(items=items, total=total) + +@app.get("/api/customers/{customer_id}", response_model=CustomerResponse, summary="Get a customer by ID", description="Retrieve a single customer record by its numeric ID", tags=["customers"], operation_id="get_customer_by_id") +async def get_customer_by_id(customer_id: int = Path(..., description="Customer primary key ID", example=1)) -> CustomerResponse: + session = SessionLocal() + obj = session.query(Customer).filter(Customer.id == customer_id).first() + session.close() + if obj is None: + return CustomerResponse(id=0, name="", billing_address="", contact_person=None, email=None, phone=None, created_at=None, updated_at=None) + return CustomerResponse.model_validate(obj) + +@app.get("/api/customers/by-name/{customer_name}", response_model=CustomerResponse, summary="Get a customer by exact name", description="Lookup a single customer using its unique name", tags=["customers"], operation_id="get_customer_by_name") +async def get_customer_by_name(customer_name: str = Path(..., description="Exact customer name to lookup", example="Acme Robotics LLC")) -> CustomerResponse: + session = SessionLocal() + obj = session.query(Customer).filter(Customer.name == customer_name).first() + session.close() + if obj is None: + return CustomerResponse(id=0, name="", billing_address="", contact_person=None, email=None, phone=None, created_at=None, updated_at=None) + return CustomerResponse.model_validate(obj) + +@app.post("/api/product-templates", response_model=ProductTemplateResponse, summary="Create a new product template", description="Define a new product template record with optional description", tags=["product_templates"], operation_id="create_product_template") +async def create_product_template(request: ProductTemplateCreateRequest = Body(...)) -> ProductTemplateResponse: + session = SessionLocal() + obj = ProductTemplate( + name=request.name, + description=request.description, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return ProductTemplateResponse.model_validate(obj) + +@app.get("/api/product-templates", response_model=ProductTemplatesListResponse, summary="List product templates", description="Retrieve product templates with optional name filter", tags=["product_templates"], operation_id="list_product_templates") +async def list_product_templates(name: Optional[str] = Query(None, description="Filter templates containing this name", example="Workbench"), limit: Optional[int] = Query(50, description="Max number of templates to return", example=50), offset: Optional[int] = Query(0, description="Offset for pagination", example=0)) -> ProductTemplatesListResponse: + session = SessionLocal() + query = session.query(ProductTemplate) + if name is not None: + query = query.filter(ProductTemplate.name.contains(name)) + total = query.count() + objs = query.offset(offset).limit(limit).all() + items = [ProductTemplateResponse.model_validate(o) for o in objs] + session.close() + return ProductTemplatesListResponse(items=items, total=total) + +@app.get("/api/product-templates/{product_template_id}", response_model=ProductTemplateResponse, summary="Get product template by ID", description="Retrieve a single product template using its ID", tags=["product_templates"], operation_id="get_product_template_by_id") +async def get_product_template_by_id(product_template_id: int = Path(..., description="Product template ID", example=1)) -> ProductTemplateResponse: + session = SessionLocal() + obj = session.query(ProductTemplate).filter(ProductTemplate.id == product_template_id).first() + session.close() + if obj is None: + return ProductTemplateResponse(id=0, name="", description=None, created_at=None, updated_at=None) + return ProductTemplateResponse.model_validate(obj) + +@app.get("/api/product-templates/by-name/{template_name}", response_model=ProductTemplateResponse, summary="Get product template by exact name", description="Lookup a product template using its unique name", tags=["product_templates"], operation_id="get_product_template_by_name") +async def get_product_template_by_name(template_name: str = Path(..., description="Exact product template name", example="Steel Workbench Pro")) -> ProductTemplateResponse: + session = SessionLocal() + obj = session.query(ProductTemplate).filter(ProductTemplate.name == template_name).first() + session.close() + if obj is None: + return ProductTemplateResponse(id=0, name="", description=None, created_at=None, updated_at=None) + return ProductTemplateResponse.model_validate(obj) + +@app.post("/api/product-templates/{product_template_id}/options", response_model=ProductTemplateOptionResponse, summary="Create an option for a product template", description="Add a single option value for a given product template", tags=["product_template_options"], operation_id="create_product_template_option") +async def create_product_template_option(product_template_id: int = Path(..., description="Parent product template ID", example=1), request: ProductTemplateOptionCreateRequest = Body(...)) -> ProductTemplateOptionResponse: + session = SessionLocal() + obj = ProductTemplateOption( + product_template_id=product_template_id, + option_name=request.option_name, + option_value=request.option_value, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return ProductTemplateOptionResponse.model_validate(obj) + +@app.get("/api/product-templates/{product_template_id}/options", response_model=ProductTemplateOptionsListResponse, summary="List options for a product template", description="Retrieve all option values for a specific product template", tags=["product_template_options"], operation_id="list_product_template_options") +async def list_product_template_options(product_template_id: int = Path(..., description="Product template ID", example=1), option_name: Optional[str] = Query(None, description="Filter by option name", example="color")) -> ProductTemplateOptionsListResponse: + session = SessionLocal() + query = session.query(ProductTemplateOption).filter(ProductTemplateOption.product_template_id == product_template_id) + if option_name is not None: + query = query.filter(ProductTemplateOption.option_name == option_name) + objs = query.all() + items = [ProductTemplateOptionResponse.model_validate(o) for o in objs] + session.close() + return ProductTemplateOptionsListResponse(items=items) + +@app.post("/api/product-templates/{product_template_id}/standard-tasks", response_model=StandardTaskSequenceResponse, summary="Create a standard task for a template", description="Add a single task step into a product template's standard sequence", tags=["standard_task_sequences"], operation_id="create_standard_task_sequence") +async def create_standard_task_sequence(product_template_id: int = Path(..., description="Product template ID", example=1), request: StandardTaskSequenceCreateRequest = Body(...)) -> StandardTaskSequenceResponse: + session = SessionLocal() + obj = StandardTaskSequence( + product_template_id=product_template_id, + sequence_order=request.sequence_order, + task_name=request.task_name, + default_planned_duration_hours=request.default_planned_duration_hours, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return StandardTaskSequenceResponse.model_validate(obj) + +@app.get("/api/product-templates/{product_template_id}/standard-tasks", response_model=StandardTaskSequencesListResponse, summary="List standard tasks for a template", description="Retrieve all standard tasks for a product template ordered by sequence", tags=["standard_task_sequences"], operation_id="list_standard_task_sequences") +async def list_standard_task_sequences(product_template_id: int = Path(..., description="Product template ID", example=1)) -> StandardTaskSequencesListResponse: + session = SessionLocal() + objs = session.query(StandardTaskSequence).filter(StandardTaskSequence.product_template_id == product_template_id).order_by(StandardTaskSequence.sequence_order.asc()).all() + items = [StandardTaskSequenceResponse.model_validate(o) for o in objs] + session.close() + return StandardTaskSequencesListResponse(items=items) + +@app.post("/api/custom-specs", response_model=CustomSpecResponse, summary="Create a custom specification", description="Create a custom specification linking a customer and product template", tags=["custom_specs"], operation_id="create_custom_spec") +async def create_custom_spec(request: CustomSpecCreateRequest = Body(...)) -> CustomSpecResponse: + session = SessionLocal() + obj = CustomSpec( + customer_id=request.customer_id, + product_template_id=request.product_template_id, + notes=request.notes, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return CustomSpecResponse.model_validate(obj) + +@app.get("/api/custom-specs", response_model=CustomSpecsListResponse, summary="List custom specs", description="List custom specs with optional filters by customer or product template", tags=["custom_specs"], operation_id="list_custom_specs") +async def list_custom_specs(customer_id: Optional[int] = Query(None, description="Filter by customer ID", example=1), product_template_id: Optional[int] = Query(None, description="Filter by product template ID", example=1), limit: Optional[int] = Query(50, description="Max records to return", example=50), offset: Optional[int] = Query(0, description="Offset for pagination", example=0)) -> CustomSpecsListResponse: + session = SessionLocal() + query = session.query(CustomSpec) + if customer_id is not None: + query = query.filter(CustomSpec.customer_id == customer_id) + if product_template_id is not None: + query = query.filter(CustomSpec.product_template_id == product_template_id) + total = query.count() + objs = query.offset(offset).limit(limit).all() + items = [CustomSpecResponse.model_validate(o) for o in objs] + session.close() + return CustomSpecsListResponse(items=items, total=total) + +@app.get("/api/custom-specs/{custom_spec_id}", response_model=CustomSpecResponse, summary="Get custom spec by ID", description="Retrieve a single custom spec by its ID", tags=["custom_specs"], operation_id="get_custom_spec_by_id") +async def get_custom_spec_by_id(custom_spec_id: int = Path(..., description="Custom spec ID", example=1)) -> CustomSpecResponse: + session = SessionLocal() + obj = session.query(CustomSpec).filter(CustomSpec.id == custom_spec_id).first() + session.close() + if obj is None: + return CustomSpecResponse(id=0, customer_id=0, product_template_id=0, notes=None, created_at=None, updated_at=None) + return CustomSpecResponse.model_validate(obj) + +@app.post("/api/custom-specs/{custom_spec_id}/options", response_model=CustomSpecOptionResponse, summary="Create or update a custom spec option", description="Set a named option value for a custom spec, upserting by option name", tags=["custom_spec_options"], operation_id="upsert_custom_spec_option") +async def upsert_custom_spec_option(custom_spec_id: int = Path(..., description="Custom spec ID", example=1), request: CustomSpecOptionUpsertRequest = Body(...)) -> CustomSpecOptionResponse: + session = SessionLocal() + obj = session.query(CustomSpecOption).filter(CustomSpecOption.custom_spec_id == custom_spec_id, CustomSpecOption.option_name == request.option_name).first() + now = datetime.utcnow() + if obj is None: + obj = CustomSpecOption( + custom_spec_id=custom_spec_id, + option_name=request.option_name, + option_value=request.option_value, + created_at=now, + updated_at=now, + ) + session.add(obj) + else: + obj.option_value = request.option_value + obj.updated_at = now + session.commit() + session.refresh(obj) + session.close() + return CustomSpecOptionResponse.model_validate(obj) + +@app.get("/api/custom-specs/{custom_spec_id}/options", response_model=CustomSpecOptionsListResponse, summary="List options for a custom spec", description="Retrieve all option name/value pairs for a custom spec", tags=["custom_spec_options"], operation_id="list_custom_spec_options") +async def list_custom_spec_options(custom_spec_id: int = Path(..., description="Custom spec ID", example=1)) -> CustomSpecOptionsListResponse: + session = SessionLocal() + objs = session.query(CustomSpecOption).filter(CustomSpecOption.custom_spec_id == custom_spec_id).all() + items = [CustomSpecOptionResponse.model_validate(o) for o in objs] + session.close() + return CustomSpecOptionsListResponse(items=items) + +@app.post("/api/custom-specs/{custom_spec_id}/numeric-params", response_model=CustomSpecNumericParamResponse, summary="Create or update a numeric param", description="Set a numeric parameter with unit for a custom spec, upserting by name", tags=["custom_spec_numeric_params"], operation_id="upsert_custom_spec_numeric_param") +async def upsert_custom_spec_numeric_param(custom_spec_id: int = Path(..., description="Custom spec ID", example=1), request: CustomSpecNumericParamUpsertRequest = Body(...)) -> CustomSpecNumericParamResponse: + session = SessionLocal() + obj = session.query(CustomSpecNumericParam).filter(CustomSpecNumericParam.custom_spec_id == custom_spec_id, CustomSpecNumericParam.param_name == request.param_name).first() + now = datetime.utcnow() + if obj is None: + obj = CustomSpecNumericParam( + custom_spec_id=custom_spec_id, + param_name=request.param_name, + param_value=request.param_value, + unit=request.unit, + created_at=now, + updated_at=now, + ) + session.add(obj) + else: + obj.param_value = request.param_value + obj.unit = request.unit + obj.updated_at = now + session.commit() + session.refresh(obj) + session.close() + return CustomSpecNumericParamResponse.model_validate(obj) + +@app.get("/api/custom-specs/{custom_spec_id}/numeric-params", response_model=CustomSpecNumericParamsListResponse, summary="List numeric params for a custom spec", description="Retrieve all numeric parameters and units for a custom spec", tags=["custom_spec_numeric_params"], operation_id="list_custom_spec_numeric_params") +async def list_custom_spec_numeric_params(custom_spec_id: int = Path(..., description="Custom spec ID", example=1)) -> CustomSpecNumericParamsListResponse: + session = SessionLocal() + objs = session.query(CustomSpecNumericParam).filter(CustomSpecNumericParam.custom_spec_id == custom_spec_id).all() + items = [CustomSpecNumericParamResponse.model_validate(o) for o in objs] + session.close() + return CustomSpecNumericParamsListResponse(items=items) + +@app.post("/api/quotes", response_model=QuoteResponse, summary="Create a quote", description="Create a quote linked to a customer and optional custom spec", tags=["quotes"], operation_id="create_quote") +async def create_quote(request: QuoteCreateRequest = Body(...)) -> QuoteResponse: + session = SessionLocal() + obj = Quote( + quote_number=request.quote_number, + customer_id=request.customer_id, + custom_spec_id=request.custom_spec_id, + estimated_hours=request.estimated_hours, + material_cost=request.material_cost, + labor_rate=request.labor_rate, + status=request.status, + internal_note=request.internal_note, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return QuoteResponse.model_validate(obj) + +@app.get("/api/quotes", response_model=QuotesListResponse, summary="List quotes with filters", description="Retrieve quotes filtered by customer, status, or quote number", tags=["quotes"], operation_id="list_quotes") +async def list_quotes(quote_number: Optional[str] = Query(None, description="Filter by exact quote number", example="Q-2025-0147"), customer_id: Optional[int] = Query(None, description="Filter by customer ID", example=1), status: Optional[str] = Query(None, description="Filter by quote status", example="accepted"), limit: Optional[int] = Query(50, description="Max records to return", example=50), offset: Optional[int] = Query(0, description="Offset for pagination", example=0)) -> QuotesListResponse: + session = SessionLocal() + query = session.query(Quote) + if quote_number is not None: + query = query.filter(Quote.quote_number == quote_number) + if customer_id is not None: + query = query.filter(Quote.customer_id == customer_id) + if status is not None: + query = query.filter(Quote.status == status) + total = query.count() + objs = query.offset(offset).limit(limit).all() + items = [QuotesListItemResponse.model_validate(o) for o in objs] + session.close() + return QuotesListResponse(items=items, total=total) + +@app.get("/api/quotes/by-number/{quote_number}", response_model=QuoteResponse, summary="Get quote by quote number", description="Retrieve a single quote by its unique quote_number", tags=["quotes"], operation_id="get_quote_by_number") +async def get_quote_by_number(quote_number: str = Path(..., description="Exact quote number to lookup", example="Q-2025-0147")) -> QuoteResponse: + session = SessionLocal() + obj = session.query(Quote).filter(Quote.quote_number == quote_number).first() + session.close() + if obj is None: + return QuoteResponse(id=0, quote_number="", customer_id=0, custom_spec_id=None, estimated_hours=0.0, material_cost=0.0, labor_rate=0.0, status="", internal_note=None, created_at=None, updated_at=None) + return QuoteResponse.model_validate(obj) + +@app.patch("/api/quotes/{quote_id}", response_model=QuoteUpdateResponse, summary="Update quote status or note", description="Update mutable fields such as status or internal_note for a quote", tags=["quotes"], operation_id="update_quote_partial") +async def update_quote_partial(quote_id: int = Path(..., description="Quote ID to update", example=1), request: QuoteUpdateRequest = Body(...)) -> QuoteUpdateResponse: + session = SessionLocal() + obj = session.query(Quote).filter(Quote.id == quote_id).first() + now = datetime.utcnow() + if obj is not None: + if request.status is not None: + obj.status = request.status + if request.internal_note is not None: + obj.internal_note = request.internal_note + obj.updated_at = now + session.commit() + session.refresh(obj) + session.close() + if obj is None: + return QuoteUpdateResponse(id=0, quote_number="", status="", internal_note=None, updated_at=None) + return QuoteUpdateResponse.model_validate(obj) + +@app.post("/api/jobs", response_model=JobResponse, summary="Create a job", description="Create a manufacturing job linked to customer, quote, and custom spec", tags=["jobs"], operation_id="create_job") +async def create_job(request: JobCreateRequest = Body(...)) -> JobResponse: + session = SessionLocal() + due = None + if request.due_date is not None: + if isinstance(request.due_date, datetime): + due = request.due_date.date() + obj = Job( + job_number=request.job_number, + customer_id=request.customer_id, + quote_id=request.quote_id, + custom_spec_id=request.custom_spec_id, + priority=request.priority, + due_date=due, + status=request.status, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + resp_due = None + if obj.due_date is not None: + resp_due = datetime.combine(obj.due_date, datetime.min.time()) + return JobResponse( + id=obj.id, + job_number=obj.job_number, + customer_id=obj.customer_id, + quote_id=obj.quote_id, + custom_spec_id=obj.custom_spec_id, + priority=obj.priority, + due_date=resp_due, + status=obj.status, + created_at=obj.created_at, + updated_at=obj.updated_at, + ) + +@app.get("/api/jobs", response_model=JobsListResponse, summary="List jobs with filters", description="Retrieve jobs filtered by customer, status, or job_number", tags=["jobs"], operation_id="list_jobs") +async def list_jobs(job_number: Optional[str] = Query(None, description="Filter by exact job number", example="J-2025-0332"), customer_id: Optional[int] = Query(None, description="Filter by customer ID", example=1), status: Optional[str] = Query(None, description="Filter by job status", example="planned"), due_date_from: Optional[datetime] = Query(None, description="Filter by due date on or after this date", example="2026-01-01T00:00:00"), due_date_to: Optional[datetime] = Query(None, description="Filter by due date on or before this date", example="2026-01-31T00:00:00"), limit: Optional[int] = Query(50, description="Max records to return", example=50), offset: Optional[int] = Query(0, description="Offset for pagination", example=0)) -> JobsListResponse: + session = SessionLocal() + query = session.query(Job) + if job_number is not None: + query = query.filter(Job.job_number == job_number) + if customer_id is not None: + query = query.filter(Job.customer_id == customer_id) + if status is not None: + query = query.filter(Job.status == status) + if due_date_from is not None: + query = query.filter(Job.due_date >= due_date_from.date()) + if due_date_to is not None: + query = query.filter(Job.due_date <= due_date_to.date()) + total = query.count() + objs = query.offset(offset).limit(limit).all() + items: List[JobsListItemResponse] = [] + for o in objs: + resp_due = None + if o.due_date is not None: + resp_due = datetime.combine(o.due_date, datetime.min.time()) + items.append(JobsListItemResponse(id=o.id, job_number=o.job_number, customer_id=o.customer_id, status=o.status, priority=o.priority, due_date=resp_due)) + session.close() + return JobsListResponse(items=items, total=total) + +@app.get("/api/jobs/by-number/{job_number}", response_model=JobResponse, summary="Get job by job number", description="Retrieve a single job by its unique job_number", tags=["jobs"], operation_id="get_job_by_number") +async def get_job_by_number(job_number: str = Path(..., description="Exact job number to lookup", example="J-2025-0332")) -> JobResponse: + session = SessionLocal() + obj = session.query(Job).filter(Job.job_number == job_number).first() + session.close() + if obj is None: + return JobResponse(id=0, job_number="", customer_id=0, quote_id=None, custom_spec_id=None, priority="", due_date=None, status="", created_at=None, updated_at=None) + resp_due = None + if obj.due_date is not None: + resp_due = datetime.combine(obj.due_date, datetime.min.time()) + return JobResponse(id=obj.id, job_number=obj.job_number, customer_id=obj.customer_id, quote_id=obj.quote_id, custom_spec_id=obj.custom_spec_id, priority=obj.priority, due_date=resp_due, status=obj.status, created_at=obj.created_at, updated_at=obj.updated_at) + +@app.patch("/api/jobs/{job_id}", response_model=JobUpdateResponse, summary="Update job status or priority", description="Update mutable job fields like status, priority, or due_date", tags=["jobs"], operation_id="update_job_partial") +async def update_job_partial(job_id: int = Path(..., description="Job ID to update", example=1), request: JobUpdateRequest = Body(...)) -> JobUpdateResponse: + session = SessionLocal() + obj = session.query(Job).filter(Job.id == job_id).first() + now = datetime.utcnow() + if obj is not None: + if request.status is not None: + obj.status = request.status + if request.priority is not None: + obj.priority = request.priority + if request.due_date is not None: + if isinstance(request.due_date, datetime): + obj.due_date = request.due_date.date() + obj.updated_at = now + session.commit() + session.refresh(obj) + session.close() + if obj is None: + return JobUpdateResponse(id=0, job_number="", status="", priority="", due_date=None, updated_at=None) + resp_due = None + if obj.due_date is not None: + resp_due = datetime.combine(obj.due_date, datetime.min.time()) + return JobUpdateResponse(id=obj.id, job_number=obj.job_number, status=obj.status, priority=obj.priority, due_date=resp_due, updated_at=obj.updated_at) + +@app.post("/api/work-centers", response_model=WorkCenterResponse, summary="Create a work center", description="Create a new work center such as a machine or cell", tags=["work_centers"], operation_id="create_work_center") +async def create_work_center(request: WorkCenterCreateRequest = Body(...)) -> WorkCenterResponse: + session = SessionLocal() + obj = WorkCenter( + name=request.name, + description=request.description, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return WorkCenterResponse.model_validate(obj) + +@app.get("/api/work-centers", response_model=WorkCentersListResponse, summary="List work centers", description="Retrieve work centers with optional name filter", tags=["work_centers"], operation_id="list_work_centers") +async def list_work_centers(name: Optional[str] = Query(None, description="Filter by name containing this text", example="Laser Cutter")) -> WorkCentersListResponse: + session = SessionLocal() + query = session.query(WorkCenter) + if name is not None: + query = query.filter(WorkCenter.name.contains(name)) + objs = query.all() + items = [WorkCenterResponse.model_validate(o) for o in objs] + session.close() + return WorkCentersListResponse(items=items) + +@app.get("/api/work-centers/by-name/{work_center_name}", response_model=WorkCenterResponse, summary="Get work center by name", description="Lookup a work center by its unique name", tags=["work_centers"], operation_id="get_work_center_by_name") +async def get_work_center_by_name(work_center_name: str = Path(..., description="Exact work center name", example="Laser Cutter LC-01")) -> WorkCenterResponse: + session = SessionLocal() + obj = session.query(WorkCenter).filter(WorkCenter.name == work_center_name).first() + session.close() + if obj is None: + return WorkCenterResponse(id=0, name="", description=None, created_at=None, updated_at=None) + return WorkCenterResponse.model_validate(obj) + +@app.post("/api/job-tasks", response_model=JobTaskResponse, summary="Create a job task", description="Create a single job task step for a specific job and work center", tags=["job_tasks"], operation_id="create_job_task") +async def create_job_task(request: JobTaskCreateRequest = Body(...)) -> JobTaskResponse: + session = SessionLocal() + obj = JobTask( + task_code=request.task_code, + job_id=request.job_id, + sequence_order=request.sequence_order, + task_name=request.task_name, + work_center_id=request.work_center_id, + requiring_skill_level=request.requiring_skill_level, + planned_start=request.planned_start, + planned_finish=request.planned_finish, + planned_duration_hours=request.planned_duration_hours, + actual_start=None, + actual_finish=None, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return JobTaskResponse.model_validate(obj) + +@app.get("/api/job-tasks", response_model=JobTasksListResponse, summary="List job tasks with filters", description="List job tasks filtered by job, work center, or date range", tags=["job_tasks"], operation_id="list_job_tasks") +async def list_job_tasks(job_id: Optional[int] = Query(None, description="Filter by job ID", example=1), work_center_id: Optional[int] = Query(None, description="Filter by work center ID", example=1), planned_start_from: Optional[datetime] = Query(None, description="Filter tasks with planned_start on or after this datetime", example="2026-01-01T00:00:00"), planned_finish_to: Optional[datetime] = Query(None, description="Filter tasks with planned_finish on or before this datetime", example="2026-01-31T23:59:59"), limit: Optional[int] = Query(100, description="Max records to return", example=100), offset: Optional[int] = Query(0, description="Offset for pagination", example=0)) -> JobTasksListResponse: + session = SessionLocal() + query = session.query(JobTask) + if job_id is not None: + query = query.filter(JobTask.job_id == job_id) + if work_center_id is not None: + query = query.filter(JobTask.work_center_id == work_center_id) + if planned_start_from is not None: + query = query.filter(JobTask.planned_start >= planned_start_from) + if planned_finish_to is not None: + query = query.filter(JobTask.planned_finish <= planned_finish_to) + total = query.count() + objs = query.offset(offset).limit(limit).all() + items = [JobTasksListItemResponse.model_validate(o) for o in objs] + session.close() + return JobTasksListResponse(items=items, total=total) + +@app.get("/api/job-tasks/by-code/{task_code}", response_model=JobTaskResponse, summary="Get job task by task code", description="Retrieve a single job task by its unique task_code", tags=["job_tasks"], operation_id="get_job_task_by_code") +async def get_job_task_by_code(task_code: str = Path(..., description="Task code to lookup", example="JT-8793")) -> JobTaskResponse: + session = SessionLocal() + obj = session.query(JobTask).filter(JobTask.task_code == task_code).first() + session.close() + if obj is None: + return JobTaskResponse(id=0, task_code="", job_id=0, sequence_order=0, task_name="", work_center_id=0, requiring_skill_level=None, planned_start=None, planned_finish=None, planned_duration_hours=None, actual_start=None, actual_finish=None, created_at=None, updated_at=None) + return JobTaskResponse.model_validate(obj) + +@app.post("/api/time-logs", response_model=TimeLogResponse, summary="Create a time log for a job task", description="Record actual time, scrap, and notes for a job task at a work center", tags=["time_logs"], operation_id="create_time_log") +async def create_time_log(request: TimeLogCreateRequest = Body(...)) -> TimeLogResponse: + session = SessionLocal() + log_start_value = request.log_start if request.log_start is not None else datetime.utcnow() + scrap_quantity_value = request.scrap_quantity if request.scrap_quantity is not None else 0 + obj = TimeLog( + job_task_id=request.job_task_id, + operator_username=request.operator_username, + work_center_id=request.work_center_id, + log_start=log_start_value, + actual_duration_hours=request.actual_duration_hours, + scrap_quantity=scrap_quantity_value, + note=request.note, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return TimeLogResponse.model_validate(obj) + +@app.get("/api/time-logs", response_model=TimeLogsListResponse, summary="List time logs with filters", description="List time logs by job_task, work center, or date range", tags=["time_logs"], operation_id="list_time_logs") +async def list_time_logs(job_task_id: Optional[int] = Query(None, description="Filter by job task ID", example=1), work_center_id: Optional[int] = Query(None, description="Filter by work center ID", example=2), log_start_from: Optional[datetime] = Query(None, description="Filter logs with log_start on or after this datetime", example="2026-01-01T00:00:00"), log_start_to: Optional[datetime] = Query(None, description="Filter logs with log_start on or before this datetime", example="2026-01-31T23:59:59"), limit: Optional[int] = Query(100, description="Max records to return", example=100), offset: Optional[int] = Query(0, description="Offset for pagination", example=0)) -> TimeLogsListResponse: + session = SessionLocal() + query = session.query(TimeLog) + if job_task_id is not None: + query = query.filter(TimeLog.job_task_id == job_task_id) + if work_center_id is not None: + query = query.filter(TimeLog.work_center_id == work_center_id) + if log_start_from is not None: + query = query.filter(TimeLog.log_start >= log_start_from) + if log_start_to is not None: + query = query.filter(TimeLog.log_start <= log_start_to) + total = query.count() + objs = query.offset(offset).limit(limit).all() + items = [TimeLogsListItemResponse.model_validate(o) for o in objs] + session.close() + return TimeLogsListResponse(items=items, total=total) + +@app.post("/api/materials", response_model=MaterialResponse, summary="Create a material", description="Create a new material definition with unit of measure", tags=["materials"], operation_id="create_material") +async def create_material(request: MaterialCreateRequest = Body(...)) -> MaterialResponse: + session = SessionLocal() + obj = Material( + name=request.name, + unit_of_measure=request.unit_of_measure, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return MaterialResponse.model_validate(obj) + +@app.get("/api/materials", response_model=MaterialsListResponse, summary="List materials", description="Retrieve materials with optional name filter", tags=["materials"], operation_id="list_materials") +async def list_materials(name: Optional[str] = Query(None, description="Filter materials containing this name", example="Cold Rolled Steel")) -> MaterialsListResponse: + session = SessionLocal() + query = session.query(Material) + if name is not None: + query = query.filter(Material.name.contains(name)) + objs = query.all() + items = [MaterialResponse.model_validate(o) for o in objs] + session.close() + return MaterialsListResponse(items=items) + +@app.get("/api/materials/by-name/{material_name}", response_model=MaterialResponse, summary="Get material by name", description="Lookup a material by its unique name", tags=["materials"], operation_id="get_material_by_name") +async def get_material_by_name(material_name: str = Path(..., description="Exact material name", example="Cold Rolled Steel Sheet 2mm")) -> MaterialResponse: + session = SessionLocal() + obj = session.query(Material).filter(Material.name == material_name).first() + session.close() + if obj is None: + return MaterialResponse(id=0, name="", unit_of_measure="", created_at=None, updated_at=None) + return MaterialResponse.model_validate(obj) + +@app.post("/api/inventory-lots", response_model=InventoryLotResponse, summary="Create an inventory lot", description="Create a new inventory lot for a material with quantity balances", tags=["inventory_lots"], operation_id="create_inventory_lot") +async def create_inventory_lot(request: InventoryLotCreateRequest = Body(...)) -> InventoryLotResponse: + session = SessionLocal() + reserved = request.reserved_quantity if request.reserved_quantity is not None else 0.0 + obj = InventoryLot( + lot_number=request.lot_number, + material_id=request.material_id, + on_hand_quantity=request.on_hand_quantity, + reserved_quantity=reserved, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return InventoryLotResponse.model_validate(obj) + +@app.get("/api/inventory-lots", response_model=InventoryLotsListResponse, summary="List inventory lots", description="List inventory lots filtered by material or lot_number", tags=["inventory_lots"], operation_id="list_inventory_lots") +async def list_inventory_lots(lot_number: Optional[str] = Query(None, description="Filter by exact lot number", example="LOT-CRS-2401"), material_id: Optional[int] = Query(None, description="Filter by material ID", example=1)) -> InventoryLotsListResponse: + session = SessionLocal() + query = session.query(InventoryLot) + if lot_number is not None: + query = query.filter(InventoryLot.lot_number == lot_number) + if material_id is not None: + query = query.filter(InventoryLot.material_id == material_id) + objs = query.all() + items = [InventoryLotsListItemResponse.model_validate(o) for o in objs] + session.close() + return InventoryLotsListResponse(items=items) + +@app.get("/api/inventory-lots/by-number/{lot_number}", response_model=InventoryLotResponse, summary="Get inventory lot by lot number", description="Retrieve a single inventory lot by its unique lot_number", tags=["inventory_lots"], operation_id="get_inventory_lot_by_number") +async def get_inventory_lot_by_number(lot_number: str = Path(..., description="Exact lot number", example="LOT-CRS-2401")) -> InventoryLotResponse: + session = SessionLocal() + obj = session.query(InventoryLot).filter(InventoryLot.lot_number == lot_number).first() + session.close() + if obj is None: + return InventoryLotResponse(id=0, lot_number="", material_id=0, on_hand_quantity=0.0, reserved_quantity=0.0, created_at=None, updated_at=None) + return InventoryLotResponse.model_validate(obj) + +@app.post("/api/inventory-lots/{inventory_lot_id}/adjust", response_model=InventoryLotAdjustResponse, summary="Adjust inventory lot quantities", description="Atomically adjust on_hand_quantity and reserved_quantity for a lot", tags=["inventory_lots"], operation_id="adjust_inventory_lot") +async def adjust_inventory_lot(inventory_lot_id: int = Path(..., description="Inventory lot ID", example=1), request: InventoryLotAdjustRequest = Body(...)) -> InventoryLotAdjustResponse: + session = SessionLocal() + obj = session.query(InventoryLot).filter(InventoryLot.id == inventory_lot_id).first() + if obj is not None: + if request.on_hand_delta is not None: + obj.on_hand_quantity = obj.on_hand_quantity + request.on_hand_delta + if request.reserved_delta is not None: + obj.reserved_quantity = obj.reserved_quantity + request.reserved_delta + obj.updated_at = datetime.utcnow() + session.commit() + session.refresh(obj) + session.close() + if obj is None: + return InventoryLotAdjustResponse(id=0, lot_number="", on_hand_quantity=0.0, reserved_quantity=0.0, updated_at=None) + return InventoryLotAdjustResponse.model_validate(obj) + +@app.post("/api/material-reservations", response_model=MaterialReservationResponse, summary="Create a material reservation", description="Reserve a quantity from an inventory lot for a job", tags=["material_reservations"], operation_id="create_material_reservation") +async def create_material_reservation(request: MaterialReservationCreateRequest = Body(...)) -> MaterialReservationResponse: + session = SessionLocal() + obj = MaterialReservation( + job_id=request.job_id, + inventory_lot_id=request.inventory_lot_id, + quantity=request.quantity, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + lot = session.query(InventoryLot).filter(InventoryLot.id == request.inventory_lot_id).first() + if lot is not None: + lot.reserved_quantity = lot.reserved_quantity + request.quantity + lot.on_hand_quantity = lot.on_hand_quantity - request.quantity + lot.updated_at = datetime.utcnow() + session.commit() + session.refresh(obj) + session.close() + return MaterialReservationResponse.model_validate(obj) + +@app.get("/api/material-reservations", response_model=MaterialReservationsListResponse, summary="List material reservations", description="List material reservations filtered by job or inventory lot", tags=["material_reservations"], operation_id="list_material_reservations") +async def list_material_reservations(job_id: Optional[int] = Query(None, description="Filter by job ID", example=1), inventory_lot_id: Optional[int] = Query(None, description="Filter by inventory lot ID", example=1)) -> MaterialReservationsListResponse: + session = SessionLocal() + query = session.query(MaterialReservation) + if job_id is not None: + query = query.filter(MaterialReservation.job_id == job_id) + if inventory_lot_id is not None: + query = query.filter(MaterialReservation.inventory_lot_id == inventory_lot_id) + objs = query.all() + items = [MaterialReservationsListItemResponse.model_validate(o) for o in objs] + session.close() + return MaterialReservationsListResponse(items=items) + +@app.post("/api/shipments", response_model=ShipmentResponse, summary="Create a shipment", description="Create a shipment record for a job and customer with initial status", tags=["shipments"], operation_id="create_shipment") +async def create_shipment(request: ShipmentCreateRequest = Body(...)) -> ShipmentResponse: + session = SessionLocal() + obj = Shipment( + shipment_number=request.shipment_number, + job_id=request.job_id, + customer_id=request.customer_id, + delivery_status=request.delivery_status, + shipped_at=request.shipped_at, + delivered_at=request.delivered_at, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return ShipmentResponse.model_validate(obj) + +@app.get("/api/shipments", response_model=ShipmentsListResponse, summary="List shipments", description="List shipments filtered by job, customer, or status", tags=["shipments"], operation_id="list_shipments") +async def list_shipments(shipment_number: Optional[str] = Query(None, description="Filter by shipment number", example="SHP-2025-0101"), job_id: Optional[int] = Query(None, description="Filter by job ID", example=1), customer_id: Optional[int] = Query(None, description="Filter by customer ID", example=1), delivery_status: Optional[str] = Query(None, description="Filter by delivery status", example="in_transit")) -> ShipmentsListResponse: + session = SessionLocal() + query = session.query(Shipment) + if shipment_number is not None: + query = query.filter(Shipment.shipment_number == shipment_number) + if job_id is not None: + query = query.filter(Shipment.job_id == job_id) + if customer_id is not None: + query = query.filter(Shipment.customer_id == customer_id) + if delivery_status is not None: + query = query.filter(Shipment.delivery_status == delivery_status) + objs = query.all() + items = [ShipmentsListItemResponse.model_validate(o) for o in objs] + session.close() + return ShipmentsListResponse(items=items) + +@app.patch("/api/shipments/{shipment_id}", response_model=ShipmentUpdateResponse, summary="Update shipment status or dates", description="Update shipment delivery_status, shipped_at, or delivered_at", tags=["shipments"], operation_id="update_shipment_partial") +async def update_shipment_partial(shipment_id: int = Path(..., description="Shipment ID", example=1), request: ShipmentUpdateRequest = Body(...)) -> ShipmentUpdateResponse: + session = SessionLocal() + obj = session.query(Shipment).filter(Shipment.id == shipment_id).first() + now = datetime.utcnow() + if obj is not None: + if request.delivery_status is not None: + obj.delivery_status = request.delivery_status + if request.shipped_at is not None: + obj.shipped_at = request.shipped_at + if request.delivered_at is not None: + obj.delivered_at = request.delivered_at + obj.updated_at = now + session.commit() + session.refresh(obj) + session.close() + if obj is None: + return ShipmentUpdateResponse(id=0, shipment_number="", delivery_status="", shipped_at=None, delivered_at=None, updated_at=None) + return ShipmentUpdateResponse.model_validate(obj) + +@app.post("/api/shipment-packages", response_model=ShipmentPackageResponse, summary="Create a shipment package", description="Create a single package entry for an existing shipment", tags=["shipment_packages"], operation_id="create_shipment_package") +async def create_shipment_package(request: ShipmentPackageCreateRequest = Body(...)) -> ShipmentPackageResponse: + session = SessionLocal() + obj = ShipmentPackage( + shipment_id=request.shipment_id, + package_number=request.package_number, + weight_kg=request.weight_kg, + tracking_number=request.tracking_number, + created_at=datetime.utcnow(), + updated_at=datetime.utcnow(), + ) + session.add(obj) + session.commit() + session.refresh(obj) + session.close() + return ShipmentPackageResponse.model_validate(obj) + +@app.get("/api/shipment-packages", response_model=ShipmentPackagesListResponse, summary="List shipment packages", description="List packages filtered by shipment or tracking_number", tags=["shipment_packages"], operation_id="list_shipment_packages") +async def list_shipment_packages(shipment_id: Optional[int] = Query(None, description="Filter by shipment ID", example=1), tracking_number: Optional[str] = Query(None, description="Filter by tracking number", example="CBX123456US")) -> ShipmentPackagesListResponse: + session = SessionLocal() + query = session.query(ShipmentPackage) + if shipment_id is not None: + query = query.filter(ShipmentPackage.shipment_id == shipment_id) + if tracking_number is not None: + query = query.filter(ShipmentPackage.tracking_number == tracking_number) + objs = query.all() + items = [ShipmentPackagesListItemResponse.model_validate(o) for o in objs] + session.close() + return ShipmentPackagesListResponse(items=items) + +@app.get("/api/work-centers/{work_center_id}/capacity-utilization", response_model=CapacityUtilizationResponse, summary="Get work center capacity utilization", description="Aggregate planned vs actual hours for a work center over a date range", tags=["capacity", "work_centers", "job_tasks", "time_logs"], operation_id="get_work_center_capacity_utilization") +async def get_work_center_capacity_utilization(work_center_id: int = Path(..., description="Work center ID to analyze", example=1), planned_from: datetime = Query(..., description="Start of planned window (inclusive, ISO8601 datetime)", example="2026-01-01T00:00:00"), planned_to: datetime = Query(..., description="End of planned window (inclusive, ISO8601 datetime)", example="2026-01-31T23:59:59")) -> CapacityUtilizationResponse: + session = SessionLocal() + tasks_query = session.query(JobTask).filter(JobTask.work_center_id == work_center_id, JobTask.planned_start != None, JobTask.planned_finish != None, JobTask.planned_start >= planned_from, JobTask.planned_finish <= planned_to) + tasks = tasks_query.all() + total_planned_hours = 0.0 + total_actual_hours = 0.0 + items: List[CapacityTaskItem] = [] + for t in tasks: + planned = t.planned_duration_hours if t.planned_duration_hours is not None else 0.0 + total_planned_hours = total_planned_hours + planned + logs = session.query(TimeLog).filter(TimeLog.job_task_id == t.id, TimeLog.work_center_id == work_center_id).all() + actual_sum = 0.0 + for lg in logs: + actual_sum = actual_sum + float(lg.actual_duration_hours) + total_actual_hours = total_actual_hours + actual_sum + items.append(CapacityTaskItem(job_task_id=t.id, task_code=t.task_code, job_id=t.job_id, task_name=t.task_name, planned_start=t.planned_start, planned_finish=t.planned_finish, planned_duration_hours=t.planned_duration_hours if t.planned_duration_hours is not None else 0.0, actual_hours=actual_sum)) + session.close() + return CapacityUtilizationResponse(work_center_id=work_center_id, planned_from=planned_from, planned_to=planned_to, total_planned_hours=total_planned_hours, total_actual_hours=total_actual_hours, job_tasks=items) + +if __name__ == "__main__": + import uvicorn + host = os.getenv("HOST", "127.0.0.1") + port = int(os.getenv("PORT", "8000")) + uvicorn.run(app, host=host, port=port) \ No newline at end of file diff --git a/components/awm/private/tasks/awm-manufacturing-1-schedule/original_verifier.py b/components/awm/private/tasks/awm-manufacturing-1-schedule/original_verifier.py new file mode 100644 index 0000000000000000000000000000000000000000..58faa59e00409ee339b0d6d79cf9dfc74eacfae3 --- /dev/null +++ b/components/awm/private/tasks/awm-manufacturing-1-schedule/original_verifier.py @@ -0,0 +1,104 @@ +def verify_task_completion(initial_db_path: str, final_db_path: str, final_answer: str | None = None) -> dict: + import sqlite3 + from datetime import datetime + + def safe_query(db_path: str, query: str, params: tuple = ()) -> list: + try: + conn = sqlite3.connect(f"file:{db_path}?mode=ro", uri=True) + cursor = conn.cursor() + cursor.execute(query, params) + results = cursor.fetchall() + conn.close() + return results + except Exception: + return [] + + # Get job_id for J-2025-0332 + job_query = "SELECT id FROM jobs WHERE job_number = ?" + job_results = safe_query(final_db_path, job_query, ('J-2025-0332',)) + if not job_results: + return {"result": "others"} + job_id = job_results[0][0] + + # Get work center IDs + wc_query = "SELECT id, name FROM work_centers WHERE name IN (?, ?, ?)" + wc_results = safe_query(final_db_path, wc_query, ('Laser Cutter LC-01', 'Weld Cell WC-02', 'Paint Booth PB-01')) + if len(wc_results) != 3: + return {"result": "others"} + + wc_map = {name: wc_id for wc_id, name in wc_results} + laser_cutter_id = wc_map.get('Laser Cutter LC-01') + weld_cell_id = wc_map.get('Weld Cell WC-02') + paint_booth_id = wc_map.get('Paint Booth PB-01') + + if not all([laser_cutter_id, weld_cell_id, paint_booth_id]): + return {"result": "others"} + + # Count initial job_tasks for this job + initial_tasks_query = "SELECT COUNT(*) FROM job_tasks WHERE job_id = ?" + initial_count_result = safe_query(initial_db_path, initial_tasks_query, (job_id,)) + initial_count = initial_count_result[0][0] if initial_count_result else 0 + + # Count final job_tasks for this job + final_count_result = safe_query(final_db_path, initial_tasks_query, (job_id,)) + final_count = final_count_result[0][0] if final_count_result else 0 + + # Should have exactly 3 more tasks + if final_count != initial_count + 3: + return {"result": "others"} + + # Get all job_tasks for this job from final database + tasks_query = """SELECT task_name, work_center_id, requiring_skill_level, + planned_start, planned_finish + FROM job_tasks + WHERE job_id = ? + ORDER BY id""" + final_tasks = safe_query(final_db_path, tasks_query, (job_id,)) + + if len(final_tasks) < 3: + return {"result": "others"} + + # Get the last 3 tasks (newly added) + new_tasks = final_tasks[-3:] + + # Expected task definitions + expected_tasks = [ + ('cutting', laser_cutter_id, 'intermediate', '2026-01-05 08:00:00', '2026-01-05 10:00:00'), + ('welding', weld_cell_id, 'advanced', '2026-01-05 11:00:00', '2026-01-05 14:00:00'), + ('painting', paint_booth_id, 'intermediate', '2026-01-06 09:00:00', '2026-01-06 11:00:00') + ] + + # Verify each new task matches expected values + for i, (task_name, work_center_id, skill_level, planned_start, planned_finish) in enumerate(new_tasks): + expected = expected_tasks[i] + + # Check task_name + if task_name != expected[0]: + return {"result": "others"} + + # Check work_center_id + if work_center_id != expected[1]: + return {"result": "others"} + + # Check requiring_skill_level + if skill_level != expected[2]: + return {"result": "others"} + + # Check planned_start (normalize format) + if planned_start: + planned_start_normalized = planned_start.replace('T', ' ').replace('.000000', '') + if planned_start_normalized != expected[3]: + return {"result": "others"} + else: + return {"result": "others"} + + # Check planned_finish (normalize format) + if planned_finish: + planned_finish_normalized = planned_finish.replace('T', ' ').replace('.000000', '') + if planned_finish_normalized != expected[4]: + return {"result": "others"} + else: + return {"result": "others"} + + # All checks passed + return {"result": "complete"} \ No newline at end of file diff --git a/components/awm/requirements.lock b/components/awm/requirements.lock new file mode 100644 index 0000000000000000000000000000000000000000..543936bbbe0a1b14059cdfb3aeae89aeac00fb4b --- /dev/null +++ b/components/awm/requirements.lock @@ -0,0 +1,112 @@ +# Linux/amd64 CPython 3.12 wheel lock. Offline inputs: vendor/build-manifest.json. +# OpenEnv source commit: 86a180ede21e044f7929b9a7783ad83aa67d83a3. +aiofile==3.12.3 --hash=sha256:5c1bcc9e929c50834608e8cc1a4cc1d7503eb60c15a535b779fd39e2f372c017 +annotated-doc==0.0.5 --hash=sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101 +annotated-types==0.8.0 --hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0 +anyio==4.15.1 --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 +attrs==26.1.0 --hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 +Authlib==1.8.0 --hash=sha256:88aebbd9af6757e14e912d5dc007ae1dc1f3e27e3b2152ce7c552ee2c3b3c121 +beartype==0.22.9 --hash=sha256:d16c9bbc61ea14637596c5f6fbff2ee99cbe3573e46a716401734ef50c3060c2 +brotli==1.2.0 --hash=sha256:072e7624b1fc4d601036ab3f4f27942ef772887e876beff0301d261210bca97f +cachetools==7.2.1 --hash=sha256:63aa53dfe7473c10cccdd5a01dedf76ef2c4b73a58840d9396e7d0752cbdac3b +caio==0.12.9 --hash=sha256:bf12d4f014b2a33e642ed7905b5787656ede2fc24be21f7c086826ff0d32cec3 +certifi==2026.7.22 --hash=sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 +cffi==2.1.1 --hash=sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf +charset-normalizer==3.5.2 --hash=sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649 +click==8.5.0 --hash=sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360 +cryptography==50.0.2 --hash=sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856 +cyclopts==5.2.0 --hash=sha256:5da2a5d65164e03008621fc4795946b88a722b881398b5dfa58afa6218342cff +dnspython==2.9.0 --hash=sha256:9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9 +docstring_parser==0.18.0 --hash=sha256:b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b +email-validator==2.3.0 --hash=sha256:80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4 +exceptiongroup==1.3.1 --hash=sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598 +fastapi==0.143.0 --hash=sha256:3e9395fd35276425b61b516a31fdd7c77fe2af83e41b4da22e30696fb1304c5d +fastmcp==3.4.8 --hash=sha256:ab4e8abe6c9d50b110f367e8c29f82b90c1478ac9180be61af10354f84f0ad8c +fastmcp-slim==3.4.8 --hash=sha256:e72c6b74e90c5dcdc8f58087fbdf213636d8b5d339384a498de1c5df6fc037a7 +filelock==4.1.0 --hash=sha256:2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1 +fsspec==2026.9.0 --hash=sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f +gradio==6.30.0 --hash=sha256:aae3aa81ec9f44e55781b498ad2ba12b117aa512e8d2bb0ef3e52af7f2ee6305 +gradio_client==2.7.2 --hash=sha256:12c9d2d940df28eb8dce58eef61f5e808265ad87bbbca53704d1330aa701e5e2 +griffelib==2.3.2 --hash=sha256:8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274 +groovy==0.1.2 --hash=sha256:7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64 +h11==0.16.0 --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 +hf-gradio==0.4.1 --hash=sha256:76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3 +hf-xet==1.7.0 --hash=sha256:2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8 +httpcore==1.0.9 --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 +httpcore2==2.13.1 --hash=sha256:e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a +httpx==0.28.1 --hash=sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad +httpx-sse==0.4.3 --hash=sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc +httpx2==2.13.1 --hash=sha256:6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4 +huggingface_hub==2.2.0 --hash=sha256:1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3 +idna==3.20 --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c +iniconfig==2.3.1 --hash=sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7 +jaraco.classes==3.4.0 --hash=sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790 +jaraco.context==6.1.2 --hash=sha256:bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535 +jaraco.functools==4.6.0 --hash=sha256:99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30 +jeepney==0.9.0 --hash=sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683 +Jinja2==3.1.6 --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 +jiter==0.17.0 --hash=sha256:8c21265b251d99bbb40080d178a8953e35601d3a1564e05c4de4c0d2ca616797 +joserfc==1.7.5 --hash=sha256:add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159 +jsonref==1.1.0 --hash=sha256:590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9 +jsonschema==4.26.0 --hash=sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce +jsonschema-path==0.5.0 --hash=sha256:2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2 +jsonschema-specifications==2025.9.1 --hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe +keyring==25.7.0 --hash=sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f +markdown-it-py==4.2.0 --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a +MarkupSafe==3.0.4 --hash=sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581 +mcp==1.30.0 --hash=sha256:666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0 +mdurl==0.1.2 --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 +more-itertools==11.1.0 --hash=sha256:4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192 +numpy==2.5.3 --hash=sha256:b7e18c623bb5c95acb3b3328861272816ba199fb531921c5d6d0b675f1fde9e3 +openai==3.28.0 --hash=sha256:1ea40a084ffe2f9f16fd3bea6e870f757853b536b18d8e737c518ef849a2920c +openapi-pydantic==0.6.0 --hash=sha256:8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3 +openenv==0.6.1.dev0 --hash=sha256:93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a +opentelemetry-api==1.45.1 --hash=sha256:b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb +orjson==3.13.0 --hash=sha256:bceadfd314bd238f584fc229a4bbaf0e573597e7a026dec5429fbf29fd66c641 +packaging==26.3 --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c +pandas==3.0.6 --hash=sha256:0704044b676496b8350e023b09f174a26772456c974a2b11c36bebb558c9490d +pathable==0.6.0 --hash=sha256:82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566 +pillow==12.3.0 --hash=sha256:78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91 +platformdirs==4.12.4 --hash=sha256:78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7 +pluggy==1.6.0 --hash=sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746 +py-key-value-aio==0.4.6 --hash=sha256:820b30c7959fc738ea3d00160cdb10cd258f51e38737b2add530defeea1ded77 +pycparser==3.11 --hash=sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80 +pydantic==2.14.0 --hash=sha256:15fab1bea6f1dc5003b54fc2ecab230c1fd1dbade2acd4addc52d81e32416d4b +pydantic-settings==2.15.0 --hash=sha256:0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42 +pydantic_core==2.50.0 --hash=sha256:f187030fc3d62c668feb0f09e92852e0eb414d7fcefc4748f2e67d245aade37e +pydub==0.25.1 --hash=sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6 +Pygments==2.21.0 --hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 +PyJWT==2.15.1 --hash=sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193 +pyperclip==1.11.0 --hash=sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273 +pytest==9.1.1 --hash=sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c +python-dateutil==2.9.0.post0 --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 +python-dotenv==1.2.4 --hash=sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc +python-multipart==0.0.32 --hash=sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23 +pytz==2026.5 --hash=sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03 +PyYAML==6.0.3 --hash=sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc +referencing==0.37.0 --hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231 +requests==2.34.2 --hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 +rich==15.0.0 --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb +rich-rst==2.2.0 --hash=sha256:1ea1c43813dc4a8d86475fce27ffb74e0ada3d4656c9f8130ba2a59868055fe9 +rpds-py==2026.9.1 --hash=sha256:addeda51556dac7c1a2f14cda62db8b621cd12afba3091d03a96c72932387eab +safehttpx==0.1.7 --hash=sha256:c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde +SecretStorage==3.5.0 --hash=sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137 +semantic-version==2.10.0 --hash=sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177 +shellingham==1.5.4 --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 +six==1.17.0 --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 +sniffio==1.3.1 --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 +sse-starlette==3.5.0 --hash=sha256:3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997 +starlette==1.7.0 --hash=sha256:67f8e99895493dd2911a03f11314af6ceebeae4e704bb9f43dfc6a9db151c93e +tomli==2.5.0 --hash=sha256:6cf74416bdc94ae458b14e37286c1073081850ac8459a00d0c5efef5d44294c6 +tomli_w==1.2.0 --hash=sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90 +tomlkit==0.14.0 --hash=sha256:592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680 +tqdm==4.70.1 --hash=sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73 +truststore==0.10.4 --hash=sha256:adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981 +typer==0.27.3 --hash=sha256:e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff +typing-inspection==0.4.4 --hash=sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147 +typing_extensions==4.16.0 --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 +uncalled-for==0.4.1 --hash=sha256:b611b38879d9fe5088297e7bb28f2ddd12d2d73dad933d93da107fb63eb4058e +urllib3==2.8.0 --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 +uvicorn==0.54.0 --hash=sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf +watchfiles==1.3.0 --hash=sha256:b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1 +websockets==17.2 --hash=sha256:6627b913b8586b1c06db9516b31dd0dfbc621de3bb9312616d92a7e44f268a5b diff --git a/components/awm/runtime/awm/__init__.py b/components/awm/runtime/awm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/components/awm/runtime/awm/__init__.py @@ -0,0 +1 @@ + diff --git a/components/awm/runtime/awm/adapter.py b/components/awm/runtime/awm/adapter.py new file mode 100644 index 0000000000000000000000000000000000000000..a2fb0fc1c8d6150a88c938d8e18c7228dfb684bc --- /dev/null +++ b/components/awm/runtime/awm/adapter.py @@ -0,0 +1,89 @@ + +import base64 +from functools import wraps +import hashlib +import json +import math +import os +from pathlib import Path +import subprocess +import tempfile +from threading import RLock +import time + +import jsonschema +from common.contracts import ACTION_SCHEMA, observation_payload + + +def serialized(method): + @wraps(method) + def invoke(self,*args,**kwargs): + with self._lock:return method(self,*args,**kwargs) + return invoke + + +class AWMAdapter: + def __init__(self, task_entries, runtime_parent): + self._lock=RLock();self.registry=dict(task_entries);self.runtime_parent=Path(runtime_parent) + self.runtime_parent.mkdir(parents=True,exist_ok=True) + for name,entry in self.registry.items(): + if entry['task_id']!=name or entry['split']!='train':raise ValueError('Invalid registry') + for relative,digest in entry['original_sha256'].items(): + p=Path(entry['directory'])/relative + if p.is_symlink() or hashlib.sha256(p.read_bytes()).hexdigest()!=digest:raise ValueError('Original source integrity mismatch') + self.temporary=None;self.task_id=None;self.done=False;self.reward=None;self.tool_calls=0;self.started=None + + def _worker(self, operation, payload=None): + if self.temporary is None:raise ValueError('reset is required') + request=base64.b64encode(json.dumps(payload or {},allow_nan=False).encode()).decode() + args=['/opt/awm-venv/bin/python','-I','-B','/opt/awm/runtime/awm/worker.py',str(self.registry[self.task_id]['directory']),str(Path(self.temporary.name)/'state'),operation,request] + env={'PATH':'/opt/awm-venv/bin:/usr/local/bin:/usr/bin:/bin','HOME':'/nonexistent','LANG':'C.UTF-8','LC_ALL':'C.UTF-8','PYTHONDONTWRITEBYTECODE':'1'} + try:r=subprocess.run(args,env=env,capture_output=True,text=True,timeout=60) + except (OSError,subprocess.TimeoutExpired) as exc:raise RuntimeError('Original AWM worker did not complete') from exc + if r.returncode: + + (Path(self.temporary.name)/'worker-error.log').write_text(r.stderr[-24000:]) + raise RuntimeError('Original AWM worker failed; inspect its private log') + if len(r.stdout)>4*1024*1024:raise RuntimeError('Original AWM worker response is too large') + return json.loads(r.stdout) + + @serialized + def reset(self, task_id=None): + if task_id is None and len(self.registry)==1:task_id=next(iter(self.registry)) + if task_id not in self.registry:raise ValueError('Unknown task id') + self.close();self.task_id=task_id;self.temporary=tempfile.TemporaryDirectory(prefix='awm-',dir=self.runtime_parent) + self.done=False;self.reward=None;self.tool_calls=0 + value=self._worker('reset');self.started=time.monotonic() + return observation_payload(task_id,value['instructions'],{'available_ops':['call','finish'],'tools':value['tools'],'situation':value['situation'],'original_format':value['original_format'],'delivery':'Return one JSON action per step. Use the listed business tools through op=call; finish when the requested business state is complete.'},reward=0.0,done=False) + + def _terminal(self): + if self.reward is None: + self._worker('finalize');value=self._worker('verify');reward=value['reward'] + if type(reward) not in (int,float) or not math.isfinite(reward) or reward not in (0,1):raise RuntimeError('Invalid original AWM reward') + self.reward=float(reward) + self.done=True + return observation_payload(self.task_id,'The business workflow episode has ended.',{'tool_calls':self.tool_calls},reward=self.reward,done=True) + + @serialized + def step(self, action): + if self.temporary is None:raise ValueError('reset is required') + if hasattr(action,'action_payload'):action=action.action_payload() + jsonschema.validate(action,ACTION_SCHEMA) + if self.done:return self._terminal() + if time.monotonic()-self.started>=self.registry[self.task_id]['timeout_seconds']:return self._terminal() + if action['op']=='finish':return self._terminal() + if action['op']=='exec': + return observation_payload(self.task_id,'Shell execution is unavailable. Use a listed business tool.',{'is_error':True,'tool_calls':self.tool_calls},reward=0.0,done=False) + value=self._worker('call',{'name':action['tool'],'arguments':action['arguments']});self.tool_calls=value['tool_calls'] + if time.monotonic()-self.started>=self.registry[self.task_id]['timeout_seconds']:return self._terminal() + return observation_payload(self.task_id,value['content'],{'is_error':value['is_error'],'tool_calls':self.tool_calls},reward=0.0,done=False) + + @property + @serialized + def state(self): + return {'task_id':self.task_id,'initialized':self.temporary is not None,'done':self.done,'tool_calls':self.tool_calls} + + @serialized + def close(self): + if self.temporary is not None:self.temporary.cleanup() + self.temporary=None;self.task_id=None;self.done=False;self.reward=None;self.tool_calls=0;self.started=None diff --git a/components/awm/runtime/awm/launch_service.py b/components/awm/runtime/awm/launch_service.py new file mode 100644 index 0000000000000000000000000000000000000000..01d35a651ea1a96b81b0d93194f6594a7c788e70 --- /dev/null +++ b/components/awm/runtime/awm/launch_service.py @@ -0,0 +1,52 @@ + +import argparse +import json +import os +from pathlib import Path +import subprocess +import time +import urllib.request + + +class RejectRedirects(urllib.request.HTTPRedirectHandler): + def redirect_request(self,*args,**kwargs): + raise RuntimeError('Redirects are forbidden for the local readiness probe') + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('--python',default='/usr/local/bin/python') + parser.add_argument('--config',default='/opt/awm/config.json') + args=parser.parse_args() + if os.geteuid()!=0:raise PermissionError('Only the trusted supervisor may launch this service') + if args.config!='/opt/awm/config.json':raise ValueError('This prototype uses its fixed image registry') + opener=urllib.request.build_opener(urllib.request.ProxyHandler({}),RejectRedirects()) + url='http://127.0.0.1:8000/metadata' + def ready(): + try: + with opener.open(url,timeout=2) as response: + return json.load(response).get('name')=='awm_original' + except Exception:return False + if ready(): + print(json.dumps({'status':'already_running','base_url':'http://127.0.0.1:8000'}));return + private=Path('/opt/awm/private');private.mkdir(parents=True,exist_ok=True);private.chmod(0o700) + log=private/'service.log' + env={'PATH':'/usr/local/bin:/usr/bin:/bin','HOME':'/root','LANG':'C.UTF-8','LC_ALL':'C.UTF-8', + 'PYTHONPATH':'/opt/awm/runtime','PYTHONDONTWRITEBYTECODE':'1','PYTHONUNBUFFERED':'1', + 'ARENA_DEDICATED_CONTAINER':'1','ENABLE_WEB_INTERFACE':'false', + 'OPENENV_MODE':'simulation','GRADIO_ANALYTICS_ENABLED':'false','HF_HUB_OFFLINE':'1'} + with log.open('w') as stream: + process=subprocess.Popen([args.python,'-m','awm.server'],env=env,stdin=subprocess.DEVNULL, + stdout=stream,stderr=subprocess.STDOUT,start_new_session=True) + (private/'service.pid').write_text(str(process.pid)+'\n') + deadline=time.monotonic()+90 + while time.monotonic()2*1024*1024:raise WireProtocolError('SDK response exceeds the transport limit') + return validate_envelope(loads(raw)) + + def reset(self,**kwargs): + return self._post('/reset',kwargs) + + def step(self,action): + return self._post('/step',{'action':action}) + + def finish(self): + return validate_envelope(self.step({'op':'finish'}),require_done=True) + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('operation',choices=['reset','step','finish']) + parser.add_argument('--payload-base64') + parser.add_argument('--url',default='http://127.0.0.1:8000') + parser.add_argument('--timeout',type=float,default=330) + args=parser.parse_args() + payload={} if args.payload_base64 is None else loads(base64.b64decode(args.payload_base64,validate=True)) + if not isinstance(payload,dict):raise WireProtocolError('Payload must be a JSON object') + client=WireClient(args.url,args.timeout) + if args.operation=='reset':result=client.reset(**payload) + elif args.operation=='step':result=client.step(payload) + else: + if payload:raise WireProtocolError('Finish has no payload') + result=client.finish() + print(json.dumps(result,ensure_ascii=False,allow_nan=False,separators=(',',':'))) + + +if __name__=='__main__': + try:main() + except Exception as exc: + print(type(exc).__name__+': '+str(exc),file=sys.stderr) + raise SystemExit(1) diff --git a/components/awm/runtime/awm/worker.py b/components/awm/runtime/awm/worker.py new file mode 100644 index 0000000000000000000000000000000000000000..ab8b6f6e5d9235a04ad16a98c46c7518dfc9a336 --- /dev/null +++ b/components/awm/runtime/awm/worker.py @@ -0,0 +1,144 @@ + +import asyncio +import base64 +import importlib.util +import json +import os +from pathlib import Path +import re +import shutil +import sqlite3 +import sys +import traceback +import warnings + +warnings.filterwarnings('ignore', category=DeprecationWarning) +ROOT=Path('/opt/awm') +PRIVATE=ROOT/'private' +STATE=Path('/var/lib/awm') + + +class AWMInfrastructureError(RuntimeError): + + def __init__(self, kind): + self.kind=kind + super().__init__('AWM infrastructure failure: '+kind) + + +def load(name, path): + spec=importlib.util.spec_from_file_location(name,path) + module=importlib.util.module_from_spec(spec);spec.loader.exec_module(module);return module + + +class Controller: + def __init__(self, private=PRIVATE, state=STATE): + self.private=Path(private);self.state=Path(state) + self.state.mkdir(parents=True,exist_ok=True) + self.initial=self.private/'initial.db';self.final=self.state/'final.db' + self.meta_path=self.state/'episode.json' + self.source=json.loads((self.private/'SOURCE.json').read_text()) + self.api=None;self.mcp=None + + def metadata(self): + return json.loads(self.meta_path.read_text()) + + def save(self, value): + tmp=self.meta_path.with_suffix('.tmp');tmp.write_text(json.dumps(value));tmp.replace(self.meta_path) + + def runtime(self): + if self.api is None: + os.environ['DATABASE_PATH']='sqlite:///'+str(self.final) + self.api=load('original_business_api',self.private/'original_api.py') + from fastapi_mcp import FastApiMCP + self.mcp=FastApiMCP(self.api.app) + return self.api,self.mcp + + async def close(self): + if self.mcp is not None: + await self.mcp._http_client.aclose() + if self.api is not None: + self.api.engine.dispose() + + def reset(self): + shutil.copy2(self.initial,self.final) + self.save({'done':False,'tool_calls':0}) + _,mcp=self.runtime() + tools=[{'name':t.name,'description':t.description or '', + 'inputSchema':t.inputSchema} for t in mcp.tools] + return {'instructions':self.source['task'], + 'situation':'You have already logged in, and your user id is 1 if required for the MCP tool.', + 'tools':tools,'task_id':self.source['task_id'],'source_split':'training release', + 'original_format':'FastAPI exposed through FastApiMCP 0.4.0', + 'done':False} + + async def call(self, name, arguments): + meta=self.metadata() + if meta['done']: + return {'content':'Episode is finalized.','done':True,'is_error':True, + 'tool_calls':meta['tool_calls']} + api,mcp=self.runtime() + meta['tool_calls']+=1;self.save(meta) + schemas={t.name:t.inputSchema for t in mcp.tools} + if name not in schemas: + return {'content':f'Error: Unknown tool: {name}','done':False,'is_error':True, + 'tool_calls':meta['tool_calls']} + + import httpx + import jsonschema + from sqlalchemy.exc import DataError, IntegrityError + try: + jsonschema.validate(arguments,schemas[name]) + async with httpx.AsyncClient(transport=httpx.ASGITransport(app=api.app), + base_url='http://localhost',trust_env=False) as client: + contents=await mcp._execute_api_tool(client=client,tool_name=name, + arguments=arguments,operation_map=mcp.operation_map,http_request_info=None) + text='\n'.join(c.text for c in contents if hasattr(c,'text')) + return {'content':text,'done':False,'is_error':False,'tool_calls':meta['tool_calls']} + except (jsonschema.ValidationError, DataError, IntegrityError) as exc: + + + return {'content':'Error: '+str(exc),'done':False,'is_error':True, + 'error_kind':'business_argument_error','tool_calls':meta['tool_calls']} + except Exception as exc: + frames=traceback.extract_tb(exc.__traceback__) + invalid_date=isinstance(exc,ValueError) and any( + (frame.name=='_strptime' and frame.filename.endswith('/_strptime.py')) + or (frame.filename.endswith('/original_api.py') + and '.fromisoformat(' in (frame.line or '')) + for frame in frames) + if invalid_date: + return {'content':'Error: '+str(exc),'done':False,'is_error':True, + 'error_kind':'business_date_error','tool_calls':meta['tool_calls']} + match=re.match(r'^Error calling '+re.escape(name)+r'\. Status code: (\d{3})\. Response:',str(exc)) + if match and 400<=int(match.group(1))<500: + return {'content':'Error: '+str(exc),'done':False,'is_error':True, + 'error_kind':'business_http_'+match.group(1),'tool_calls':meta['tool_calls']} + kind='api_http_'+match.group(1) if match else type(exc).__name__ + raise AWMInfrastructureError(kind) from exc + + def finalize(self): + meta=self.metadata();meta['done']=True;self.save(meta) + return {'content':'Episode finalized.','done':True,'tool_calls':meta['tool_calls']} + + def verify(self): + original=load('original_task_verifier',self.private/'original_verifier.py') + result=original.verify_task_completion(str(self.initial),str(self.final),None) + return {'reward':float(result.get('result')=='complete'),'original_result':result, + 'task_id':self.source['task_id'],'tool_calls':self.metadata()['tool_calls']} + + + +async def main(): + controller=Controller(private=sys.argv[1],state=sys.argv[2]);operation=sys.argv[3] + request=json.loads(base64.b64decode(sys.argv[4])) if len(sys.argv)>4 else {} + if operation=='reset':result=controller.reset() + elif operation=='call':result=await controller.call(request['name'],request['arguments']) + elif operation=='finalize':result=controller.finalize() + elif operation=='verify': + result=controller.verify() + else:raise ValueError('Unknown trusted controller operation') + await controller.close() + print(json.dumps(result,ensure_ascii=False,allow_nan=False)) + + +if __name__=='__main__':asyncio.run(main()) diff --git a/components/awm/runtime/common/__init__.py b/components/awm/runtime/common/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/components/awm/runtime/common/__init__.py @@ -0,0 +1 @@ + diff --git a/components/awm/runtime/common/contracts.py b/components/awm/runtime/common/contracts.py new file mode 100644 index 0000000000000000000000000000000000000000..b33d03fd3c21f3b117be3a4664274c109ac6fa9d --- /dev/null +++ b/components/awm/runtime/common/contracts.py @@ -0,0 +1,7 @@ + +from copy import deepcopy + +ACTION_SCHEMA = {'type': 'object', 'description': 'Return one action object per reply, then wait for its observation. To finish, send {"op":"finish"}. A command is a JSON string: encode newlines as \\n and internal double quotes as \\". Do not wrap the object in prose, Markdown, or tags.', 'examples': [{'op': 'finish'}], 'oneOf': [{'properties': {'op': {'const': 'exec'}, 'command': {'type': 'string'}}, 'required': ['op', 'command'], 'additionalProperties': False}, {'properties': {'op': {'const': 'call'}, 'tool': {'type': 'string'}, 'arguments': {'type': 'object'}}, 'required': ['op', 'tool', 'arguments'], 'additionalProperties': False}, {'properties': {'op': {'const': 'finish'}}, 'required': ['op'], 'additionalProperties': False}]} + +def observation_payload(task_id, message, data=None, reward=0.0, done=False): + return {"task_id": str(task_id), "message": str(message), "data": {} if data is None else data, "reward": reward, "done": bool(done), "metadata": {}} diff --git a/components/awm/runtime/common/http_routes.py b/components/awm/runtime/common/http_routes.py new file mode 100644 index 0000000000000000000000000000000000000000..a3ab94f85fc92d044895d022d16d4659be018d8b --- /dev/null +++ b/components/awm/runtime/common/http_routes.py @@ -0,0 +1,64 @@ + +from threading import RLock +from contextlib import asynccontextmanager +from copy import deepcopy +from fastapi import HTTPException +from pydantic import ValidationError +from starlette.concurrency import run_in_threadpool +from openenv.core.env_server.serialization import serialize_observation +from openenv.core.env_server.types import ResetRequest,ResetResponse,StepRequest,StepResponse +from .models import ArenaAction + + +def install_persistent_http_routes(app,env,conflict_error=None): + lock=RLock() + app.router.routes=[route for route in app.router.routes if getattr(route,'path',None) not in {'/reset','/step','/state'}] + + def reset_sync(request): + with lock: + return ResetResponse(**serialize_observation(env.reset(**request.model_dump(exclude_unset=True)))) + + def step_sync(request): + with lock: + action=ArenaAction.model_validate(request.action) + return StepResponse(**serialize_observation(env.step(action,timeout_s=request.timeout_s))) + + def state_sync(): + with lock: + value=env.state + return value.model_copy(deep=True) if hasattr(value,'model_copy') else deepcopy(value) + + @app.post('/reset',response_model=ResetResponse) + async def reset(request:ResetRequest): + try:return await run_in_threadpool(reset_sync,request) + except (ValueError,IndexError) as exc:raise HTTPException(status_code=400,detail=str(exc)) from exc + except Exception as exc: + if conflict_error is not None and isinstance(exc,conflict_error): + raise HTTPException(status_code=409,detail=str(exc)) from exc + raise + + @app.post('/step',response_model=StepResponse) + async def step(request:StepRequest): + try:return await run_in_threadpool(step_sync,request) + except (ValueError,ValidationError) as exc:raise HTTPException(status_code=422,detail=str(exc)) from exc + + @app.get('/state') + async def state(): + return await run_in_threadpool(state_sync) + + def shutdown(): + with lock:env.close() + + + + + original_lifespan=app.router.lifespan_context + + @asynccontextmanager + async def lifespan(application): + async with original_lifespan(application) as state: + try:yield state + finally:await run_in_threadpool(shutdown) + + app.router.lifespan_context=lifespan + return lock diff --git a/components/awm/runtime/common/models.py b/components/awm/runtime/common/models.py new file mode 100644 index 0000000000000000000000000000000000000000..b862e2d3259ab1c55bbb46e6423587b742dbcc51 --- /dev/null +++ b/components/awm/runtime/common/models.py @@ -0,0 +1,54 @@ + +from copy import deepcopy +import math +from typing import Any, Literal +import jsonschema +from openenv.core.env_server.types import Action, Observation +from pydantic import ConfigDict, Field, model_serializer, model_validator +from .contracts import ACTION_SCHEMA + + +class ArenaAction(Action): + model_config=ConfigDict(extra='forbid',frozen=True,validate_assignment=False) + op: Literal['exec', 'call', 'finish'] + command: str | None = None + tool: str | None = None + arguments: dict[str, Any] | None = None + + @model_validator(mode='before') + @classmethod + def exact_contract(cls, value): + if isinstance(value, cls): + return value + def finite(item): + if isinstance(item,float) and not math.isfinite(item): + raise ValueError('Non-finite JSON number') + if isinstance(item,dict): + for part in item.values():finite(part) + elif isinstance(item,list): + for part in item:finite(part) + finite(value) + try: + jsonschema.Draft202012Validator(ACTION_SCHEMA).validate(value) + except jsonschema.ValidationError as exc: + raise ValueError(exc.message) from exc + return value + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema, handler): + return deepcopy(ACTION_SCHEMA) + + def action_payload(self): + if self.op=='exec':return {'op':'exec','command':self.command} + if self.op=='call':return {'op':'call','tool':self.tool,'arguments':self.arguments} + return {'op':'finish'} + + @model_serializer + def canonical_serialization(self): + return self.action_payload() + + +class ArenaObservation(Observation): + task_id: str = '' + message: str = '' + data: dict[str, Any] = Field(default_factory=dict) diff --git a/components/awm/upstream/README.md b/components/awm/upstream/README.md new file mode 100644 index 0000000000000000000000000000000000000000..023df63ad4e6cc41d0765094261c76c1c908d1d4 --- /dev/null +++ b/components/awm/upstream/README.md @@ -0,0 +1,89 @@ +--- +license: "cc-by-4.0" +language: +- en +tags: +- agent +- tool-use +- reinforcement-learning +- mcp +- synthetic +pretty_name: "agent-world-model" +viewer: false +--- + +

AgentWorldModel-1K

+ +

Agent World Model: Infinity Synthetic Environments for Agentic Reinforcement Learning

+ +

+ Zhaoyang Wang1, + Canwen Xu2, + Boyi Liu2, + Yite Wang2, + Siwei Han1,
+ Zhewei Yao2, + Huaxiu Yao1, + Yuxiong He2 +

+

+ 1UNC-Chapel Hill   2Snowflake AI Research   +

+ + + +# Overview + +**AgentWorldModel-1K** contains 1,000 fully synthetic, executable, SQL database-backed tool-use environments exposed via a unified MCP (Model Context Protocol) interface, designed for large-scale multi-turn agentic reinforcement learning. + +Each environment is synthesized through the **Agent World Model (AWM)** pipeline: + +1. **Scenario** — A high-level description (e.g., "an online shopping platform") +2. **Tasks** — 10 user tasks per scenario that serve as functional requirements +3. **Database** — SQLite database schema and sample data as the state backend +4. **Interface** — Python interface layer (FastAPI + MCP) as the action/observation space +5. **Verification** — Verification code that inspects database state changes for reward signals + +For the full synthesis pipeline, please visit [https://github.com/Snowflake-Labs/agent-world-model](https://github.com/Snowflake-Labs/agent-world-model). + +# Resources +Related resources are also available, please check: + +| Resource | Link | +|----------|------| +| 📄 Paper | [📄 arxiv.org/abs/2602.10090](https://arxiv.org/abs/2602.10090) | +| 💻 Code | [💻 Snowflake-Labs/agent-world-model](https://github.com/Snowflake-Labs/agent-world-model) | +| 📦 AgentWorldModel-1K | [🤗 Snowflake/AgentWorldModel-1K](https://huggingface.co/datasets/Snowflake/AgentWorldModel-1K) | +| 🤖 Arctic-AWM-4B | [🤗 Snowflake/Arctic-AWM-4B](https://huggingface.co/Snowflake/Arctic-AWM-4B) | +| 🤖 Arctic-AWM-8B | [🤗 Snowflake/Arctic-AWM-8B](https://huggingface.co/Snowflake/Arctic-AWM-8B) | +| 🤖 Arctic-AWM-14B | [🤗 Snowflake/Arctic-AWM-14B](https://huggingface.co/Snowflake/Arctic-AWM-14B) | + + +# Dataset Files + +| File | #Entries | Description | +|------|----------|-------------| +| `gen_scenario.jsonl` | 1,000 | Synthesized scenario descriptions | +| `gen_tasks.jsonl` | 1,000 | 10 user tasks per scenario | +| `gen_db.jsonl` | 1,000 | Database schema definitions for each scenario | +| `gen_sample.jsonl` | 1,000 | Sample data to populate the initial database state | +| `gen_spec.jsonl` | 1,000 | API specifications for each scenario's interface | +| `gen_envs.jsonl` | 1,000 | MCP environment code (FastAPI + MCP server) | +| `gen_verifier.jsonl` | 10K | Verification code for code-augmented LLM-as-a-Judge | +| `gen_verifier.pure_code.jsonl` | 10K | Verification code for purely code-based Judge | + +# Citation + +If you find this resource useful, please kindly cite: + +```bibtex +@article{wang2026agentworldmodelinfinity, + title={Agent World Model: Infinity Synthetic Environments for Agentic Reinforcement Learning}, + author={Zhaoyang Wang and Canwen Xu and Boyi Liu and Yite Wang and Siwei Han and Zhewei Yao and Huaxiu Yao and Yuxiong He}, + year={2026}, + eprint={2602.10090}, + archivePrefix={arXiv}, + primaryClass={cs.AI}, + url={https://arxiv.org/abs/2602.10090}, +} +``` diff --git a/components/awm/upstream/accounting_1-gen_db.jsonl b/components/awm/upstream/accounting_1-gen_db.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..9bd90ff23d72eab13b2342b578624ff33415b15e --- /dev/null +++ b/components/awm/upstream/accounting_1-gen_db.jsonl @@ -0,0 +1 @@ +{"scenario": "accounting_1", "db_schema": {"tables": [{"name": "users", "ddl": "CREATE TABLE users (\n id INTEGER PRIMARY KEY,\n username TEXT UNIQUE NOT NULL,\n email TEXT UNIQUE NOT NULL,\n full_name TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME\n);", "indexes": ["CREATE INDEX idx_users_email ON users(email);"]}, {"name": "departments", "ddl": "CREATE TABLE departments (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n description TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME\n);", "indexes": ["CREATE UNIQUE INDEX idx_departments_name ON departments(name);"]}, {"name": "tax_categories", "ddl": "CREATE TABLE tax_categories (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n description TEXT,\n rate REAL NOT NULL CHECK(rate >= 0),\n is_compound INTEGER NOT NULL DEFAULT 0 CHECK(is_compound IN (0,1)),\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME\n);", "indexes": ["CREATE UNIQUE INDEX idx_tax_categories_name ON tax_categories(name);"]}, {"name": "payment_terms", "ddl": "CREATE TABLE payment_terms (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n days INTEGER NOT NULL CHECK(days >= 0),\n description TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME\n);", "indexes": ["CREATE UNIQUE INDEX idx_payment_terms_name ON payment_terms(name);"]}, {"name": "customers", "ddl": "CREATE TABLE customers (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n billing_email TEXT,\n payment_terms_id INTEGER,\n default_tax_category_id INTEGER,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (payment_terms_id) REFERENCES payment_terms(id),\n FOREIGN KEY (default_tax_category_id) REFERENCES tax_categories(id)\n);", "indexes": ["CREATE UNIQUE INDEX idx_customers_name ON customers(name);", "CREATE INDEX idx_customers_payment_terms_id ON customers(payment_terms_id);", "CREATE INDEX idx_customers_tax_category_id ON customers(default_tax_category_id);"]}, {"name": "vendors", "ddl": "CREATE TABLE vendors (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n contact_email TEXT,\n payment_terms_id INTEGER,\n default_expense_category_id INTEGER,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (payment_terms_id) REFERENCES payment_terms(id),\n FOREIGN KEY (default_expense_category_id) REFERENCES accounts(id)\n);", "indexes": ["CREATE UNIQUE INDEX idx_vendors_name ON vendors(name);", "CREATE INDEX idx_vendors_payment_terms_id ON vendors(payment_terms_id);", "CREATE INDEX idx_vendors_expense_category_id ON vendors(default_expense_category_id);"]}, {"name": "accounts", "ddl": "CREATE TABLE accounts (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n code TEXT,\n type TEXT NOT NULL CHECK(type IN ('asset','liability','equity','income','expense','contra')), \n sub_type TEXT,\n is_active INTEGER NOT NULL DEFAULT 1 CHECK(is_active IN (0,1)),\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME\n);", "indexes": ["CREATE UNIQUE INDEX idx_accounts_name ON accounts(name);", "CREATE INDEX idx_accounts_type ON accounts(type);"]}, {"name": "bank_accounts", "ddl": "CREATE TABLE bank_accounts (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n institution_name TEXT,\n account_number_masked TEXT,\n account_id INTEGER NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (account_id) REFERENCES accounts(id)\n);", "indexes": ["CREATE UNIQUE INDEX idx_bank_accounts_name ON bank_accounts(name);", "CREATE INDEX idx_bank_accounts_account_id ON bank_accounts(account_id);"]}, {"name": "invoices", "ddl": "CREATE TABLE invoices (\n id INTEGER PRIMARY KEY,\n invoice_number TEXT NOT NULL UNIQUE,\n customer_id INTEGER NOT NULL,\n department_id INTEGER,\n tax_category_id INTEGER,\n invoice_date DATE NOT NULL,\n due_date DATE NOT NULL,\n currency TEXT NOT NULL DEFAULT 'USD',\n status TEXT NOT NULL CHECK(status IN ('draft','open','paid','void')), \n subtotal REAL NOT NULL DEFAULT 0 CHECK(subtotal >= 0),\n tax_amount REAL NOT NULL DEFAULT 0 CHECK(tax_amount >= 0),\n total REAL NOT NULL DEFAULT 0 CHECK(total >= 0),\n balance_due REAL NOT NULL DEFAULT 0,\n payment_terms_id INTEGER,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (customer_id) REFERENCES customers(id),\n FOREIGN KEY (department_id) REFERENCES departments(id),\n FOREIGN KEY (tax_category_id) REFERENCES tax_categories(id),\n FOREIGN KEY (payment_terms_id) REFERENCES payment_terms(id)\n);", "indexes": ["CREATE UNIQUE INDEX idx_invoices_invoice_number ON invoices(invoice_number);", "CREATE INDEX idx_invoices_customer_id ON invoices(customer_id);", "CREATE INDEX idx_invoices_department_id ON invoices(department_id);", "CREATE INDEX idx_invoices_tax_category_id ON invoices(tax_category_id);", "CREATE INDEX idx_invoices_invoice_date ON invoices(invoice_date);"]}, {"name": "invoice_line_items", "ddl": "CREATE TABLE invoice_line_items (\n id INTEGER PRIMARY KEY,\n invoice_id INTEGER NOT NULL,\n description TEXT NOT NULL,\n quantity REAL NOT NULL CHECK(quantity > 0),\n unit_price REAL NOT NULL CHECK(unit_price >= 0),\n discount_percent REAL NOT NULL DEFAULT 0 CHECK(discount_percent >= 0 AND discount_percent <= 100),\n line_subtotal REAL NOT NULL DEFAULT 0 CHECK(line_subtotal >= 0),\n tax_amount REAL NOT NULL DEFAULT 0 CHECK(tax_amount >= 0),\n total REAL NOT NULL DEFAULT 0 CHECK(total >= 0),\n revenue_account_id INTEGER,\n department_id INTEGER,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (invoice_id) REFERENCES invoices(id) ON DELETE CASCADE,\n FOREIGN KEY (revenue_account_id) REFERENCES accounts(id),\n FOREIGN KEY (department_id) REFERENCES departments(id)\n);", "indexes": ["CREATE INDEX idx_invoice_line_items_invoice_id ON invoice_line_items(invoice_id);", "CREATE INDEX idx_invoice_line_items_department_id ON invoice_line_items(department_id);"]}, {"name": "payments", "ddl": "CREATE TABLE payments (\n id INTEGER PRIMARY KEY,\n customer_id INTEGER NOT NULL,\n payment_date DATE NOT NULL,\n settlement_date DATE,\n amount REAL NOT NULL CHECK(amount > 0),\n currency TEXT NOT NULL DEFAULT 'USD',\n method TEXT NOT NULL,\n reference TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (customer_id) REFERENCES customers(id)\n);", "indexes": ["CREATE INDEX idx_payments_customer_id ON payments(customer_id);", "CREATE INDEX idx_payments_payment_date ON payments(payment_date);"]}, {"name": "payment_applications", "ddl": "CREATE TABLE payment_applications (\n id INTEGER PRIMARY KEY,\n payment_id INTEGER NOT NULL,\n invoice_id INTEGER NOT NULL,\n amount REAL NOT NULL CHECK(amount > 0),\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (payment_id) REFERENCES payments(id) ON DELETE CASCADE,\n FOREIGN KEY (invoice_id) REFERENCES invoices(id) ON DELETE CASCADE\n);", "indexes": ["CREATE INDEX idx_payment_applications_payment_id ON payment_applications(payment_id);", "CREATE INDEX idx_payment_applications_invoice_id ON payment_applications(invoice_id);"]}, {"name": "bills", "ddl": "CREATE TABLE bills (\n id INTEGER PRIMARY KEY,\n bill_number TEXT,\n vendor_id INTEGER NOT NULL,\n bill_date DATE NOT NULL,\n due_date DATE,\n currency TEXT NOT NULL DEFAULT 'USD',\n amount REAL NOT NULL CHECK(amount >= 0),\n description TEXT,\n department_id INTEGER,\n reimbursement_status TEXT NOT NULL CHECK(reimbursement_status IN ('Not Reimbursable','Reimbursable','Reimbursed')),\n payment_terms_id INTEGER,\n status TEXT NOT NULL DEFAULT 'open' CHECK(status IN ('open','paid','void')),\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (vendor_id) REFERENCES vendors(id),\n FOREIGN KEY (department_id) REFERENCES departments(id),\n FOREIGN KEY (payment_terms_id) REFERENCES payment_terms(id)\n);", "indexes": ["CREATE INDEX idx_bills_vendor_id ON bills(vendor_id);", "CREATE INDEX idx_bills_department_id ON bills(department_id);", "CREATE INDEX idx_bills_bill_date ON bills(bill_date);"]}, {"name": "recurring_expenses", "ddl": "CREATE TABLE recurring_expenses (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL,\n vendor_id INTEGER,\n amount REAL NOT NULL CHECK(amount >= 0),\n expense_account_id INTEGER NOT NULL,\n department_id INTEGER,\n frequency TEXT NOT NULL CHECK(frequency IN ('daily','weekly','monthly','quarterly','yearly')),\n next_run_date DATE NOT NULL,\n end_date DATE,\n is_active INTEGER NOT NULL DEFAULT 1 CHECK(is_active IN (0,1)),\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (vendor_id) REFERENCES vendors(id),\n FOREIGN KEY (expense_account_id) REFERENCES accounts(id),\n FOREIGN KEY (department_id) REFERENCES departments(id)\n);", "indexes": ["CREATE INDEX idx_recurring_expenses_vendor_id ON recurring_expenses(vendor_id);", "CREATE INDEX idx_recurring_expenses_next_run_date ON recurring_expenses(next_run_date);", "CREATE INDEX idx_recurring_expenses_department_id ON recurring_expenses(department_id);"]}, {"name": "bank_transactions", "ddl": "CREATE TABLE bank_transactions (\n id INTEGER PRIMARY KEY,\n bank_account_id INTEGER NOT NULL,\n transaction_date DATE NOT NULL,\n posted_date DATE,\n description TEXT NOT NULL,\n amount REAL NOT NULL,\n external_id TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (bank_account_id) REFERENCES bank_accounts(id)\n);", "indexes": ["CREATE INDEX idx_bank_transactions_account_id ON bank_transactions(bank_account_id);", "CREATE INDEX idx_bank_transactions_date ON bank_transactions(transaction_date);"]}, {"name": "journal_entries", "ddl": "CREATE TABLE journal_entries (\n id INTEGER PRIMARY KEY,\n entry_date DATE NOT NULL,\n description TEXT,\n department_id INTEGER,\n source TEXT,\n source_id INTEGER,\n created_by_user_id INTEGER,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (department_id) REFERENCES departments(id),\n FOREIGN KEY (created_by_user_id) REFERENCES users(id)\n);", "indexes": ["CREATE INDEX idx_journal_entries_entry_date ON journal_entries(entry_date);", "CREATE INDEX idx_journal_entries_department_id ON journal_entries(department_id);"]}, {"name": "journal_entry_lines", "ddl": "CREATE TABLE journal_entry_lines (\n id INTEGER PRIMARY KEY,\n journal_entry_id INTEGER NOT NULL,\n account_id INTEGER NOT NULL,\n department_id INTEGER,\n description TEXT,\n debit REAL NOT NULL DEFAULT 0 CHECK(debit >= 0),\n credit REAL NOT NULL DEFAULT 0 CHECK(credit >= 0),\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (journal_entry_id) REFERENCES journal_entries(id) ON DELETE CASCADE,\n FOREIGN KEY (account_id) REFERENCES accounts(id),\n FOREIGN KEY (department_id) REFERENCES departments(id)\n);", "indexes": ["CREATE INDEX idx_journal_entry_lines_entry_id ON journal_entry_lines(journal_entry_id);", "CREATE INDEX idx_journal_entry_lines_account_id ON journal_entry_lines(account_id);", "CREATE INDEX idx_journal_entry_lines_department_id ON journal_entry_lines(department_id);"]}, {"name": "bank_transaction_journal_links", "ddl": "CREATE TABLE bank_transaction_journal_links (\n id INTEGER PRIMARY KEY,\n bank_transaction_id INTEGER NOT NULL,\n journal_entry_id INTEGER NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (bank_transaction_id) REFERENCES bank_transactions(id) ON DELETE CASCADE,\n FOREIGN KEY (journal_entry_id) REFERENCES journal_entries(id) ON DELETE CASCADE\n);", "indexes": ["CREATE INDEX idx_bt_journal_links_bt_id ON bank_transaction_journal_links(bank_transaction_id);", "CREATE INDEX idx_bt_journal_links_je_id ON bank_transaction_journal_links(journal_entry_id);"]}, {"name": "recurring_invoices", "ddl": "CREATE TABLE recurring_invoices (\n id INTEGER PRIMARY KEY,\n customer_id INTEGER NOT NULL,\n name TEXT NOT NULL,\n description TEXT,\n quantity REAL NOT NULL CHECK(quantity > 0),\n unit_price REAL NOT NULL CHECK(unit_price >= 0),\n discount_percent REAL NOT NULL DEFAULT 0 CHECK(discount_percent >= 0 AND discount_percent <= 100),\n frequency TEXT NOT NULL CHECK(frequency IN ('daily','weekly','monthly','quarterly','yearly')),\n next_run_date DATE NOT NULL,\n end_date DATE,\n payment_terms_id INTEGER,\n tax_category_id INTEGER,\n department_id INTEGER,\n currency TEXT NOT NULL DEFAULT 'USD',\n is_active INTEGER NOT NULL DEFAULT 1 CHECK(is_active IN (0,1)),\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n FOREIGN KEY (customer_id) REFERENCES customers(id),\n FOREIGN KEY (payment_terms_id) REFERENCES payment_terms(id),\n FOREIGN KEY (tax_category_id) REFERENCES tax_categories(id),\n FOREIGN KEY (department_id) REFERENCES departments(id)\n);", "indexes": ["CREATE INDEX idx_recurring_invoices_customer_id ON recurring_invoices(customer_id);", "CREATE INDEX idx_recurring_invoices_next_run_date ON recurring_invoices(next_run_date);", "CREATE INDEX idx_recurring_invoices_department_id ON recurring_invoices(department_id);"]}, {"name": "accounting_periods", "ddl": "CREATE TABLE accounting_periods (\n id INTEGER PRIMARY KEY,\n start_date DATE NOT NULL,\n end_date DATE NOT NULL,\n close_date DATE,\n is_locked INTEGER NOT NULL DEFAULT 0 CHECK(is_locked IN (0,1)),\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME,\n CHECK (start_date <= end_date)\n);", "indexes": ["CREATE INDEX idx_accounting_periods_start_end ON accounting_periods(start_date, end_date);", "CREATE INDEX idx_accounting_periods_is_locked ON accounting_periods(is_locked);"]}]}, "db_path": "./outputs/databases/accounting_1.db"} diff --git a/components/awm/upstream/accounting_1-gen_envs.jsonl b/components/awm/upstream/accounting_1-gen_envs.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..6d56e0a719a85ee8de01e7efb038cb8ac1ef899f --- /dev/null +++ b/components/awm/upstream/accounting_1-gen_envs.jsonl @@ -0,0 +1 @@ +{"scenario": "accounting_1", "db_path": "./outputs/databases/accounting_1.db", "full_code": "from fastapi import FastAPI, Query, Path, Body\nfrom pydantic import BaseModel, Field, ConfigDict\nfrom typing import Optional, List, Dict\nfrom datetime import datetime, date\nimport os\nfrom sqlalchemy import (\n create_engine,\n Column,\n Integer,\n String,\n DateTime,\n Date,\n Float,\n Text,\n ForeignKey,\n CheckConstraint,\n Index,\n)\nfrom sqlalchemy.orm import declarative_base, relationship, sessionmaker\n\ndatabase_url = os.getenv(\"DATABASE_PATH\", \"sqlite:///outputs/databases/zenledger_small_business_accounting_suite.db\")\nengine = create_engine(database_url, future=True)\nSessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False, future=True)\nBase = declarative_base()\n\nclass User(Base):\n __tablename__ = \"users\"\n id = Column(Integer, primary_key=True)\n username = Column(Text, unique=True, nullable=False)\n email = Column(Text, unique=True, nullable=False)\n full_name = Column(Text)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass Department(Base):\n __tablename__ = \"departments\"\n id = Column(Integer, primary_key=True)\n name = Column(Text, unique=True, nullable=False)\n description = Column(Text)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass TaxCategory(Base):\n __tablename__ = \"tax_categories\"\n id = Column(Integer, primary_key=True)\n name = Column(Text, unique=True, nullable=False)\n description = Column(Text)\n rate = Column(Float, nullable=False)\n is_compound = Column(Integer, nullable=False, default=0)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass PaymentTerm(Base):\n __tablename__ = \"payment_terms\"\n id = Column(Integer, primary_key=True)\n name = Column(Text, unique=True, nullable=False)\n days = Column(Integer, nullable=False)\n description = Column(Text)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass Customer(Base):\n __tablename__ = \"customers\"\n id = Column(Integer, primary_key=True)\n name = Column(Text, unique=True, nullable=False)\n billing_email = Column(Text)\n payment_terms_id = Column(Integer, ForeignKey(\"payment_terms.id\"))\n default_tax_category_id = Column(Integer, ForeignKey(\"tax_categories.id\"))\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass Account(Base):\n __tablename__ = \"accounts\"\n id = Column(Integer, primary_key=True)\n name = Column(Text, unique=True, nullable=False)\n code = Column(Text)\n type = Column(Text, nullable=False)\n sub_type = Column(Text)\n is_active = Column(Integer, nullable=False, default=1)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass Vendor(Base):\n __tablename__ = \"vendors\"\n id = Column(Integer, primary_key=True)\n name = Column(Text, unique=True, nullable=False)\n contact_email = Column(Text)\n payment_terms_id = Column(Integer, ForeignKey(\"payment_terms.id\"))\n default_expense_category_id = Column(Integer, ForeignKey(\"accounts.id\"))\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass BankAccount(Base):\n __tablename__ = \"bank_accounts\"\n id = Column(Integer, primary_key=True)\n name = Column(Text, unique=True, nullable=False)\n institution_name = Column(Text)\n account_number_masked = Column(Text)\n account_id = Column(Integer, ForeignKey(\"accounts.id\"), nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass Invoice(Base):\n __tablename__ = \"invoices\"\n id = Column(Integer, primary_key=True)\n invoice_number = Column(Text, unique=True, nullable=False)\n customer_id = Column(Integer, ForeignKey(\"customers.id\"), nullable=False)\n department_id = Column(Integer, ForeignKey(\"departments.id\"))\n tax_category_id = Column(Integer, ForeignKey(\"tax_categories.id\"))\n invoice_date = Column(Date, nullable=False)\n due_date = Column(Date, nullable=False)\n currency = Column(Text, nullable=False, default=\"USD\")\n status = Column(Text, nullable=False)\n subtotal = Column(Float, nullable=False, default=0.0)\n tax_amount = Column(Float, nullable=False, default=0.0)\n total = Column(Float, nullable=False, default=0.0)\n balance_due = Column(Float, nullable=False, default=0.0)\n payment_terms_id = Column(Integer, ForeignKey(\"payment_terms.id\"))\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass InvoiceLineItem(Base):\n __tablename__ = \"invoice_line_items\"\n id = Column(Integer, primary_key=True)\n invoice_id = Column(Integer, ForeignKey(\"invoices.id\", ondelete=\"CASCADE\"), nullable=False)\n description = Column(Text, nullable=False)\n quantity = Column(Float, nullable=False)\n unit_price = Column(Float, nullable=False)\n discount_percent = Column(Float, nullable=False, default=0.0)\n line_subtotal = Column(Float, nullable=False, default=0.0)\n tax_amount = Column(Float, nullable=False, default=0.0)\n total = Column(Float, nullable=False, default=0.0)\n revenue_account_id = Column(Integer, ForeignKey(\"accounts.id\"))\n department_id = Column(Integer, ForeignKey(\"departments.id\"))\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass Payment(Base):\n __tablename__ = \"payments\"\n id = Column(Integer, primary_key=True)\n customer_id = Column(Integer, ForeignKey(\"customers.id\"), nullable=False)\n payment_date = Column(Date, nullable=False)\n settlement_date = Column(Date)\n amount = Column(Float, nullable=False)\n currency = Column(Text, nullable=False, default=\"USD\")\n method = Column(Text, nullable=False)\n reference = Column(Text)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass PaymentApplication(Base):\n __tablename__ = \"payment_applications\"\n id = Column(Integer, primary_key=True)\n payment_id = Column(Integer, ForeignKey(\"payments.id\", ondelete=\"CASCADE\"), nullable=False)\n invoice_id = Column(Integer, ForeignKey(\"invoices.id\", ondelete=\"CASCADE\"), nullable=False)\n amount = Column(Float, nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass Bill(Base):\n __tablename__ = \"bills\"\n id = Column(Integer, primary_key=True)\n bill_number = Column(Text)\n vendor_id = Column(Integer, ForeignKey(\"vendors.id\"), nullable=False)\n bill_date = Column(Date, nullable=False)\n due_date = Column(Date)\n currency = Column(Text, nullable=False, default=\"USD\")\n amount = Column(Float, nullable=False)\n description = Column(Text)\n department_id = Column(Integer, ForeignKey(\"departments.id\"))\n reimbursement_status = Column(Text, nullable=False)\n payment_terms_id = Column(Integer, ForeignKey(\"payment_terms.id\"))\n status = Column(Text, nullable=False, default=\"open\")\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass RecurringExpense(Base):\n __tablename__ = \"recurring_expenses\"\n id = Column(Integer, primary_key=True)\n name = Column(Text, nullable=False)\n vendor_id = Column(Integer, ForeignKey(\"vendors.id\"))\n amount = Column(Float, nullable=False)\n expense_account_id = Column(Integer, ForeignKey(\"accounts.id\"), nullable=False)\n department_id = Column(Integer, ForeignKey(\"departments.id\"))\n frequency = Column(Text, nullable=False)\n next_run_date = Column(Date, nullable=False)\n end_date = Column(Date)\n is_active = Column(Integer, nullable=False, default=1)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass BankTransaction(Base):\n __tablename__ = \"bank_transactions\"\n id = Column(Integer, primary_key=True)\n bank_account_id = Column(Integer, ForeignKey(\"bank_accounts.id\"), nullable=False)\n transaction_date = Column(Date, nullable=False)\n posted_date = Column(Date)\n description = Column(Text, nullable=False)\n amount = Column(Float, nullable=False)\n external_id = Column(Text)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass JournalEntry(Base):\n __tablename__ = \"journal_entries\"\n id = Column(Integer, primary_key=True)\n entry_date = Column(Date, nullable=False)\n description = Column(Text)\n department_id = Column(Integer, ForeignKey(\"departments.id\"))\n source = Column(Text)\n source_id = Column(Integer)\n created_by_user_id = Column(Integer, ForeignKey(\"users.id\"))\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass JournalEntryLine(Base):\n __tablename__ = \"journal_entry_lines\"\n id = Column(Integer, primary_key=True)\n journal_entry_id = Column(Integer, ForeignKey(\"journal_entries.id\", ondelete=\"CASCADE\"), nullable=False)\n account_id = Column(Integer, ForeignKey(\"accounts.id\"), nullable=False)\n department_id = Column(Integer, ForeignKey(\"departments.id\"))\n description = Column(Text)\n debit = Column(Float, nullable=False, default=0.0)\n credit = Column(Float, nullable=False, default=0.0)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass BankTransactionJournalLink(Base):\n __tablename__ = \"bank_transaction_journal_links\"\n id = Column(Integer, primary_key=True)\n bank_transaction_id = Column(Integer, ForeignKey(\"bank_transactions.id\", ondelete=\"CASCADE\"), nullable=False)\n journal_entry_id = Column(Integer, ForeignKey(\"journal_entries.id\", ondelete=\"CASCADE\"), nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n\nclass RecurringInvoice(Base):\n __tablename__ = \"recurring_invoices\"\n id = Column(Integer, primary_key=True)\n customer_id = Column(Integer, ForeignKey(\"customers.id\"), nullable=False)\n name = Column(Text, nullable=False)\n description = Column(Text)\n quantity = Column(Float, nullable=False)\n unit_price = Column(Float, nullable=False)\n discount_percent = Column(Float, nullable=False, default=0.0)\n frequency = Column(Text, nullable=False)\n next_run_date = Column(Date, nullable=False)\n end_date = Column(Date)\n payment_terms_id = Column(Integer, ForeignKey(\"payment_terms.id\"))\n tax_category_id = Column(Integer, ForeignKey(\"tax_categories.id\"))\n department_id = Column(Integer, ForeignKey(\"departments.id\"))\n currency = Column(Text, nullable=False, default=\"USD\")\n is_active = Column(Integer, nullable=False, default=1)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nclass AccountingPeriod(Base):\n __tablename__ = \"accounting_periods\"\n id = Column(Integer, primary_key=True)\n start_date = Column(Date, nullable=False)\n end_date = Column(Date, nullable=False)\n close_date = Column(Date)\n is_locked = Column(Integer, nullable=False, default=0)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime)\n\nIndex(\"idx_users_email\", User.email)\nIndex(\"idx_departments_name\", Department.name, unique=True)\nIndex(\"idx_tax_categories_name\", TaxCategory.name, unique=True)\nIndex(\"idx_payment_terms_name\", PaymentTerm.name, unique=True)\nIndex(\"idx_customers_name\", Customer.name, unique=True)\nIndex(\"idx_customers_payment_terms_id\", Customer.payment_terms_id)\nIndex(\"idx_customers_tax_category_id\", Customer.default_tax_category_id)\nIndex(\"idx_vendors_name\", Vendor.name, unique=True)\nIndex(\"idx_vendors_payment_terms_id\", Vendor.payment_terms_id)\nIndex(\"idx_vendors_expense_category_id\", Vendor.default_expense_category_id)\nIndex(\"idx_accounts_name\", Account.name, unique=True)\nIndex(\"idx_accounts_type\", Account.type)\nIndex(\"idx_bank_accounts_name\", BankAccount.name, unique=True)\nIndex(\"idx_bank_accounts_account_id\", BankAccount.account_id)\nIndex(\"idx_invoices_invoice_number\", Invoice.invoice_number, unique=True)\nIndex(\"idx_invoices_customer_id\", Invoice.customer_id)\nIndex(\"idx_invoices_department_id\", Invoice.department_id)\nIndex(\"idx_invoices_tax_category_id\", Invoice.tax_category_id)\nIndex(\"idx_invoices_invoice_date\", Invoice.invoice_date)\nIndex(\"idx_invoice_line_items_invoice_id\", InvoiceLineItem.invoice_id)\nIndex(\"idx_invoice_line_items_department_id\", InvoiceLineItem.department_id)\nIndex(\"idx_payments_customer_id\", Payment.customer_id)\nIndex(\"idx_payments_payment_date\", Payment.payment_date)\nIndex(\"idx_payment_applications_payment_id\", PaymentApplication.payment_id)\nIndex(\"idx_payment_applications_invoice_id\", PaymentApplication.invoice_id)\nIndex(\"idx_bills_vendor_id\", Bill.vendor_id)\nIndex(\"idx_bills_department_id\", Bill.department_id)\nIndex(\"idx_bills_bill_date\", Bill.bill_date)\nIndex(\"idx_recurring_expenses_vendor_id\", RecurringExpense.vendor_id)\nIndex(\"idx_recurring_expenses_next_run_date\", RecurringExpense.next_run_date)\nIndex(\"idx_recurring_expenses_department_id\", RecurringExpense.department_id)\nIndex(\"idx_bank_transactions_account_id\", BankTransaction.bank_account_id)\nIndex(\"idx_bank_transactions_date\", BankTransaction.transaction_date)\nIndex(\"idx_journal_entries_entry_date\", JournalEntry.entry_date)\nIndex(\"idx_journal_entries_department_id\", JournalEntry.department_id)\nIndex(\"idx_journal_entry_lines_entry_id\", JournalEntryLine.journal_entry_id)\nIndex(\"idx_journal_entry_lines_account_id\", JournalEntryLine.account_id)\nIndex(\"idx_journal_entry_lines_department_id\", JournalEntryLine.department_id)\nIndex(\"idx_bt_journal_links_bt_id\", BankTransactionJournalLink.bank_transaction_id)\nIndex(\"idx_bt_journal_links_je_id\", BankTransactionJournalLink.journal_entry_id)\nIndex(\"idx_recurring_invoices_customer_id\", RecurringInvoice.customer_id)\nIndex(\"idx_recurring_invoices_next_run_date\", RecurringInvoice.next_run_date)\nIndex(\"idx_recurring_invoices_department_id\", RecurringInvoice.department_id)\nIndex(\"idx_accounting_periods_start_end\", AccountingPeriod.start_date, AccountingPeriod.end_date)\nIndex(\"idx_accounting_periods_is_locked\", AccountingPeriod.is_locked)\n\nBase.metadata.create_all(engine)\n\napp = FastAPI(title=\"ZenLedger Small Business Accounting Suite API\", version=\"1.0.0\")\n\nclass CustomerCreateRequest(BaseModel):\n name: str = Field(..., description=\"Customer legal or display name (must be unique)\", example=\"Acme Design Studio\")\n billing_email: Optional[str] = Field(None, description=\"Primary billing email address for invoices\", example=\"billing@acmedesign.com\")\n payment_terms_id: Optional[int] = Field(None, description=\"ID of payment_terms row to use as default terms\", example=2)\n default_tax_category_id: Optional[int] = Field(None, description=\"ID of tax_categories row used as default customer tax\", example=1)\n\nclass CustomerResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Unique customer identifier\", example=10)\n name: str = Field(..., description=\"Customer name\", example=\"Acme Design Studio\")\n billing_email: Optional[str] = Field(None, description=\"Customer billing email\", example=\"billing@acmedesign.com\")\n payment_terms_id: Optional[int] = Field(None, description=\"Linked payment_terms.id or null\", example=3)\n default_tax_category_id: Optional[int] = Field(None, description=\"Linked tax_categories.id or null\", example=1)\n created_at: Optional[datetime] = Field(None, description=\"Timestamp when customer was created (ISO 8601)\", example=\"2025-01-04T10:15:23Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Timestamp for last update or null\", example=None)\n\nclass CustomersListResponse(BaseModel):\n customers: List[CustomerResponse] = Field(..., description=\"List of customers\", example=[])\n\nclass PaymentTermResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Payment terms ID\", example=3)\n name: str = Field(..., description=\"Name of payment terms\", example=\"Net 30\")\n days: int = Field(..., description=\"Number of days from invoice date to due date\", example=30)\n description: Optional[str] = Field(None, description=\"Optional description\", example=\"Payment due 30 days from invoice date\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2024-01-01T00:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=None)\n\nclass PaymentTermsListResponse(BaseModel):\n payment_terms: List[PaymentTermResponse] = Field(..., description=\"List of payment terms\", example=[])\n\nclass TaxCategoryResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Tax category ID\", example=1)\n name: str = Field(..., description=\"Tax category name\", example=\"Standard Sales Tax 8.5%\")\n description: Optional[str] = Field(None, description=\"Optional description of when this tax applies\", example=\"Standard local sales tax\")\n rate: float = Field(..., description=\"Tax rate as decimal (e.g., 0.085 for 8.5%)\", example=0.085)\n is_compound: bool = Field(..., description=\"True if tax is compounded with other taxes\", example=False)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2024-01-01T00:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=None)\n\nclass TaxCategoriesListResponse(BaseModel):\n tax_categories: List[TaxCategoryResponse] = Field(..., description=\"List of tax categories\", example=[])\n\nclass DepartmentResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Department ID\", example=2)\n name: str = Field(..., description=\"Department name\", example=\"Design\")\n description: Optional[str] = Field(None, description=\"Optional department description\", example=\"Design and creative services\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2024-01-01T00:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=None)\n\nclass DepartmentsListResponse(BaseModel):\n departments: List[DepartmentResponse] = Field(..., description=\"List of departments\", example=[])\n\nclass AccountResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Account ID\", example=50)\n name: str = Field(..., description=\"Account name\", example=\"Software Subscriptions\")\n code: Optional[str] = Field(None, description=\"Optional account code\", example=\"6100\")\n type: str = Field(..., description=\"High-level account type\", example=\"expense\")\n sub_type: Optional[str] = Field(None, description=\"Optional subtype classification\", example=\"Operating Expense\")\n is_active: bool = Field(..., description=\"Whether account can be posted to\", example=True)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2024-01-01T00:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=None)\n\nclass AccountsListResponse(BaseModel):\n accounts: List[AccountResponse] = Field(..., description=\"List of accounts\", example=[])\n\nclass BankAccountResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Bank account ID\", example=1)\n name: str = Field(..., description=\"Display name for the bank account\", example=\"Chase Business Checking ****1023\")\n institution_name: Optional[str] = Field(None, description=\"Financial institution name\", example=\"Chase\")\n account_number_masked: Optional[str] = Field(None, description=\"Masked bank account number\", example=\"****1023\")\n account_id: int = Field(..., description=\"Linked GL account ID\", example=101)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2024-01-01T00:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=None)\n\nclass BankAccountsListResponse(BaseModel):\n bank_accounts: List[BankAccountResponse] = Field(..., description=\"List of bank accounts\", example=[])\n\nclass InvoiceCreateRequest(BaseModel):\n invoice_number: str = Field(..., description=\"Unique invoice number\", example=\"INV-2025-001\")\n customer_id: int = Field(..., description=\"Customer ID that this invoice belongs to\", example=10)\n invoice_date: str = Field(..., description=\"Invoice date in ISO format YYYY-MM-DD\", example=\"2025-01-05\")\n due_date: str = Field(..., description=\"Due date in ISO format YYYY-MM-DD\", example=\"2025-02-04\")\n department_id: Optional[int] = Field(None, description=\"Department responsible for this invoice\", example=2)\n tax_category_id: Optional[int] = Field(None, description=\"Tax category applied at invoice level\", example=1)\n payment_terms_id: Optional[int] = Field(None, description=\"Payment terms to apply; defaults to customer terms if omitted\", example=3)\n currency: Optional[str] = Field(\"USD\", description=\"Currency code, defaults to USD\", example=\"USD\")\n status: Optional[str] = Field(\"draft\", description=\"Initial status (draft or open)\", example=\"open\")\n\nclass InvoiceResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Invoice ID\", example=1001)\n invoice_number: str = Field(..., description=\"Unique invoice number\", example=\"INV-2025-001\")\n customer_id: int = Field(..., description=\"Linked customer ID\", example=10)\n department_id: Optional[int] = Field(None, description=\"Linked department ID\", example=2)\n tax_category_id: Optional[int] = Field(None, description=\"Linked tax category ID\", example=1)\n invoice_date: date = Field(..., description=\"Invoice date\", example=\"2025-01-05\")\n due_date: date = Field(..., description=\"Due date\", example=\"2025-02-04\")\n currency: str = Field(..., description=\"Currency code\", example=\"USD\")\n status: str = Field(..., description=\"Invoice status\", example=\"open\")\n subtotal: float = Field(..., description=\"Sum of line_subtotals before tax\", example=2000.0)\n tax_amount: float = Field(..., description=\"Total tax applied to invoice\", example=170.0)\n total: float = Field(..., description=\"Invoice total including tax\", example=2170.0)\n balance_due: float = Field(..., description=\"Remaining balance due on invoice\", example=2170.0)\n payment_terms_id: Optional[int] = Field(None, description=\"Linked payment_terms ID\", example=3)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-05T09:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass InvoiceLineItemCreateRequest(BaseModel):\n invoice_id: int = Field(..., description=\"ID of the invoice this line belongs to\", example=1001)\n description: str = Field(..., description=\"Description of the product or service\", example=\"Logo redesign\")\n quantity: float = Field(..., description=\"Quantity of units sold\", example=1.0)\n unit_price: float = Field(..., description=\"Price per unit\", example=1200.0)\n discount_percent: Optional[float] = Field(0.0, description=\"Discount percentage applied to this line\", example=10.0)\n revenue_account_id: Optional[int] = Field(None, description=\"Revenue account to credit for this line\", example=400)\n department_id: Optional[int] = Field(None, description=\"Department for this line; overrides invoice department\", example=2)\n\nclass InvoiceLineItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Invoice line item ID\", example=5001)\n invoice_id: int = Field(..., description=\"Parent invoice ID\", example=1001)\n description: str = Field(..., description=\"Line item description\", example=\"Logo redesign\")\n quantity: float = Field(..., description=\"Quantity\", example=1.0)\n unit_price: float = Field(..., description=\"Unit price\", example=1200.0)\n discount_percent: float = Field(..., description=\"Discount percent\", example=0.0)\n line_subtotal: float = Field(..., description=\"Subtotal before tax for this line\", example=1200.0)\n tax_amount: float = Field(..., description=\"Tax for this line\", example=102.0)\n total: float = Field(..., description=\"Total including tax for this line\", example=1302.0)\n revenue_account_id: Optional[int] = Field(None, description=\"Linked revenue account ID\", example=400)\n department_id: Optional[int] = Field(None, description=\"Linked department ID\", example=2)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-05T09:10:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass InvoiceRecalculateTotalsResponse(BaseModel):\n invoice_id: int = Field(..., description=\"Invoice ID\", example=1001)\n subtotal: float = Field(..., description=\"Updated subtotal\", example=2000.0)\n tax_amount: float = Field(..., description=\"Updated tax amount\", example=170.0)\n total: float = Field(..., description=\"Updated total\", example=2170.0)\n balance_due: float = Field(..., description=\"Updated balance due after payments\", example=1270.0)\n\nclass InvoicesListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Invoice ID\", example=1001)\n invoice_number: str = Field(..., description=\"Invoice number\", example=\"INV-2025-001\")\n customer_id: int = Field(..., description=\"Customer ID\", example=10)\n invoice_date: date = Field(..., description=\"Invoice date\", example=\"2025-01-05\")\n due_date: date = Field(..., description=\"Due date\", example=\"2025-02-04\")\n status: str = Field(..., description=\"Invoice status\", example=\"open\")\n subtotal: float = Field(..., description=\"Subtotal amount\", example=2000.0)\n tax_amount: float = Field(..., description=\"Tax amount\", example=170.0)\n total: float = Field(..., description=\"Total invoice amount\", example=2170.0)\n balance_due: float = Field(..., description=\"Outstanding balance\", example=1270.0)\n department_id: Optional[int] = Field(None, description=\"Linked department ID\", example=2)\n tax_category_id: Optional[int] = Field(None, description=\"Linked tax category ID\", example=1)\n payment_terms_id: Optional[int] = Field(None, description=\"Linked payment terms ID\", example=3)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-05T09:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-10T10:00:00Z\")\n\nclass InvoicesListResponse(BaseModel):\n invoices: List[InvoicesListItemResponse] = Field(..., description=\"List of invoices\", example=[])\n\nclass PaymentCreateRequest(BaseModel):\n customer_id: int = Field(..., description=\"Customer who made the payment\", example=10)\n payment_date: str = Field(..., description=\"Date payment was received (YYYY-MM-DD)\", example=\"2025-01-10\")\n settlement_date: Optional[str] = Field(None, description=\"Date payment settled in bank (YYYY-MM-DD)\", example=\"2025-01-10\")\n amount: float = Field(..., description=\"Gross payment amount\", example=900.0)\n currency: Optional[str] = Field(\"USD\", description=\"Currency code (defaults to USD)\", example=\"USD\")\n method: str = Field(..., description=\"Payment method description\", example=\"Credit Card\")\n reference: Optional[str] = Field(None, description=\"External reference or transaction ID\", example=\"STRIPE-12345\")\n\nclass PaymentResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Payment ID\", example=2001)\n customer_id: int = Field(..., description=\"Customer ID\", example=10)\n payment_date: date = Field(..., description=\"Payment date\", example=\"2025-01-10\")\n settlement_date: Optional[date] = Field(None, description=\"Settlement date\", example=\"2025-01-10\")\n amount: float = Field(..., description=\"Payment amount\", example=900.0)\n currency: str = Field(..., description=\"Payment currency\", example=\"USD\")\n method: str = Field(..., description=\"Payment method\", example=\"Credit Card\")\n reference: Optional[str] = Field(None, description=\"External reference ID\", example=\"STRIPE-12345\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-10T12:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass PaymentApplicationCreateRequest(BaseModel):\n payment_id: int = Field(..., description=\"Payment to allocate\", example=2001)\n invoice_id: int = Field(..., description=\"Invoice receiving this payment portion\", example=1001)\n amount: float = Field(..., description=\"Amount applied from payment to invoice\", example=900.0)\n\nclass PaymentApplicationResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Payment application ID\", example=3001)\n payment_id: int = Field(..., description=\"Linked payment ID\", example=2001)\n invoice_id: int = Field(..., description=\"Linked invoice ID\", example=1001)\n amount: float = Field(..., description=\"Amount applied\", example=900.0)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-10T12:05:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass VendorCreateRequest(BaseModel):\n name: str = Field(..., description=\"Vendor legal or display name\", example=\"PixelPrint Supplies\")\n contact_email: Optional[str] = Field(None, description=\"Vendor accounts payable contact email\", example=\"accounts@pixelprint.com\")\n payment_terms_id: Optional[int] = Field(None, description=\"Default payment terms for this vendor\", example=2)\n default_expense_category_id: Optional[int] = Field(None, description=\"Default expense account for purchases from this vendor\", example=60)\n\nclass VendorResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Vendor ID\", example=20)\n name: str = Field(..., description=\"Vendor name\", example=\"PixelPrint Supplies\")\n contact_email: Optional[str] = Field(None, description=\"Vendor email\", example=\"accounts@pixelprint.com\")\n payment_terms_id: Optional[int] = Field(None, description=\"Linked payment_terms ID\", example=2)\n default_expense_category_id: Optional[int] = Field(None, description=\"Linked default expense account ID\", example=60)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-03T08:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass VendorsListResponse(BaseModel):\n vendors: List[VendorResponse] = Field(..., description=\"List of vendors\", example=[])\n\nclass BillCreateRequest(BaseModel):\n bill_number: Optional[str] = Field(None, description=\"Vendor-provided bill or invoice number\", example=\"BILL-2025-001\")\n vendor_id: int = Field(..., description=\"Vendor this bill is from\", example=20)\n bill_date: str = Field(..., description=\"Date on the vendor bill (YYYY-MM-DD)\", example=\"2025-01-03\")\n due_date: Optional[str] = Field(None, description=\"Due date if known (YYYY-MM-DD)\", example=\"2025-01-18\")\n currency: Optional[str] = Field(\"USD\", description=\"Bill currency code\", example=\"USD\")\n amount: float = Field(..., description=\"Total bill amount\", example=325.5)\n description: Optional[str] = Field(None, description=\"Description of the bill or purpose\", example=\"Printer ink and paper\")\n department_id: Optional[int] = Field(None, description=\"Department to expense this bill to\", example=3)\n reimbursement_status: str = Field(..., description=\"Reimbursement status (Not Reimbursable, Reimbursable, Reimbursed)\", example=\"Not Reimbursable\")\n payment_terms_id: Optional[int] = Field(None, description=\"Payment terms used for due_date calculation\", example=1)\n status: Optional[str] = Field(\"open\", description=\"Bill status (open, paid, void)\", example=\"open\")\n\nclass BillResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Bill ID\", example=7001)\n bill_number: Optional[str] = Field(None, description=\"Vendor bill number\", example=\"BILL-2025-001\")\n vendor_id: int = Field(..., description=\"Vendor ID\", example=20)\n bill_date: date = Field(..., description=\"Bill date\", example=\"2025-01-03\")\n due_date: Optional[date] = Field(None, description=\"Due date\", example=\"2025-01-18\")\n currency: str = Field(..., description=\"Currency code\", example=\"USD\")\n amount: float = Field(..., description=\"Bill amount\", example=325.5)\n description: Optional[str] = Field(None, description=\"Bill description\", example=\"Printer ink and paper\")\n department_id: Optional[int] = Field(None, description=\"Department ID\", example=3)\n reimbursement_status: str = Field(..., description=\"Reimbursement status\", example=\"Not Reimbursable\")\n payment_terms_id: Optional[int] = Field(None, description=\"Payment terms ID\", example=1)\n status: str = Field(..., description=\"Bill status\", example=\"open\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-03T09:30:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass RecurringExpenseCreateRequest(BaseModel):\n name: str = Field(..., description=\"Name of the recurring expense\", example=\"Monthly Co-working Space Rent\")\n vendor_id: Optional[int] = Field(None, description=\"Vendor providing the recurring service\", example=30)\n amount: float = Field(..., description=\"Recurring amount for each run\", example=650.0)\n expense_account_id: int = Field(..., description=\"Expense account ID to debit\", example=80)\n department_id: Optional[int] = Field(None, description=\"Department that bears this recurring expense\", example=4)\n frequency: str = Field(..., description=\"Run frequency (daily, weekly, monthly, quarterly, yearly)\", example=\"monthly\")\n next_run_date: str = Field(..., description=\"Next date the template should generate an expense (YYYY-MM-DD)\", example=\"2025-02-01\")\n end_date: Optional[str] = Field(None, description=\"Date after which no more runs occur\", example=\"2025-12-01\")\n is_active: Optional[bool] = Field(True, description=\"Whether this template is active\", example=True)\n\nclass RecurringExpenseResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Recurring expense template ID\", example=9001)\n name: str = Field(..., description=\"Template name\", example=\"Monthly Co-working Space Rent\")\n vendor_id: Optional[int] = Field(None, description=\"Vendor ID\", example=30)\n amount: float = Field(..., description=\"Recurring amount\", example=650.0)\n expense_account_id: int = Field(..., description=\"Expense account ID\", example=80)\n department_id: Optional[int] = Field(None, description=\"Department ID\", example=4)\n frequency: str = Field(..., description=\"Frequency\", example=\"monthly\")\n next_run_date: date = Field(..., description=\"Next run date\", example=\"2025-02-01\")\n end_date: Optional[date] = Field(None, description=\"End date\", example=\"2025-12-01\")\n is_active: bool = Field(..., description=\"Whether template is active\", example=True)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-15T09:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass BankTransactionItemRequest(BaseModel):\n transaction_date: str = Field(..., description=\"Transaction date (YYYY-MM-DD)\", example=\"2025-01-01\")\n posted_date: Optional[str] = Field(None, description=\"Posted date (YYYY-MM-DD)\", example=\"2025-01-02\")\n description: str = Field(..., description=\"Bank description\", example=\"Client payment ACME\")\n amount: float = Field(..., description=\"Transaction amount (positive or negative)\", example=1500.0)\n external_id: Optional[str] = Field(None, description=\"External bank transaction identifier\", example=\"txn_001\")\n\nclass BankTransactionsBatchImportRequest(BaseModel):\n bank_account_id: int = Field(..., description=\"Bank account ID these transactions belong to\", example=1)\n transactions: List[BankTransactionItemRequest] = Field(..., description=\"Array of bank transactions to import\", example=[])\n\nclass BankTransactionResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Bank transaction ID\", example=6001)\n bank_account_id: int = Field(..., description=\"Bank account ID\", example=1)\n transaction_date: date = Field(..., description=\"Transaction date\", example=\"2025-01-01\")\n posted_date: Optional[date] = Field(None, description=\"Posted date\", example=\"2025-01-02\")\n description: str = Field(..., description=\"Transaction description\", example=\"Client payment ACME\")\n amount: float = Field(..., description=\"Transaction amount\", example=1500.0)\n external_id: Optional[str] = Field(None, description=\"External transaction ID\", example=\"txn_001\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-07T10:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass BankTransactionsBatchImportResponse(BaseModel):\n bank_transactions: List[BankTransactionResponse] = Field(..., description=\"Imported bank transactions\", example=[])\n\nclass BankTransactionsListResponse(BaseModel):\n bank_transactions: List[BankTransactionResponse] = Field(..., description=\"List of bank transactions\", example=[])\n\nclass JournalEntryCreateRequest(BaseModel):\n entry_date: str = Field(..., description=\"Date of the journal entry (YYYY-MM-DD)\", example=\"2024-12-31\")\n description: Optional[str] = Field(None, description=\"Narrative description of the entry\", example=\"Year-end accrual for expenses\")\n department_id: Optional[int] = Field(None, description=\"Department that this entry belongs to\", example=4)\n source: Optional[str] = Field(None, description=\"System source of this entry\", example=\"manual\")\n source_id: Optional[int] = Field(None, description=\"External source ID if applicable\", example=None)\n\nclass JournalEntryResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Journal entry ID\", example=8001)\n entry_date: date = Field(..., description=\"Entry date\", example=\"2024-12-31\")\n description: Optional[str] = Field(None, description=\"Entry description\", example=\"Year-end accrual for expenses\")\n department_id: Optional[int] = Field(None, description=\"Department ID\", example=4)\n source: Optional[str] = Field(None, description=\"Source system\", example=\"manual\")\n source_id: Optional[int] = Field(None, description=\"Source record ID\", example=None)\n created_by_user_id: Optional[int] = Field(None, description=\"User who created the entry (always 1)\", example=1)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2024-12-31T23:50:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass JournalEntryLineCreateRequest(BaseModel):\n journal_entry_id: int = Field(..., description=\"Parent journal entry ID\", example=8001)\n account_id: int = Field(..., description=\"Account to debit or credit\", example=50)\n department_id: Optional[int] = Field(None, description=\"Department for this line if different from header\", example=4)\n description: Optional[str] = Field(None, description=\"Line-specific description\", example=\"Accrual for December software expenses\")\n debit: Optional[float] = Field(0.0, description=\"Debit amount (0 if this is a credit line)\", example=300.0)\n credit: Optional[float] = Field(0.0, description=\"Credit amount (0 if this is a debit line)\", example=0.0)\n\nclass JournalEntryLineResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Journal entry line ID\", example=8101)\n journal_entry_id: int = Field(..., description=\"Parent journal entry ID\", example=8001)\n account_id: int = Field(..., description=\"Account ID\", example=50)\n department_id: Optional[int] = Field(None, description=\"Department ID\", example=4)\n description: Optional[str] = Field(None, description=\"Line description\", example=\"Accrual for December software expenses\")\n debit: float = Field(..., description=\"Debit amount\", example=300.0)\n credit: float = Field(..., description=\"Credit amount\", example=0.0)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2024-12-31T23:51:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass BankTransactionJournalLinkCreateRequest(BaseModel):\n bank_transaction_id: int = Field(..., description=\"Bank transaction ID being reconciled\", example=6001)\n journal_entry_id: int = Field(..., description=\"Journal entry ID representing the accounting for this transaction\", example=8005)\n\nclass BankTransactionJournalLinkResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Link ID\", example=90001)\n bank_transaction_id: int = Field(..., description=\"Bank transaction ID\", example=6001)\n journal_entry_id: int = Field(..., description=\"Journal entry ID\", example=8005)\n created_at: Optional[datetime] = Field(None, description=\"Link creation timestamp\", example=\"2025-01-07T11:00:00Z\")\n\nclass RecurringInvoiceCreateRequest(BaseModel):\n customer_id: int = Field(..., description=\"Customer who will receive recurring invoices\", example=15)\n name: str = Field(..., description=\"Name of the recurring invoice template\", example=\"Monthly SEO Retainer\")\n description: Optional[str] = Field(None, description=\"Description of the service or product\", example=\"Monthly SEO services retainer\")\n quantity: float = Field(..., description=\"Quantity per recurring invoice\", example=1.0)\n unit_price: float = Field(..., description=\"Unit price per run\", example=1500.0)\n discount_percent: Optional[float] = Field(0.0, description=\"Discount percent per run\", example=0.0)\n frequency: str = Field(..., description=\"Frequency (daily, weekly, monthly, quarterly, yearly)\", example=\"monthly\")\n next_run_date: str = Field(..., description=\"Date of next invoice generation (YYYY-MM-DD)\", example=\"2025-02-01\")\n end_date: Optional[str] = Field(None, description=\"Final date for invoice generation\", example=\"2025-07-01\")\n payment_terms_id: Optional[int] = Field(None, description=\"Payment terms applied to generated invoices\", example=4)\n tax_category_id: Optional[int] = Field(None, description=\"Tax category for generated invoices\", example=5)\n department_id: Optional[int] = Field(None, description=\"Department for generated invoices\", example=2)\n currency: Optional[str] = Field(\"USD\", description=\"Currency for generated invoices\", example=\"USD\")\n is_active: Optional[bool] = Field(True, description=\"Whether this recurring schedule is active\", example=True)\n\nclass RecurringInvoiceResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Recurring invoice template ID\", example=9501)\n customer_id: int = Field(..., description=\"Customer ID\", example=15)\n name: str = Field(..., description=\"Template name\", example=\"Monthly SEO Retainer\")\n description: Optional[str] = Field(None, description=\"Template description\", example=\"Monthly SEO services retainer\")\n quantity: float = Field(..., description=\"Quantity per invoice\", example=1.0)\n unit_price: float = Field(..., description=\"Unit price\", example=1500.0)\n discount_percent: float = Field(..., description=\"Discount percent\", example=0.0)\n frequency: str = Field(..., description=\"Frequency\", example=\"monthly\")\n next_run_date: date = Field(..., description=\"Next run date\", example=\"2025-02-01\")\n end_date: Optional[date] = Field(None, description=\"End date\", example=\"2025-07-01\")\n payment_terms_id: Optional[int] = Field(None, description=\"Payment terms ID\", example=4)\n tax_category_id: Optional[int] = Field(None, description=\"Tax category ID\", example=5)\n department_id: Optional[int] = Field(None, description=\"Department ID\", example=2)\n currency: str = Field(..., description=\"Currency\", example=\"USD\")\n is_active: bool = Field(..., description=\"Whether template is active\", example=True)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-20T09:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass AccountingPeriodCreateRequest(BaseModel):\n start_date: str = Field(..., description=\"Start date of the period (YYYY-MM-DD)\", example=\"2024-01-01\")\n end_date: str = Field(..., description=\"End date of the period (YYYY-MM-DD)\", example=\"2024-12-31\")\n close_date: Optional[str] = Field(None, description=\"Date when the period was closed\", example=\"2024-12-31\")\n is_locked: Optional[bool] = Field(False, description=\"Whether the period is locked against changes\", example=True)\n\nclass AccountingPeriodUpdateRequest(BaseModel):\n close_date: Optional[str] = Field(None, description=\"New close date or null to clear\", example=\"2024-12-31\")\n is_locked: Optional[bool] = Field(None, description=\"Set true to lock or false to unlock\", example=True)\n\nclass AccountingPeriodResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Accounting period ID\", example=10001)\n start_date: date = Field(..., description=\"Start date\", example=\"2024-01-01\")\n end_date: date = Field(..., description=\"End date\", example=\"2024-12-31\")\n close_date: Optional[date] = Field(None, description=\"Close date or null\", example=\"2024-12-31\")\n is_locked: bool = Field(..., description=\"Locked flag\", example=True)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2024-12-31T23:55:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Update timestamp\", example=None)\n\nclass ProfitAndLossReportResponse(BaseModel):\n start_date: str = Field(..., description=\"Report start date\", example=\"2025-01-01\")\n end_date: str = Field(..., description=\"Report end date\", example=\"2025-01-31\")\n department_id: Optional[int] = Field(None, description=\"Department filter or null if not filtered\", example=2)\n total_revenue: float = Field(..., description=\"Sum of income account balances for the period\", example=5000.0)\n total_expenses: float = Field(..., description=\"Sum of expense account balances for the period\", example=3000.0)\n net_profit: float = Field(..., description=\"total_revenue - total_expenses\", example=2000.0)\n detail: Dict[str, List[Dict[str, Optional[float]]]] = Field(..., description=\"Optional breakdown of accounts\", example={\"income_accounts\": [], \"expense_accounts\": []})\n\n@app.post(\n \"/api/customers\",\n response_model=CustomerResponse,\n summary=\"Create a new customer\",\n description=\"Create a customer with optional payment terms and tax category.\",\n tags=[\"customers\"],\n operation_id=\"create_customer\",\n)\nasync def create_customer_endpoint(body: CustomerCreateRequest = Body(...)) -> CustomerResponse:\n session = SessionLocal()\n customer = Customer(\n name=body.name,\n billing_email=body.billing_email,\n payment_terms_id=body.payment_terms_id,\n default_tax_category_id=body.default_tax_category_id,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(customer)\n session.commit()\n session.refresh(customer)\n session.close()\n return CustomerResponse(\n id=customer.id,\n name=customer.name,\n billing_email=customer.billing_email,\n payment_terms_id=customer.payment_terms_id,\n default_tax_category_id=customer.default_tax_category_id,\n created_at=customer.created_at,\n updated_at=customer.updated_at,\n )\n\n@app.get(\n \"/api/customers\",\n response_model=CustomersListResponse,\n summary=\"List customers with optional filters\",\n description=\"Retrieve customers filtered by name or billing email.\",\n tags=[\"customers\"],\n operation_id=\"list_customers\",\n)\nasync def list_customers_endpoint(\n name: Optional[str] = Query(None, description=\"Filter by exact or partial customer name\", example=\"Acme\"),\n billing_email: Optional[str] = Query(None, description=\"Filter customers by billing_email exact match\", example=\"billing@acmedesign.com\"),\n limit: Optional[int] = Query(50, description=\"Maximum number of records to return\", example=50),\n offset: Optional[int] = Query(0, description=\"Number of records to skip for pagination\", example=0),\n) -> CustomersListResponse:\n session = SessionLocal()\n query = session.query(Customer)\n if name is not None:\n query = query.filter(Customer.name.contains(name))\n if billing_email is not None:\n query = query.filter(Customer.billing_email == billing_email)\n customers = query.offset(offset).limit(limit).all()\n session.close()\n return CustomersListResponse(customers=customers)\n\n@app.get(\n \"/api/customers/{customer_id}\",\n response_model=CustomerResponse,\n summary=\"Get a single customer by ID\",\n description=\"Fetch one customer by ID to inspect billing settings.\",\n tags=[\"customers\"],\n operation_id=\"get_customer\",\n)\nasync def get_customer_endpoint(\n customer_id: int = Path(..., description=\"Customer ID to retrieve\", example=10)\n) -> CustomerResponse:\n session = SessionLocal()\n customer = session.query(Customer).filter(Customer.id == customer_id).first()\n session.close()\n if customer is None:\n return CustomerResponse(\n id=0,\n name=\"\",\n billing_email=None,\n payment_terms_id=None,\n default_tax_category_id=None,\n created_at=None,\n updated_at=None,\n )\n return CustomerResponse(\n id=customer.id,\n name=customer.name,\n billing_email=customer.billing_email,\n payment_terms_id=customer.payment_terms_id,\n default_tax_category_id=customer.default_tax_category_id,\n created_at=customer.created_at,\n updated_at=customer.updated_at,\n )\n\n@app.get(\n \"/api/payment_terms\",\n response_model=PaymentTermsListResponse,\n summary=\"List payment terms\",\n description=\"Retrieve payment_terms records optionally filtered by name.\",\n tags=[\"payment_terms\"],\n operation_id=\"list_payment_terms\",\n)\nasync def list_payment_terms_endpoint(\n name: Optional[str] = Query(None, description=\"Filter terms by name\", example=\"Net 30\")\n) -> PaymentTermsListResponse:\n session = SessionLocal()\n query = session.query(PaymentTerm)\n if name is not None:\n query = query.filter(PaymentTerm.name.contains(name))\n payment_terms = query.all()\n session.close()\n return PaymentTermsListResponse(payment_terms=payment_terms)\n\n@app.get(\n \"/api/tax_categories\",\n response_model=TaxCategoriesListResponse,\n summary=\"List tax categories\",\n description=\"Retrieve available tax_categories optionally filtered by name.\",\n tags=[\"tax_categories\"],\n operation_id=\"list_tax_categories\",\n)\nasync def list_tax_categories_endpoint(\n name: Optional[str] = Query(None, description=\"Filter tax categories by exact or partial name\", example=\"Standard Sales Tax 8.5%\")\n) -> TaxCategoriesListResponse:\n session = SessionLocal()\n query = session.query(TaxCategory)\n if name is not None:\n query = query.filter(TaxCategory.name.contains(name))\n rows = query.all()\n tax_categories: List[TaxCategoryResponse] = []\n for r in rows:\n tax_categories.append(\n TaxCategoryResponse(\n id=r.id,\n name=r.name,\n description=r.description,\n rate=r.rate,\n is_compound=bool(r.is_compound),\n created_at=r.created_at,\n updated_at=r.updated_at,\n )\n )\n session.close()\n return TaxCategoriesListResponse(tax_categories=tax_categories)\n\n@app.get(\n \"/api/departments\",\n response_model=DepartmentsListResponse,\n summary=\"List departments\",\n description=\"Retrieve departments to map human-readable names to IDs.\",\n tags=[\"departments\"],\n operation_id=\"list_departments\",\n)\nasync def list_departments_endpoint(\n name: Optional[str] = Query(None, description=\"Filter departments by name\", example=\"Design\")\n) -> DepartmentsListResponse:\n session = SessionLocal()\n query = session.query(Department)\n if name is not None:\n query = query.filter(Department.name.contains(name))\n departments = query.all()\n session.close()\n return DepartmentsListResponse(departments=departments)\n\n@app.get(\n \"/api/accounts\",\n response_model=AccountsListResponse,\n summary=\"List chart of accounts\",\n description=\"Retrieve accounts filtered by type or name.\",\n tags=[\"accounts\"],\n operation_id=\"list_accounts\",\n)\nasync def list_accounts_endpoint(\n type: Optional[str] = Query(None, description=\"Filter accounts by type (asset, liability, equity, income, expense, contra)\", example=\"expense\"),\n name: Optional[str] = Query(None, description=\"Filter accounts by name\", example=\"Software Subscriptions\"),\n) -> AccountsListResponse:\n session = SessionLocal()\n query = session.query(Account)\n if type is not None:\n query = query.filter(Account.type == type)\n if name is not None:\n query = query.filter(Account.name.contains(name))\n rows = query.all()\n accounts_list: List[AccountResponse] = []\n for a in rows:\n accounts_list.append(\n AccountResponse(\n id=a.id,\n name=a.name,\n code=a.code,\n type=a.type,\n sub_type=a.sub_type,\n is_active=bool(a.is_active),\n created_at=a.created_at,\n updated_at=a.updated_at,\n )\n )\n session.close()\n return AccountsListResponse(accounts=accounts_list)\n\n@app.get(\n \"/api/bank_accounts\",\n response_model=BankAccountsListResponse,\n summary=\"List bank accounts\",\n description=\"Retrieve bank_accounts to find IDs for bank transactions.\",\n tags=[\"bank_accounts\"],\n operation_id=\"list_bank_accounts\",\n)\nasync def list_bank_accounts_endpoint(\n name: Optional[str] = Query(None, description=\"Filter bank accounts by name\", example=\"Chase Business Checking ****1023\")\n) -> BankAccountsListResponse:\n session = SessionLocal()\n query = session.query(BankAccount)\n if name is not None:\n query = query.filter(BankAccount.name.contains(name))\n bank_accounts = query.all()\n session.close()\n return BankAccountsListResponse(bank_accounts=bank_accounts)\n\n@app.post(\n \"/api/invoices\",\n response_model=InvoiceResponse,\n summary=\"Create a new invoice header\",\n description=\"Create an invoice record without line items.\",\n tags=[\"invoices\"],\n operation_id=\"create_invoice\",\n)\nasync def create_invoice_endpoint(body: InvoiceCreateRequest = Body(...)) -> InvoiceResponse:\n session = SessionLocal()\n invoice = Invoice(\n invoice_number=body.invoice_number,\n customer_id=body.customer_id,\n department_id=body.department_id,\n tax_category_id=body.tax_category_id,\n invoice_date=date.fromisoformat(body.invoice_date),\n due_date=date.fromisoformat(body.due_date),\n currency=body.currency if body.currency is not None else \"USD\",\n status=body.status if body.status is not None else \"draft\",\n subtotal=0.0,\n tax_amount=0.0,\n total=0.0,\n balance_due=0.0,\n payment_terms_id=body.payment_terms_id,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(invoice)\n session.commit()\n session.refresh(invoice)\n session.close()\n return InvoiceResponse(\n id=invoice.id,\n invoice_number=invoice.invoice_number,\n customer_id=invoice.customer_id,\n department_id=invoice.department_id,\n tax_category_id=invoice.tax_category_id,\n invoice_date=invoice.invoice_date,\n due_date=invoice.due_date,\n currency=invoice.currency,\n status=invoice.status,\n subtotal=invoice.subtotal,\n tax_amount=invoice.tax_amount,\n total=invoice.total,\n balance_due=invoice.balance_due,\n payment_terms_id=invoice.payment_terms_id,\n created_at=invoice.created_at,\n updated_at=invoice.updated_at,\n )\n\n@app.post(\n \"/api/invoice_line_items\",\n response_model=InvoiceLineItemResponse,\n summary=\"Add a line item to an invoice\",\n description=\"Create an invoice line and update invoice totals.\",\n tags=[\"invoices\", \"invoice_line_items\"],\n operation_id=\"create_invoice_line_item\",\n)\nasync def create_invoice_line_item_endpoint(\n body: InvoiceLineItemCreateRequest = Body(...)\n) -> InvoiceLineItemResponse:\n session = SessionLocal()\n invoice = session.query(Invoice).filter(Invoice.id == body.invoice_id).first()\n tax_rate = 0.0\n if invoice is not None and invoice.tax_category_id is not None:\n tax_cat = session.query(TaxCategory).filter(TaxCategory.id == invoice.tax_category_id).first()\n if tax_cat is not None:\n tax_rate = tax_cat.rate\n discount_percent = body.discount_percent if body.discount_percent is not None else 0.0\n gross = body.quantity * body.unit_price\n discount_amount = gross * (discount_percent / 100.0)\n line_subtotal = gross - discount_amount\n tax_amount = line_subtotal * tax_rate\n total = line_subtotal + tax_amount\n item = InvoiceLineItem(\n invoice_id=body.invoice_id,\n description=body.description,\n quantity=body.quantity,\n unit_price=body.unit_price,\n discount_percent=discount_percent,\n line_subtotal=line_subtotal,\n tax_amount=tax_amount,\n total=total,\n revenue_account_id=body.revenue_account_id,\n department_id=body.department_id if body.department_id is not None else (invoice.department_id if invoice is not None else None),\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(item)\n if invoice is not None:\n subtotal_sum = session.query(InvoiceLineItem).filter(InvoiceLineItem.invoice_id == invoice.id).all()\n subtotal_value = 0.0\n tax_value = 0.0\n total_value = 0.0\n for li in subtotal_sum:\n subtotal_value += li.line_subtotal\n tax_value += li.tax_amount\n total_value += li.total\n subtotal_value += line_subtotal\n tax_value += tax_amount\n total_value += total\n invoice.subtotal = subtotal_value\n invoice.tax_amount = tax_value\n invoice.total = total_value\n payments = session.query(PaymentApplication).filter(PaymentApplication.invoice_id == invoice.id).all()\n paid_amount = 0.0\n for p in payments:\n paid_amount += p.amount\n invoice.balance_due = invoice.total - paid_amount\n invoice.updated_at = datetime.utcnow()\n session.commit()\n session.refresh(item)\n session.close()\n return InvoiceLineItemResponse(\n id=item.id,\n invoice_id=item.invoice_id,\n description=item.description,\n quantity=item.quantity,\n unit_price=item.unit_price,\n discount_percent=item.discount_percent,\n line_subtotal=item.line_subtotal,\n tax_amount=item.tax_amount,\n total=item.total,\n revenue_account_id=item.revenue_account_id,\n department_id=item.department_id,\n created_at=item.created_at,\n updated_at=item.updated_at,\n )\n\n@app.post(\n \"/api/invoices/{invoice_id}/recalculate_totals\",\n response_model=InvoiceRecalculateTotalsResponse,\n summary=\"Recalculate invoice totals\",\n description=\"Recompute totals from line items and applied payments.\",\n tags=[\"invoices\"],\n operation_id=\"recalculate_invoice_totals\",\n)\nasync def recalculate_invoice_totals_endpoint(\n invoice_id: int = Path(..., description=\"Invoice ID whose totals should be recalculated\", example=1001)\n) -> InvoiceRecalculateTotalsResponse:\n session = SessionLocal()\n invoice = session.query(Invoice).filter(Invoice.id == invoice_id).first()\n if invoice is None:\n session.close()\n return InvoiceRecalculateTotalsResponse(invoice_id=0, subtotal=0.0, tax_amount=0.0, total=0.0, balance_due=0.0)\n lines = session.query(InvoiceLineItem).filter(InvoiceLineItem.invoice_id == invoice_id).all()\n subtotal = 0.0\n tax_amount = 0.0\n total = 0.0\n for li in lines:\n subtotal += li.line_subtotal\n tax_amount += li.tax_amount\n total += li.total\n payments = session.query(PaymentApplication).filter(PaymentApplication.invoice_id == invoice_id).all()\n paid_amount = 0.0\n for pa in payments:\n paid_amount += pa.amount\n invoice.subtotal = subtotal\n invoice.tax_amount = tax_amount\n invoice.total = total\n invoice.balance_due = total - paid_amount\n invoice.updated_at = datetime.utcnow()\n session.commit()\n session.close()\n return InvoiceRecalculateTotalsResponse(\n invoice_id=invoice_id,\n subtotal=subtotal,\n tax_amount=tax_amount,\n total=total,\n balance_due=invoice.balance_due,\n )\n\n@app.get(\n \"/api/invoices\",\n response_model=InvoicesListResponse,\n summary=\"List invoices with filters\",\n description=\"Retrieve invoices filtered by number, customer, status, or dates.\",\n tags=[\"invoices\"],\n operation_id=\"list_invoices\",\n)\nasync def list_invoices_endpoint(\n invoice_number: Optional[str] = Query(None, description=\"Filter by invoice_number\", example=\"INV-2025-001\"),\n customer_id: Optional[int] = Query(None, description=\"Filter invoices for a given customer ID\", example=10),\n status: Optional[str] = Query(None, description=\"Filter by invoice status (draft, open, paid, void)\", example=\"open\"),\n from_date: Optional[str] = Query(None, description=\"Filter by minimum invoice_date (YYYY-MM-DD)\", example=\"2025-01-01\"),\n to_date: Optional[str] = Query(None, description=\"Filter by maximum invoice_date (YYYY-MM-DD)\", example=\"2025-01-31\"),\n limit: Optional[int] = Query(50, description=\"Max number of invoices to return\", example=50),\n offset: Optional[int] = Query(0, description=\"Number of invoices to skip\", example=0),\n) -> InvoicesListResponse:\n session = SessionLocal()\n query = session.query(Invoice)\n if invoice_number is not None:\n query = query.filter(Invoice.invoice_number == invoice_number)\n if customer_id is not None:\n query = query.filter(Invoice.customer_id == customer_id)\n if status is not None:\n query = query.filter(Invoice.status == status)\n if from_date is not None:\n query = query.filter(Invoice.invoice_date >= date.fromisoformat(from_date))\n if to_date is not None:\n query = query.filter(Invoice.invoice_date <= date.fromisoformat(to_date))\n invoices = query.offset(offset).limit(limit).all()\n session.close()\n return InvoicesListResponse(invoices=invoices)\n\n@app.post(\n \"/api/payments\",\n response_model=PaymentResponse,\n summary=\"Record a customer payment\",\n description=\"Create a payment row for a customer without allocations.\",\n tags=[\"payments\"],\n operation_id=\"create_payment\",\n)\nasync def create_payment_endpoint(body: PaymentCreateRequest = Body(...)) -> PaymentResponse:\n session = SessionLocal()\n payment = Payment(\n customer_id=body.customer_id,\n payment_date=date.fromisoformat(body.payment_date),\n settlement_date=date.fromisoformat(body.settlement_date) if body.settlement_date is not None else None,\n amount=body.amount,\n currency=body.currency if body.currency is not None else \"USD\",\n method=body.method,\n reference=body.reference,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(payment)\n session.commit()\n session.refresh(payment)\n session.close()\n return PaymentResponse(\n id=payment.id,\n customer_id=payment.customer_id,\n payment_date=payment.payment_date,\n settlement_date=payment.settlement_date,\n amount=payment.amount,\n currency=payment.currency,\n method=payment.method,\n reference=payment.reference,\n created_at=payment.created_at,\n updated_at=payment.updated_at,\n )\n\n@app.post(\n \"/api/payment_applications\",\n response_model=PaymentApplicationResponse,\n summary=\"Apply a payment to an invoice\",\n description=\"Allocate part or all of a payment amount to a specific invoice.\",\n tags=[\"payments\", \"payment_applications\"],\n operation_id=\"create_payment_application\",\n)\nasync def create_payment_application_endpoint(\n body: PaymentApplicationCreateRequest = Body(...)\n) -> PaymentApplicationResponse:\n session = SessionLocal()\n payment_app = PaymentApplication(\n payment_id=body.payment_id,\n invoice_id=body.invoice_id,\n amount=body.amount,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(payment_app)\n invoice = session.query(Invoice).filter(Invoice.id == body.invoice_id).first()\n if invoice is not None:\n payments = session.query(PaymentApplication).filter(PaymentApplication.invoice_id == body.invoice_id).all()\n total_applied = 0.0\n for p in payments:\n total_applied += p.amount\n total_applied += body.amount\n invoice.balance_due = invoice.total - total_applied\n if invoice.balance_due <= 0:\n invoice.status = \"paid\"\n invoice.updated_at = datetime.utcnow()\n session.commit()\n session.refresh(payment_app)\n session.close()\n return PaymentApplicationResponse(\n id=payment_app.id,\n payment_id=payment_app.payment_id,\n invoice_id=payment_app.invoice_id,\n amount=payment_app.amount,\n created_at=payment_app.created_at,\n updated_at=payment_app.updated_at,\n )\n\n@app.post(\n \"/api/vendors\",\n response_model=VendorResponse,\n summary=\"Create a new vendor\",\n description=\"Create a vendor with default payment terms and expense category.\",\n tags=[\"vendors\"],\n operation_id=\"create_vendor\",\n)\nasync def create_vendor_endpoint(body: VendorCreateRequest = Body(...)) -> VendorResponse:\n session = SessionLocal()\n vendor = Vendor(\n name=body.name,\n contact_email=body.contact_email,\n payment_terms_id=body.payment_terms_id,\n default_expense_category_id=body.default_expense_category_id,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(vendor)\n session.commit()\n session.refresh(vendor)\n session.close()\n return VendorResponse(\n id=vendor.id,\n name=vendor.name,\n contact_email=vendor.contact_email,\n payment_terms_id=vendor.payment_terms_id,\n default_expense_category_id=vendor.default_expense_category_id,\n created_at=vendor.created_at,\n updated_at=vendor.updated_at,\n )\n\n@app.get(\n \"/api/vendors\",\n response_model=VendorsListResponse,\n summary=\"List vendors\",\n description=\"Retrieve vendors to find IDs when creating bills.\",\n tags=[\"vendors\"],\n operation_id=\"list_vendors\",\n)\nasync def list_vendors_endpoint(\n name: Optional[str] = Query(None, description=\"Filter vendors by name\", example=\"PixelPrint\")\n) -> VendorsListResponse:\n session = SessionLocal()\n query = session.query(Vendor)\n if name is not None:\n query = query.filter(Vendor.name.contains(name))\n vendors = query.all()\n session.close()\n return VendorsListResponse(vendors=vendors)\n\n@app.post(\n \"/api/bills\",\n response_model=BillResponse,\n summary=\"Create a bill\",\n description=\"Create a bills row for vendor expenses.\",\n tags=[\"bills\"],\n operation_id=\"create_bill\",\n)\nasync def create_bill_endpoint(body: BillCreateRequest = Body(...)) -> BillResponse:\n session = SessionLocal()\n bill = Bill(\n bill_number=body.bill_number,\n vendor_id=body.vendor_id,\n bill_date=date.fromisoformat(body.bill_date),\n due_date=date.fromisoformat(body.due_date) if body.due_date is not None else None,\n currency=body.currency if body.currency is not None else \"USD\",\n amount=body.amount,\n description=body.description,\n department_id=body.department_id,\n reimbursement_status=body.reimbursement_status,\n payment_terms_id=body.payment_terms_id,\n status=body.status if body.status is not None else \"open\",\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(bill)\n session.commit()\n session.refresh(bill)\n session.close()\n return BillResponse(\n id=bill.id,\n bill_number=bill.bill_number,\n vendor_id=bill.vendor_id,\n bill_date=bill.bill_date,\n due_date=bill.due_date,\n currency=bill.currency,\n amount=bill.amount,\n description=bill.description,\n department_id=bill.department_id,\n reimbursement_status=bill.reimbursement_status,\n payment_terms_id=bill.payment_terms_id,\n status=bill.status,\n created_at=bill.created_at,\n updated_at=bill.updated_at,\n )\n\n@app.post(\n \"/api/recurring_expenses\",\n response_model=RecurringExpenseResponse,\n summary=\"Create a recurring expense template\",\n description=\"Create recurring_expenses templates such as monthly rent.\",\n tags=[\"recurring_expenses\"],\n operation_id=\"create_recurring_expense\",\n)\nasync def create_recurring_expense_endpoint(\n body: RecurringExpenseCreateRequest = Body(...)\n) -> RecurringExpenseResponse:\n session = SessionLocal()\n recurring = RecurringExpense(\n name=body.name,\n vendor_id=body.vendor_id,\n amount=body.amount,\n expense_account_id=body.expense_account_id,\n department_id=body.department_id,\n frequency=body.frequency,\n next_run_date=date.fromisoformat(body.next_run_date),\n end_date=date.fromisoformat(body.end_date) if body.end_date is not None else None,\n is_active=1 if (body.is_active if body.is_active is not None else True) else 0,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(recurring)\n session.commit()\n session.refresh(recurring)\n session.close()\n return RecurringExpenseResponse(\n id=recurring.id,\n name=recurring.name,\n vendor_id=recurring.vendor_id,\n amount=recurring.amount,\n expense_account_id=recurring.expense_account_id,\n department_id=recurring.department_id,\n frequency=recurring.frequency,\n next_run_date=recurring.next_run_date,\n end_date=recurring.end_date,\n is_active=bool(recurring.is_active),\n created_at=recurring.created_at,\n updated_at=recurring.updated_at,\n )\n\n@app.post(\n \"/api/bank_transactions/batch_import\",\n response_model=BankTransactionsBatchImportResponse,\n summary=\"Import a batch of bank transactions\",\n description=\"Insert multiple bank_transactions for a bank account in one call.\",\n tags=[\"bank_transactions\"],\n operation_id=\"batch_import_bank_transactions\",\n)\nasync def batch_import_bank_transactions_endpoint(\n body: BankTransactionsBatchImportRequest = Body(...)\n) -> BankTransactionsBatchImportResponse:\n session = SessionLocal()\n created_items: List[BankTransactionResponse] = []\n for t in body.transactions:\n bt = BankTransaction(\n bank_account_id=body.bank_account_id,\n transaction_date=date.fromisoformat(t.transaction_date),\n posted_date=date.fromisoformat(t.posted_date) if t.posted_date is not None else None,\n description=t.description,\n amount=t.amount,\n external_id=t.external_id,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(bt)\n session.commit()\n session.refresh(bt)\n created_items.append(\n BankTransactionResponse(\n id=bt.id,\n bank_account_id=bt.bank_account_id,\n transaction_date=bt.transaction_date,\n posted_date=bt.posted_date,\n description=bt.description,\n amount=bt.amount,\n external_id=bt.external_id,\n created_at=bt.created_at,\n updated_at=bt.updated_at,\n )\n )\n session.close()\n return BankTransactionsBatchImportResponse(bank_transactions=created_items)\n\n@app.get(\n \"/api/bank_transactions\",\n response_model=BankTransactionsListResponse,\n summary=\"List bank transactions\",\n description=\"Retrieve bank_transactions for a bank account filtered by date.\",\n tags=[\"bank_transactions\"],\n operation_id=\"list_bank_transactions\",\n)\nasync def list_bank_transactions_endpoint(\n bank_account_id: int = Query(..., description=\"Bank account ID to filter transactions\", example=1),\n from_date: Optional[str] = Query(None, description=\"Minimum transaction_date (YYYY-MM-DD)\", example=\"2025-01-01\"),\n to_date: Optional[str] = Query(None, description=\"Maximum transaction_date (YYYY-MM-DD)\", example=\"2025-01-07\"),\n limit: Optional[int] = Query(100, description=\"Maximum number of records\", example=100),\n offset: Optional[int] = Query(0, description=\"Records to skip\", example=0),\n) -> BankTransactionsListResponse:\n session = SessionLocal()\n query = session.query(BankTransaction).filter(BankTransaction.bank_account_id == bank_account_id)\n if from_date is not None:\n query = query.filter(BankTransaction.transaction_date >= date.fromisoformat(from_date))\n if to_date is not None:\n query = query.filter(BankTransaction.transaction_date <= date.fromisoformat(to_date))\n transactions = query.offset(offset).limit(limit).all()\n session.close()\n return BankTransactionsListResponse(bank_transactions=transactions)\n\n@app.post(\n \"/api/journal_entries\",\n response_model=JournalEntryResponse,\n summary=\"Create a journal entry header\",\n description=\"Create a journal_entries header with entry_date and description.\",\n tags=[\"journal_entries\"],\n operation_id=\"create_journal_entry\",\n)\nasync def create_journal_entry_endpoint(\n body: JournalEntryCreateRequest = Body(...)\n) -> JournalEntryResponse:\n session = SessionLocal()\n entry = JournalEntry(\n entry_date=date.fromisoformat(body.entry_date),\n description=body.description,\n department_id=body.department_id,\n source=body.source,\n source_id=body.source_id,\n created_by_user_id=1,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(entry)\n session.commit()\n session.refresh(entry)\n session.close()\n return JournalEntryResponse(\n id=entry.id,\n entry_date=entry.entry_date,\n description=entry.description,\n department_id=entry.department_id,\n source=entry.source,\n source_id=entry.source_id,\n created_by_user_id=entry.created_by_user_id,\n created_at=entry.created_at,\n updated_at=entry.updated_at,\n )\n\n@app.post(\n \"/api/journal_entry_lines\",\n response_model=JournalEntryLineResponse,\n summary=\"Add a line to a journal entry\",\n description=\"Create a journal_entry_lines row for an account with debit or credit.\",\n tags=[\"journal_entries\", \"journal_entry_lines\"],\n operation_id=\"create_journal_entry_line\",\n)\nasync def create_journal_entry_line_endpoint(\n body: JournalEntryLineCreateRequest = Body(...)\n) -> JournalEntryLineResponse:\n session = SessionLocal()\n debit_value = body.debit if body.debit is not None else 0.0\n credit_value = body.credit if body.credit is not None else 0.0\n line = JournalEntryLine(\n journal_entry_id=body.journal_entry_id,\n account_id=body.account_id,\n department_id=body.department_id,\n description=body.description,\n debit=debit_value,\n credit=credit_value,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(line)\n session.commit()\n session.refresh(line)\n session.close()\n return JournalEntryLineResponse(\n id=line.id,\n journal_entry_id=line.journal_entry_id,\n account_id=line.account_id,\n department_id=line.department_id,\n description=line.description,\n debit=line.debit,\n credit=line.credit,\n created_at=line.created_at,\n updated_at=line.updated_at,\n )\n\n@app.post(\n \"/api/bank_transaction_journal_links\",\n response_model=BankTransactionJournalLinkResponse,\n summary=\"Link a bank transaction to a journal entry\",\n description=\"Create a bank_transaction_journal_links row to connect bank_transactions with journal_entries.\",\n tags=[\"bank_transactions\", \"journal_entries\"],\n operation_id=\"create_bank_transaction_journal_link\",\n)\nasync def create_bank_transaction_journal_link_endpoint(\n body: BankTransactionJournalLinkCreateRequest = Body(...)\n) -> BankTransactionJournalLinkResponse:\n session = SessionLocal()\n link = BankTransactionJournalLink(\n bank_transaction_id=body.bank_transaction_id,\n journal_entry_id=body.journal_entry_id,\n created_at=datetime.utcnow(),\n )\n session.add(link)\n session.commit()\n session.refresh(link)\n session.close()\n return BankTransactionJournalLinkResponse(\n id=link.id,\n bank_transaction_id=link.bank_transaction_id,\n journal_entry_id=link.journal_entry_id,\n created_at=link.created_at,\n )\n\n@app.post(\n \"/api/recurring_invoices\",\n response_model=RecurringInvoiceResponse,\n summary=\"Create a recurring invoice schedule\",\n description=\"Create a recurring_invoices template specifying settings.\",\n tags=[\"recurring_invoices\"],\n operation_id=\"create_recurring_invoice\",\n)\nasync def create_recurring_invoice_endpoint(\n body: RecurringInvoiceCreateRequest = Body(...)\n) -> RecurringInvoiceResponse:\n session = SessionLocal()\n recurring = RecurringInvoice(\n customer_id=body.customer_id,\n name=body.name,\n description=body.description,\n quantity=body.quantity,\n unit_price=body.unit_price,\n discount_percent=body.discount_percent if body.discount_percent is not None else 0.0,\n frequency=body.frequency,\n next_run_date=date.fromisoformat(body.next_run_date),\n end_date=date.fromisoformat(body.end_date) if body.end_date is not None else None,\n payment_terms_id=body.payment_terms_id,\n tax_category_id=body.tax_category_id,\n department_id=body.department_id,\n currency=body.currency if body.currency is not None else \"USD\",\n is_active=1 if (body.is_active if body.is_active is not None else True) else 0,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(recurring)\n session.commit()\n session.refresh(recurring)\n session.close()\n return RecurringInvoiceResponse(\n id=recurring.id,\n customer_id=recurring.customer_id,\n name=recurring.name,\n description=recurring.description,\n quantity=recurring.quantity,\n unit_price=recurring.unit_price,\n discount_percent=recurring.discount_percent,\n frequency=recurring.frequency,\n next_run_date=recurring.next_run_date,\n end_date=recurring.end_date,\n payment_terms_id=recurring.payment_terms_id,\n tax_category_id=recurring.tax_category_id,\n department_id=recurring.department_id,\n currency=recurring.currency,\n is_active=bool(recurring.is_active),\n created_at=recurring.created_at,\n updated_at=recurring.updated_at,\n )\n\n@app.post(\n \"/api/accounting_periods\",\n response_model=AccountingPeriodResponse,\n summary=\"Create an accounting period\",\n description=\"Create an accounting_periods row representing a fiscal period.\",\n tags=[\"accounting_periods\"],\n operation_id=\"create_accounting_period\",\n)\nasync def create_accounting_period_endpoint(\n body: AccountingPeriodCreateRequest = Body(...)\n) -> AccountingPeriodResponse:\n session = SessionLocal()\n period = AccountingPeriod(\n start_date=date.fromisoformat(body.start_date),\n end_date=date.fromisoformat(body.end_date),\n close_date=date.fromisoformat(body.close_date) if body.close_date is not None else None,\n is_locked=1 if (body.is_locked if body.is_locked is not None else False) else 0,\n created_at=datetime.utcnow(),\n updated_at=None,\n )\n session.add(period)\n session.commit()\n session.refresh(period)\n session.close()\n return AccountingPeriodResponse(\n id=period.id,\n start_date=period.start_date,\n end_date=period.end_date,\n close_date=period.close_date,\n is_locked=bool(period.is_locked),\n created_at=period.created_at,\n updated_at=period.updated_at,\n )\n\n@app.patch(\n \"/api/accounting_periods/{period_id}\",\n response_model=AccountingPeriodResponse,\n summary=\"Update an accounting period lock status\",\n description=\"Update close_date and is_locked for an accounting period.\",\n tags=[\"accounting_periods\"],\n operation_id=\"update_accounting_period_lock\",\n)\nasync def update_accounting_period_lock_endpoint(\n period_id: int = Path(..., description=\"Accounting period ID to update\", example=10001),\n body: AccountingPeriodUpdateRequest = Body(...),\n) -> AccountingPeriodResponse:\n session = SessionLocal()\n period = session.query(AccountingPeriod).filter(AccountingPeriod.id == period_id).first()\n if period is None:\n session.close()\n return AccountingPeriodResponse(\n id=0,\n start_date=date.fromisoformat(\"1970-01-01\"),\n end_date=date.fromisoformat(\"1970-01-01\"),\n close_date=None,\n is_locked=False,\n created_at=None,\n updated_at=None,\n )\n if body.close_date is not None:\n period.close_date = date.fromisoformat(body.close_date)\n if body.close_date is None and body.close_date is not ...:\n if body.close_date is None:\n period.close_date = None\n if body.is_locked is not None:\n period.is_locked = 1 if body.is_locked else 0\n period.updated_at = datetime.utcnow()\n session.commit()\n session.refresh(period)\n session.close()\n return AccountingPeriodResponse(\n id=period.id,\n start_date=period.start_date,\n end_date=period.end_date,\n close_date=period.close_date,\n is_locked=bool(period.is_locked),\n created_at=period.created_at,\n updated_at=period.updated_at,\n )\n\n@app.get(\n \"/api/reports/profit_and_loss\",\n response_model=ProfitAndLossReportResponse,\n summary=\"Generate a profit and loss report\",\n description=\"Compute revenue, expenses, and net profit for a date range.\",\n tags=[\"reports\"],\n operation_id=\"generate_profit_and_loss\",\n)\nasync def generate_profit_and_loss_endpoint(\n start_date: str = Query(..., description=\"Start date for the report (YYYY-MM-DD)\", example=\"2025-01-01\"),\n end_date: str = Query(..., description=\"End date for the report (YYYY-MM-DD)\", example=\"2025-01-31\"),\n department_id: Optional[int] = Query(None, description=\"Optional department filter to restrict results\", example=2),\n) -> ProfitAndLossReportResponse:\n session = SessionLocal()\n start = date.fromisoformat(start_date)\n end = date.fromisoformat(end_date)\n entries_query = session.query(JournalEntry).filter(\n JournalEntry.entry_date >= start, JournalEntry.entry_date <= end\n )\n if department_id is not None:\n entries_query = entries_query.filter(JournalEntry.department_id == department_id)\n entries = entries_query.all()\n entry_ids = [e.id for e in entries]\n lines_query = session.query(JournalEntryLine).filter(JournalEntryLine.journal_entry_id.in_(entry_ids)) if entry_ids else session.query(JournalEntryLine).filter(JournalEntryLine.id == -1)\n if department_id is not None:\n lines_query = lines_query.filter(\n (JournalEntryLine.department_id == department_id) | (JournalEntryLine.department_id.is_(None))\n )\n lines = lines_query.all()\n account_ids = list({l.account_id for l in lines})\n accounts = {}\n if account_ids:\n account_rows = session.query(Account).filter(Account.id.in_(account_ids)).all()\n for a in account_rows:\n accounts[a.id] = a\n total_revenue = 0.0\n total_expenses = 0.0\n income_details: List[Dict[str, Optional[float]]] = []\n expense_details: List[Dict[str, Optional[float]]] = []\n income_map: Dict[int, float] = {}\n expense_map: Dict[int, float] = {}\n for l in lines:\n a = accounts.get(l.account_id)\n if a is None:\n continue\n net_amount = l.debit - l.credit\n if a.type == \"income\":\n amount = -net_amount\n total_revenue += amount\n income_map[a.id] = income_map.get(a.id, 0.0) + amount\n if a.type == \"expense\":\n amount = net_amount\n total_expenses += amount\n expense_map[a.id] = expense_map.get(a.id, 0.0) + amount\n for aid, amt in income_map.items():\n a = accounts.get(aid)\n if a is not None:\n income_details.append({\"account_id\": float(a.id), \"account_name\": a.name, \"amount\": amt})\n for aid, amt in expense_map.items():\n a = accounts.get(aid)\n if a is not None:\n expense_details.append({\"account_id\": float(a.id), \"account_name\": a.name, \"amount\": amt})\n net_profit = total_revenue - total_expenses\n session.close()\n detail = {\n \"income_accounts\": income_details,\n \"expense_accounts\": expense_details,\n }\n return ProfitAndLossReportResponse(\n start_date=start_date,\n end_date=end_date,\n department_id=department_id,\n total_revenue=total_revenue,\n total_expenses=total_expenses,\n net_profit=net_profit,\n detail=detail,\n )\n\nif __name__ == \"__main__\":\n import uvicorn, os\n host = os.getenv(\"HOST\", \"127.0.0.1\")\n port = int(os.getenv(\"PORT\", \"8000\"))\n uvicorn.run(app, host=host, port=port)"} diff --git a/components/awm/upstream/accounting_1-gen_sample.jsonl b/components/awm/upstream/accounting_1-gen_sample.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..bb4dcebd26bc14d1197685cd9ba291832905aa92 --- /dev/null +++ b/components/awm/upstream/accounting_1-gen_sample.jsonl @@ -0,0 +1 @@ +{"scenario": "accounting_1", "tables_count": 20, "inserts_count": 121, "sample_data": {"tables": [{"table_name": "users", "reasoning": "Provides a current authenticated user (id=1) and additional users to associate with journal entries or other audit fields that reference created_by_user_id, enabling realistic multi-user scenarios.", "insert_statements": ["INSERT INTO users (id, username, email, full_name, created_at) VALUES (1, 'current_user', 'user@example.com', 'Current User', '2024-11-01 10:00:00');", "INSERT INTO users (id, username, email, full_name, created_at) VALUES (2, 'staff_anna', 'anna@example.com', 'Anna Staff', '2024-11-15 09:00:00');", "INSERT INTO users (id, username, email, full_name, created_at) VALUES (3, 'staff_bob', 'bob@example.com', 'Bob Staff', '2024-12-01 12:00:00');"]}, {"table_name": "departments", "reasoning": "Defines departments referenced across tasks: Design, Operations, General & Administrative. Also includes extra departments to support filtering, reporting, and edge cases where data belongs to other departments.", "insert_statements": ["INSERT INTO departments (id, name, description, created_at) VALUES (1, 'Design', 'Design and creative services', '2024-10-01 09:00:00');", "INSERT INTO departments (id, name, description, created_at) VALUES (2, 'Operations', 'Operations and logistics', '2024-10-01 09:05:00');", "INSERT INTO departments (id, name, description, created_at) VALUES (3, 'General & Administrative', 'G&A overhead costs', '2024-10-01 09:10:00');", "INSERT INTO departments (id, name, description, created_at) VALUES (4, 'Marketing', 'Marketing and advertising expenses', '2024-10-01 09:15:00');", "INSERT INTO departments (id, name, description, created_at) VALUES (5, 'Sales', 'Sales team activities', '2024-10-01 09:20:00');"]}, {"table_name": "tax_categories", "reasoning": "Provides tax options for invoices and recurring invoices. Includes the requested 'Standard Sales Tax 8.5%' and 'No Tax' plus additional categories for more realistic filtering and historical data.", "insert_statements": ["INSERT INTO tax_categories (id, name, description, rate, is_compound, created_at) VALUES (1, 'Standard Sales Tax 8.5%', 'Standard state and local sales tax at 8.5%', 0.085, 0, '2024-10-10 08:00:00');", "INSERT INTO tax_categories (id, name, description, rate, is_compound, created_at) VALUES (2, 'Reduced Sales Tax 5%', 'Reduced rate for certain services', 0.05, 0, '2024-10-10 08:05:00');", "INSERT INTO tax_categories (id, name, description, rate, is_compound, created_at) VALUES (3, 'No Tax', 'No sales tax applicable', 0.0, 0, '2024-10-10 08:10:00');", "INSERT INTO tax_categories (id, name, description, rate, is_compound, created_at) VALUES (4, 'Digital Services Tax 10%', 'Higher rate for digital-only services', 0.10, 0, '2024-10-10 08:15:00');", "INSERT INTO tax_categories (id, name, description, rate, is_compound, created_at) VALUES (5, 'VAT 20%', 'Value Added Tax at 20%', 0.20, 0, '2024-10-10 08:20:00');"]}, {"table_name": "payment_terms", "reasoning": "Defines available payment terms. Includes Net 30, Net 15, and others for invoices, bills, customers, vendors, and recurring invoices as required by the tasks.", "insert_statements": ["INSERT INTO payment_terms (id, name, days, description, created_at) VALUES (1, 'Due on Receipt', 0, 'Payment due immediately upon receipt', '2024-09-20 09:00:00');", "INSERT INTO payment_terms (id, name, days, description, created_at) VALUES (2, 'Net 15', 15, 'Payment due 15 days from invoice date', '2024-09-20 09:05:00');", "INSERT INTO payment_terms (id, name, days, description, created_at) VALUES (3, 'Net 30', 30, 'Payment due 30 days from invoice date', '2024-09-20 09:10:00');", "INSERT INTO payment_terms (id, name, days, description, created_at) VALUES (4, 'Net 45', 45, 'Payment due 45 days from invoice date', '2024-09-20 09:15:00');", "INSERT INTO payment_terms (id, name, days, description, created_at) VALUES (5, 'Net 60', 60, 'Payment due 60 days from invoice date', '2024-09-20 09:20:00');"]}, {"table_name": "accounts", "reasoning": "Provides chart of accounts to support revenue, expenses, assets, liabilities, and equity. Required for linking vendors\u2019 default_expense_category, recurring_expenses, journal entries, and bank-related postings.", "insert_statements": ["INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (1, 'Chase Business Checking', '1000', 'asset', 'bank', 1, '2024-09-01 08:00:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (2, 'Accounts Receivable', '1100', 'asset', 'receivable', 1, '2024-09-01 08:05:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (3, 'Prepaid Rent', '1200', 'asset', 'prepaid_expense', 1, '2024-09-01 08:10:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (4, 'Office Supplies', '5200', 'expense', 'office', 1, '2024-09-01 08:15:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (5, 'Software Subscriptions', '5300', 'expense', 'software', 1, '2024-09-01 08:20:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (6, 'Contractor Expenses', '5400', 'expense', 'contractor', 1, '2024-09-01 08:25:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (7, 'Rent Expense', '5500', 'expense', 'rent', 1, '2024-09-01 08:30:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (8, 'Accrued Expenses', '2100', 'liability', 'accrual', 1, '2024-09-01 08:35:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (9, 'Design Services Revenue', '4000', 'income', 'services', 1, '2024-09-01 08:40:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (10, 'Client Income - General', '4010', 'income', 'services', 1, '2024-09-01 08:45:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (11, 'Bank Service Charges', '6100', 'expense', 'bank_fees', 1, '2024-09-01 08:50:00');", "INSERT INTO accounts (id, name, code, type, sub_type, is_active, created_at) VALUES (12, 'Owner Equity', '3000', 'equity', 'owner_equity', 1, '2024-09-01 08:55:00');"]}, {"table_name": "bank_accounts", "reasoning": "Creates a bank account mapped to the cash account. Required for importing bank_transactions into 'Chase Business Checking ****1023' and linking them to journal entries.", "insert_statements": ["INSERT INTO bank_accounts (id, name, institution_name, account_number_masked, account_id, created_at) VALUES (1, 'Chase Business Checking ****1023', 'Chase Bank', '****1023', 1, '2024-09-05 09:00:00');", "INSERT INTO bank_accounts (id, name, institution_name, account_number_masked, account_id, created_at) VALUES (2, 'PayPal Business ****7788', 'PayPal', '****7788', 1, '2024-09-05 09:05:00');"]}, {"table_name": "customers", "reasoning": "Defines customers including Acme Design Studio and BrightFuture Marketing required by tasks. Other customers give realistic listing and filtering behavior for reports and invoice operations.", "insert_statements": ["INSERT INTO customers (id, name, billing_email, payment_terms_id, default_tax_category_id, created_at) VALUES (1, 'Acme Design Studio', 'billing@acmedesign.com', 3, 1, '2024-11-20 10:00:00');", "INSERT INTO customers (id, name, billing_email, payment_terms_id, default_tax_category_id, created_at) VALUES (2, 'BrightFuture Marketing', 'ap@brightfuture.com', 2, 3, '2024-11-21 11:00:00');", "INSERT INTO customers (id, name, billing_email, payment_terms_id, default_tax_category_id, created_at) VALUES (3, 'Northwind Traders', 'accounts@northwind.com', 3, 1, '2024-10-15 09:00:00');", "INSERT INTO customers (id, name, billing_email, payment_terms_id, default_tax_category_id, created_at) VALUES (4, 'Global Retail Co', 'billing@globalretail.co', 4, 1, '2024-10-20 09:30:00');", "INSERT INTO customers (id, name, billing_email, payment_terms_id, default_tax_category_id, created_at) VALUES (5, 'UrbanHub Cowork Member', 'member@urbanhub.com', 1, 3, '2024-11-01 08:45:00');"]}, {"table_name": "vendors", "reasoning": "Creates vendors including PixelPrint Supplies and UrbanHub Cowork for bills and recurring expenses, plus additional vendors to exercise listing, filtering, and reporting across multiple payees.", "insert_statements": ["INSERT INTO vendors (id, name, contact_email, payment_terms_id, default_expense_category_id, created_at) VALUES (1, 'PixelPrint Supplies', 'accounts@pixelprint.com', 2, 4, '2024-11-10 14:00:00');", "INSERT INTO vendors (id, name, contact_email, payment_terms_id, default_expense_category_id, created_at) VALUES (2, 'UrbanHub Cowork', 'billing@urbanhubcowork.com', 3, 7, '2024-11-11 10:00:00');", "INSERT INTO vendors (id, name, contact_email, payment_terms_id, default_expense_category_id, created_at) VALUES (3, 'SaaSify Cloud', 'billing@saasify.com', 1, 5, '2024-10-05 11:00:00');", "INSERT INTO vendors (id, name, contact_email, payment_terms_id, default_expense_category_id, created_at) VALUES (4, 'Creative Contractors LLC', 'ap@creativecontractors.com', 2, 6, '2024-10-06 11:15:00');", "INSERT INTO vendors (id, name, contact_email, payment_terms_id, default_expense_category_id, created_at) VALUES (5, 'City Storage Units', 'accounts@citystorage.com', 3, 7, '2024-10-07 11:30:00');"]}, {"table_name": "invoices", "reasoning": "Includes INV-2025-001 for Acme with proper department, tax_category, and amounts, plus other invoices spanning dates and departments to support reporting and payment application scenarios.", "insert_statements": ["INSERT INTO invoices (id, invoice_number, customer_id, department_id, tax_category_id, invoice_date, due_date, currency, status, subtotal, tax_amount, total, balance_due, payment_terms_id, created_at) VALUES (1, 'INV-2024-010', 3, 1, 1, '2024-12-15', '2025-01-14', 'USD', 'open', 2000.0, 170.0, 2170.0, 2170.0, 3, '2024-12-15 09:00:00');", "INSERT INTO invoices (id, invoice_number, customer_id, department_id, tax_category_id, invoice_date, due_date, currency, status, subtotal, tax_amount, total, balance_due, payment_terms_id, created_at) VALUES (2, 'INV-2024-011', 4, 2, 3, '2024-12-20', '2025-01-19', 'USD', 'draft', 1500.0, 0.0, 1500.0, 1500.0, 4, '2024-12-20 10:00:00');", "INSERT INTO invoices (id, invoice_number, customer_id, department_id, tax_category_id, invoice_date, due_date, currency, status, subtotal, tax_amount, total, balance_due, payment_terms_id, created_at) VALUES (3, 'INV-2025-001', 1, 1, 1, '2025-01-05', '2025-02-04', 'USD', 'open', 1920.0, 163.2, 2083.2, 1183.2, 3, '2025-01-05 09:30:00');", "INSERT INTO invoices (id, invoice_number, customer_id, department_id, tax_category_id, invoice_date, due_date, currency, status, subtotal, tax_amount, total, balance_due, payment_terms_id, created_at) VALUES (4, 'INV-2025-002', 2, 4, 3, '2025-01-10', '2025-01-25', 'USD', 'open', 1500.0, 0.0, 1500.0, 1500.0, 2, '2025-01-10 11:00:00');", "INSERT INTO invoices (id, invoice_number, customer_id, department_id, tax_category_id, invoice_date, due_date, currency, status, subtotal, tax_amount, total, balance_due, payment_terms_id, created_at) VALUES (5, 'INV-2025-003', 1, 1, 1, '2025-01-20', '2025-02-19', 'USD', 'draft', 800.0, 68.0, 868.0, 868.0, 3, '2025-01-20 14:00:00');", "INSERT INTO invoices (id, invoice_number, customer_id, department_id, tax_category_id, invoice_date, due_date, currency, status, subtotal, tax_amount, total, balance_due, payment_terms_id, created_at) VALUES (6, 'INV-2025-004', 3, 5, 1, '2025-01-15', '2025-02-14', 'USD', 'paid', 5000.0, 425.0, 5425.0, 0.0, 3, '2025-01-15 10:30:00');"]}, {"table_name": "invoice_line_items", "reasoning": "Populates invoice lines including Acme\u2019s logo redesign and brand guideline items with correct discounts and department. Extra lines across invoices and departments support revenue reporting by department.", "insert_statements": ["INSERT INTO invoice_line_items (id, invoice_id, description, quantity, unit_price, discount_percent, line_subtotal, tax_amount, total, revenue_account_id, department_id, created_at) VALUES (1, 1, 'Website redesign project', 1.0, 2000.0, 0.0, 2000.0, 170.0, 2170.0, 9, 1, '2024-12-15 09:05:00');", "INSERT INTO invoice_line_items (id, invoice_id, description, quantity, unit_price, discount_percent, line_subtotal, tax_amount, total, revenue_account_id, department_id, created_at) VALUES (2, 2, 'Operations consulting retainer', 1.0, 1500.0, 0.0, 1500.0, 0.0, 1500.0, 10, 2, '2024-12-20 10:05:00');", "INSERT INTO invoice_line_items (id, invoice_id, description, quantity, unit_price, discount_percent, line_subtotal, tax_amount, total, revenue_account_id, department_id, created_at) VALUES (3, 3, 'Logo redesign', 1.0, 1200.0, 0.0, 1200.0, 102.0, 1302.0, 9, 1, '2025-01-05 09:35:00');", "INSERT INTO invoice_line_items (id, invoice_id, description, quantity, unit_price, discount_percent, line_subtotal, tax_amount, total, revenue_account_id, department_id, created_at) VALUES (4, 3, 'Brand guideline document', 1.0, 800.0, 10.0, 720.0, 61.2, 781.2, 9, 1, '2025-01-05 09:36:00');", "INSERT INTO invoice_line_items (id, invoice_id, description, quantity, unit_price, discount_percent, line_subtotal, tax_amount, total, revenue_account_id, department_id, created_at) VALUES (5, 4, 'Monthly SEO Retainer', 1.0, 1500.0, 0.0, 1500.0, 0.0, 1500.0, 10, 4, '2025-01-10 11:05:00');", "INSERT INTO invoice_line_items (id, invoice_id, description, quantity, unit_price, discount_percent, line_subtotal, tax_amount, total, revenue_account_id, department_id, created_at) VALUES (6, 5, 'Social media asset pack', 1.0, 800.0, 0.0, 800.0, 68.0, 868.0, 9, 1, '2025-01-20 14:05:00');", "INSERT INTO invoice_line_items (id, invoice_id, description, quantity, unit_price, discount_percent, line_subtotal, tax_amount, total, revenue_account_id, department_id, created_at) VALUES (7, 6, 'Enterprise UX audit', 1.0, 5000.0, 0.0, 5000.0, 425.0, 5425.0, 9, 5, '2025-01-15 10:35:00');"]}, {"table_name": "payments", "reasoning": "Records customer payments including the partial credit card payment for Acme against INV-2025-001, plus other payments to support open, paid, and partially paid invoice scenarios.", "insert_statements": ["INSERT INTO payments (id, customer_id, payment_date, settlement_date, amount, currency, method, reference, created_at) VALUES (1, 1, '2025-01-10', '2025-01-10', 900.0, 'USD', 'Credit Card', 'STRIPE-12345', '2025-01-10 12:00:00');", "INSERT INTO payments (id, customer_id, payment_date, settlement_date, amount, currency, method, reference, created_at) VALUES (2, 3, '2025-01-16', '2025-01-16', 5425.0, 'USD', 'Bank Transfer', 'ACH-778899', '2025-01-16 10:00:00');", "INSERT INTO payments (id, customer_id, payment_date, settlement_date, amount, currency, method, reference, created_at) VALUES (3, 3, '2025-01-05', '2025-01-06', 1000.0, 'USD', 'Check', 'CHK-1001', '2025-01-05 15:00:00');", "INSERT INTO payments (id, customer_id, payment_date, settlement_date, amount, currency, method, reference, created_at) VALUES (4, 4, '2025-01-21', '2025-01-21', 1500.0, 'USD', 'Credit Card', 'STRIPE-67890', '2025-01-21 11:30:00');", "INSERT INTO payments (id, customer_id, payment_date, settlement_date, amount, currency, method, reference, created_at) VALUES (5, 1, '2025-02-10', '2025-02-10', 1183.2, 'USD', 'Credit Card', 'STRIPE-ACME-FINAL', '2025-02-10 09:00:00');"]}, {"table_name": "payment_applications", "reasoning": "Applies payments to specific invoices, particularly linking the 900 USD payment to INV-2025-001. Additional applications demonstrate full and partial settlements for reporting and balance calculations.", "insert_statements": ["INSERT INTO payment_applications (id, payment_id, invoice_id, amount, created_at) VALUES (1, 1, 3, 900.0, '2025-01-10 12:05:00');", "INSERT INTO payment_applications (id, payment_id, invoice_id, amount, created_at) VALUES (2, 2, 6, 5425.0, '2025-01-16 10:05:00');", "INSERT INTO payment_applications (id, payment_id, invoice_id, amount, created_at) VALUES (3, 3, 1, 1000.0, '2025-01-05 15:05:00');", "INSERT INTO payment_applications (id, payment_id, invoice_id, amount, created_at) VALUES (4, 4, 2, 1500.0, '2025-01-21 11:35:00');", "INSERT INTO payment_applications (id, payment_id, invoice_id, amount, created_at) VALUES (5, 5, 3, 1183.2, '2025-02-10 09:05:00');"]}, {"table_name": "bills", "reasoning": "Creates bills including the PixelPrint Supplies bill for printer ink and paper, and extra bills across vendors and departments to test payables workflows and reimbursement_status filters.", "insert_statements": ["INSERT INTO bills (id, bill_number, vendor_id, bill_date, due_date, currency, amount, description, department_id, reimbursement_status, payment_terms_id, status, created_at) VALUES (1, 'BILL-2025-001', 1, '2025-01-03', '2025-01-18', 'USD', 325.50, 'Printer ink and paper', 2, 'Not Reimbursable', 2, 'open', '2025-01-03 10:00:00');", "INSERT INTO bills (id, bill_number, vendor_id, bill_date, due_date, currency, amount, description, department_id, reimbursement_status, payment_terms_id, status, created_at) VALUES (2, 'BILL-2024-015', 2, '2024-12-01', '2024-12-31', 'USD', 650.0, 'December co-working rent', 3, 'Not Reimbursable', 3, 'paid', '2024-12-01 09:00:00');", "INSERT INTO bills (id, bill_number, vendor_id, bill_date, due_date, currency, amount, description, department_id, reimbursement_status, payment_terms_id, status, created_at) VALUES (3, 'BILL-2025-002', 2, '2025-01-01', '2025-01-31', 'USD', 650.0, 'January co-working rent', 3, 'Not Reimbursable', 3, 'open', '2025-01-01 09:00:00');", "INSERT INTO bills (id, bill_number, vendor_id, bill_date, due_date, currency, amount, description, department_id, reimbursement_status, payment_terms_id, status, created_at) VALUES (4, 'BILL-2025-003', 3, '2025-01-05', '2025-02-04', 'USD', 300.0, 'SaaS subscription January', 3, 'Not Reimbursable', 1, 'open', '2025-01-05 11:00:00');", "INSERT INTO bills (id, bill_number, vendor_id, bill_date, due_date, currency, amount, description, department_id, reimbursement_status, payment_terms_id, status, created_at) VALUES (5, 'BILL-2025-004', 4, '2025-01-07', '2025-01-22', 'USD', 1200.0, 'Contract design support', 1, 'Not Reimbursable', 2, 'open', '2025-01-07 13:00:00');"]}, {"table_name": "recurring_expenses", "reasoning": "Defines a recurring expense template for Monthly Co-working Space Rent tied to UrbanHub Cowork and department G&A, plus other recurring templates to test scheduling and frequency behavior.", "insert_statements": ["INSERT INTO recurring_expenses (id, name, vendor_id, amount, expense_account_id, department_id, frequency, next_run_date, end_date, is_active, created_at) VALUES (1, 'Monthly Co-working Space Rent', 2, 650.0, 7, 3, 'monthly', '2025-02-01', '2025-12-01', 1, '2025-01-01 08:00:00');", "INSERT INTO recurring_expenses (id, name, vendor_id, amount, expense_account_id, department_id, frequency, next_run_date, end_date, is_active, created_at) VALUES (2, 'SaaS Project Management Tool', 3, 150.0, 5, 3, 'monthly', '2025-02-01', NULL, 1, '2025-01-01 08:05:00');", "INSERT INTO recurring_expenses (id, name, vendor_id, amount, expense_account_id, department_id, frequency, next_run_date, end_date, is_active, created_at) VALUES (3, 'Cloud Hosting', 3, 200.0, 5, 2, 'monthly', '2025-02-05', NULL, 1, '2025-01-05 09:00:00');", "INSERT INTO recurring_expenses (id, name, vendor_id, amount, expense_account_id, department_id, frequency, next_run_date, end_date, is_active, created_at) VALUES (4, 'Office Snacks', 1, 75.0, 4, 2, 'weekly', '2025-01-10', NULL, 1, '2025-01-03 10:30:00');", "INSERT INTO recurring_expenses (id, name, vendor_id, amount, expense_account_id, department_id, frequency, next_run_date, end_date, is_active, created_at) VALUES (5, 'Annual Domain Renewals', 3, 120.0, 5, 3, 'yearly', '2025-12-15', '2027-12-15', 1, '2024-12-15 08:00:00');"]}, {"table_name": "bank_transactions", "reasoning": "Imports 5 transactions into the Chase account between 2025-01-01 and 2025-01-07 with varied descriptions and amounts, used to categorize into income or expenses and link to journal entries.", "insert_statements": ["INSERT INTO bank_transactions (id, bank_account_id, transaction_date, posted_date, description, amount, external_id, created_at) VALUES (1, 1, '2025-01-01', '2025-01-02', 'Client deposit - Northwind', 2500.0, 'BTX-1001', '2025-01-02 09:00:00');", "INSERT INTO bank_transactions (id, bank_account_id, transaction_date, posted_date, description, amount, external_id, created_at) VALUES (2, 1, '2025-01-02', '2025-01-03', 'Software subscription - SaaSify', -150.0, 'BTX-1002', '2025-01-03 09:05:00');", "INSERT INTO bank_transactions (id, bank_account_id, transaction_date, posted_date, description, amount, external_id, created_at) VALUES (3, 1, '2025-01-03', '2025-01-04', 'Office supplies - PixelPrint', -85.75, 'BTX-1003', '2025-01-04 09:10:00');", "INSERT INTO bank_transactions (id, bank_account_id, transaction_date, posted_date, description, amount, external_id, created_at) VALUES (4, 1, '2025-01-05', '2025-01-06', 'Client payment - BrightFuture', 1500.0, 'BTX-1004', '2025-01-06 09:15:00');", "INSERT INTO bank_transactions (id, bank_account_id, transaction_date, posted_date, description, amount, external_id, created_at) VALUES (5, 1, '2025-01-07', '2025-01-08', 'Software subscription - AnalyticsPro', -99.0, 'BTX-1005', '2025-01-08 09:20:00');", "INSERT INTO bank_transactions (id, bank_account_id, transaction_date, posted_date, description, amount, external_id, created_at) VALUES (6, 2, '2025-01-04', '2025-01-05', 'Misc PayPal income', 300.0, 'PP-2001', '2025-01-05 10:00:00');"]}, {"table_name": "journal_entries", "reasoning": "Creates year-end accrual entries on 2024-12-31 and entries generated from bank transaction categorizations, all tied to departments and sources where relevant, enabling reporting and period-lock testing.", "insert_statements": ["INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (1, '2024-12-31', 'Accrue December software subscriptions', 3, 'year_end_accrual', 1, 1, '2024-12-31 16:00:00');", "INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (2, '2024-12-31', 'Accrue December contractor expenses', 3, 'year_end_accrual', 2, 1, '2024-12-31 16:05:00');", "INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (3, '2024-12-31', 'Adjust prepaid rent', 3, 'year_end_accrual', 3, 1, '2024-12-31 16:10:00');", "INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (4, '2025-01-01', 'Bank tx BTX-1001 - Client income', 3, 'bank_transaction', 1, 1, '2025-01-02 09:30:00');", "INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (5, '2025-01-02', 'Bank tx BTX-1002 - Software subscription', 3, 'bank_transaction', 2, 1, '2025-01-03 09:30:00');", "INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (6, '2025-01-03', 'Bank tx BTX-1003 - Office supplies', 2, 'bank_transaction', 3, 1, '2025-01-04 09:30:00');", "INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (7, '2025-01-05', 'Bank tx BTX-1004 - Client income', 4, 'bank_transaction', 4, 1, '2025-01-06 09:30:00');", "INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (8, '2025-01-07', 'Bank tx BTX-1005 - Software subscription', 3, 'bank_transaction', 5, 1, '2025-01-08 09:30:00');", "INSERT INTO journal_entries (id, entry_date, description, department_id, source, source_id, created_by_user_id, created_at) VALUES (9, '2024-12-15', 'Manual adjustment prior to period close', 3, 'manual', 1, 2, '2024-12-15 10:00:00');"]}, {"table_name": "journal_entry_lines", "reasoning": "Adds debits and credits for year-end accruals and bank-transaction-based entries, ensuring balanced postings and proper account usage for income and expense categorization tests.", "insert_statements": ["INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (1, 1, 5, 3, 'Accrue December SaaS', 300.0, 0.0, '2024-12-31 16:01:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (2, 1, 8, 3, 'Accrued expenses', 0.0, 300.0, '2024-12-31 16:01:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (3, 2, 6, 3, 'Accrue contractor fees', 1200.0, 0.0, '2024-12-31 16:06:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (4, 2, 8, 3, 'Accrued expenses', 0.0, 1200.0, '2024-12-31 16:06:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (5, 3, 7, 3, 'Recognize rent expense', 650.0, 0.0, '2024-12-31 16:11:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (6, 3, 3, 3, 'Reduce prepaid rent', 0.0, 650.0, '2024-12-31 16:11:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (7, 4, 1, 3, 'Client deposit Northwind', 2500.0, 0.0, '2025-01-02 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (8, 4, 10, 3, 'Client income from deposit', 0.0, 2500.0, '2025-01-02 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (9, 5, 5, 3, 'SaaSify subscription', 150.0, 0.0, '2025-01-03 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (10, 5, 1, 3, 'Bank payment for SaaSify', 0.0, 150.0, '2025-01-03 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (11, 6, 4, 2, 'PixelPrint office supplies', 85.75, 0.0, '2025-01-04 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (12, 6, 1, 2, 'Bank payment for supplies', 0.0, 85.75, '2025-01-04 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (13, 7, 1, 4, 'BrightFuture client receipt', 1500.0, 0.0, '2025-01-06 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (14, 7, 10, 4, 'Client income BrightFuture', 0.0, 1500.0, '2025-01-06 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (15, 8, 5, 3, 'AnalyticsPro subscription', 99.0, 0.0, '2025-01-08 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (16, 8, 1, 3, 'Bank payment for AnalyticsPro', 0.0, 99.0, '2025-01-08 09:31:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (17, 9, 11, 3, 'Bank fees adjustment', 50.0, 0.0, '2024-12-15 10:01:00');", "INSERT INTO journal_entry_lines (id, journal_entry_id, account_id, department_id, description, debit, credit, created_at) VALUES (18, 9, 1, 3, 'Bank account adjustment', 0.0, 50.0, '2024-12-15 10:01:00');"]}, {"table_name": "bank_transaction_journal_links", "reasoning": "Links each imported bank_transaction to its corresponding journal_entry, allowing traceability between bank feeds and general ledger for reconciliation and categorization validation.", "insert_statements": ["INSERT INTO bank_transaction_journal_links (id, bank_transaction_id, journal_entry_id, created_at) VALUES (1, 1, 4, '2025-01-02 09:35:00');", "INSERT INTO bank_transaction_journal_links (id, bank_transaction_id, journal_entry_id, created_at) VALUES (2, 2, 5, '2025-01-03 09:35:00');", "INSERT INTO bank_transaction_journal_links (id, bank_transaction_id, journal_entry_id, created_at) VALUES (3, 3, 6, '2025-01-04 09:35:00');", "INSERT INTO bank_transaction_journal_links (id, bank_transaction_id, journal_entry_id, created_at) VALUES (4, 4, 7, '2025-01-06 09:35:00');", "INSERT INTO bank_transaction_journal_links (id, bank_transaction_id, journal_entry_id, created_at) VALUES (5, 5, 8, '2025-01-08 09:35:00');"]}, {"table_name": "recurring_invoices", "reasoning": "Creates a recurring invoice schedule for BrightFuture Marketing\u2019s Monthly SEO Retainer with Net 15 terms and No Tax, plus other templates to test frequencies, departments, and active flags.", "insert_statements": ["INSERT INTO recurring_invoices (id, customer_id, name, description, quantity, unit_price, discount_percent, frequency, next_run_date, end_date, payment_terms_id, tax_category_id, department_id, currency, is_active, created_at) VALUES (1, 2, 'Monthly SEO Retainer', 'Ongoing SEO strategy and reporting', 1.0, 1500.0, 0.0, 'monthly', '2025-02-01', '2025-07-01', 2, 3, 4, 'USD', 1, '2025-01-10 12:00:00');", "INSERT INTO recurring_invoices (id, customer_id, name, description, quantity, unit_price, discount_percent, frequency, next_run_date, end_date, payment_terms_id, tax_category_id, department_id, currency, is_active, created_at) VALUES (2, 1, 'Monthly Design Support', 'Block of 10 design hours', 10.0, 120.0, 0.0, 'monthly', '2025-02-05', NULL, 3, 1, 1, 'USD', 1, '2025-01-15 10:00:00');", "INSERT INTO recurring_invoices (id, customer_id, name, description, quantity, unit_price, discount_percent, frequency, next_run_date, end_date, payment_terms_id, tax_category_id, department_id, currency, is_active, created_at) VALUES (3, 3, 'Quarterly UX Audit', 'Comprehensive UX review', 1.0, 4000.0, 5.0, 'quarterly', '2025-04-01', '2026-04-01', 3, 1, 5, 'USD', 1, '2025-01-05 09:00:00');", "INSERT INTO recurring_invoices (id, customer_id, name, description, quantity, unit_price, discount_percent, frequency, next_run_date, end_date, payment_terms_id, tax_category_id, department_id, currency, is_active, created_at) VALUES (4, 4, 'Annual Brand Review', 'Yearly brand health check', 1.0, 2500.0, 0.0, 'yearly', '2025-12-31', '2027-12-31', 4, 1, 1, 'USD', 1, '2024-12-31 13:00:00');", "INSERT INTO recurring_invoices (id, customer_id, name, description, quantity, unit_price, discount_percent, frequency, next_run_date, end_date, payment_terms_id, tax_category_id, department_id, currency, is_active, created_at) VALUES (5, 5, 'Weekly Social Media Pack', 'Design of weekly post templates', 4.0, 200.0, 10.0, 'weekly', '2025-01-12', '2025-06-30', 1, 1, 1, 'USD', 1, '2025-01-01 12:00:00');"]}, {"table_name": "accounting_periods", "reasoning": "Defines accounting periods and locks all transactions on or before 2024-12-31 by setting close_date and is_locked, supporting period-close logic and preventing subsequent edits via the API.", "insert_statements": ["INSERT INTO accounting_periods (id, start_date, end_date, close_date, is_locked, created_at) VALUES (1, '2024-01-01', '2024-12-31', '2024-12-31', 1, '2025-01-01 09:00:00');", "INSERT INTO accounting_periods (id, start_date, end_date, close_date, is_locked, created_at) VALUES (2, '2025-01-01', '2025-12-31', NULL, 0, '2025-01-01 09:05:00');", "INSERT INTO accounting_periods (id, start_date, end_date, close_date, is_locked, created_at) VALUES (3, '2023-01-01', '2023-12-31', '2024-01-31', 1, '2024-02-01 10:00:00');"]}]}} diff --git a/components/awm/upstream/manufacturing_execution_system_1-gen_db.jsonl b/components/awm/upstream/manufacturing_execution_system_1-gen_db.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..d59ec21ff1e8010aea31946e49e819df407a63a5 --- /dev/null +++ b/components/awm/upstream/manufacturing_execution_system_1-gen_db.jsonl @@ -0,0 +1 @@ +{"scenario": "manufacturing_execution_system_1", "db_schema": {"tables": [{"name": "users", "ddl": "CREATE TABLE users (\n id INTEGER PRIMARY KEY,\n username TEXT UNIQUE NOT NULL,\n email TEXT UNIQUE NOT NULL,\n full_name TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP\n);", "indexes": ["CREATE INDEX idx_users_username ON users(username);", "CREATE INDEX idx_users_email ON users(email);"]}, {"name": "customers", "ddl": "CREATE TABLE customers (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n billing_address TEXT NOT NULL,\n contact_person TEXT,\n email TEXT,\n phone TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP\n);", "indexes": ["CREATE INDEX idx_customers_name ON customers(name);"]}, {"name": "product_templates", "ddl": "CREATE TABLE product_templates (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n description TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP\n);", "indexes": ["CREATE INDEX idx_product_templates_name ON product_templates(name);"]}, {"name": "product_template_options", "ddl": "CREATE TABLE product_template_options (\n id INTEGER PRIMARY KEY,\n product_template_id INTEGER NOT NULL,\n option_name TEXT NOT NULL,\n option_value TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (product_template_id) REFERENCES product_templates(id) ON DELETE CASCADE,\n UNIQUE (product_template_id, option_name, option_value)\n);", "indexes": ["CREATE INDEX idx_pto_template ON product_template_options(product_template_id);", "CREATE INDEX idx_pto_name_value ON product_template_options(option_name, option_value);"]}, {"name": "standard_task_sequences", "ddl": "CREATE TABLE standard_task_sequences (\n id INTEGER PRIMARY KEY,\n product_template_id INTEGER NOT NULL,\n sequence_order INTEGER NOT NULL,\n task_name TEXT NOT NULL,\n default_planned_duration_hours REAL NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (product_template_id) REFERENCES product_templates(id) ON DELETE CASCADE,\n UNIQUE (product_template_id, sequence_order)\n);", "indexes": ["CREATE INDEX idx_sts_template ON standard_task_sequences(product_template_id);"]}, {"name": "custom_specs", "ddl": "CREATE TABLE custom_specs (\n id INTEGER PRIMARY KEY,\n customer_id INTEGER NOT NULL,\n product_template_id INTEGER NOT NULL,\n notes TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (customer_id) REFERENCES customers(id) ON DELETE RESTRICT,\n FOREIGN KEY (product_template_id) REFERENCES product_templates(id) ON DELETE RESTRICT\n);", "indexes": ["CREATE INDEX idx_custom_specs_customer ON custom_specs(customer_id);", "CREATE INDEX idx_custom_specs_template ON custom_specs(product_template_id);"]}, {"name": "custom_spec_options", "ddl": "CREATE TABLE custom_spec_options (\n id INTEGER PRIMARY KEY,\n custom_spec_id INTEGER NOT NULL,\n option_name TEXT NOT NULL,\n option_value TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (custom_spec_id) REFERENCES custom_specs(id) ON DELETE CASCADE,\n UNIQUE (custom_spec_id, option_name)\n);", "indexes": ["CREATE INDEX idx_cso_custom_spec ON custom_spec_options(custom_spec_id);"]}, {"name": "custom_spec_numeric_params", "ddl": "CREATE TABLE custom_spec_numeric_params (\n id INTEGER PRIMARY KEY,\n custom_spec_id INTEGER NOT NULL,\n param_name TEXT NOT NULL,\n param_value REAL NOT NULL,\n unit TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (custom_spec_id) REFERENCES custom_specs(id) ON DELETE CASCADE,\n UNIQUE (custom_spec_id, param_name)\n);", "indexes": ["CREATE INDEX idx_csnp_custom_spec ON custom_spec_numeric_params(custom_spec_id);"]}, {"name": "quotes", "ddl": "CREATE TABLE quotes (\n id INTEGER PRIMARY KEY,\n quote_number TEXT NOT NULL UNIQUE,\n customer_id INTEGER NOT NULL,\n custom_spec_id INTEGER,\n estimated_hours REAL NOT NULL,\n material_cost REAL NOT NULL,\n labor_rate REAL NOT NULL,\n status TEXT NOT NULL,\n internal_note TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (customer_id) REFERENCES customers(id) ON DELETE RESTRICT,\n FOREIGN KEY (custom_spec_id) REFERENCES custom_specs(id) ON DELETE SET NULL\n);", "indexes": ["CREATE INDEX idx_quotes_customer ON quotes(customer_id);", "CREATE INDEX idx_quotes_status ON quotes(status);"]}, {"name": "jobs", "ddl": "CREATE TABLE jobs (\n id INTEGER PRIMARY KEY,\n job_number TEXT NOT NULL UNIQUE,\n customer_id INTEGER NOT NULL,\n quote_id INTEGER,\n custom_spec_id INTEGER,\n priority TEXT NOT NULL,\n due_date DATE,\n status TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (customer_id) REFERENCES customers(id) ON DELETE RESTRICT,\n FOREIGN KEY (quote_id) REFERENCES quotes(id) ON DELETE SET NULL,\n FOREIGN KEY (custom_spec_id) REFERENCES custom_specs(id) ON DELETE SET NULL\n);", "indexes": ["CREATE INDEX idx_jobs_job_number ON jobs(job_number);", "CREATE INDEX idx_jobs_customer ON jobs(customer_id);", "CREATE INDEX idx_jobs_status ON jobs(status);", "CREATE INDEX idx_jobs_due_date ON jobs(due_date);"]}, {"name": "work_centers", "ddl": "CREATE TABLE work_centers (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n description TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP\n);", "indexes": ["CREATE INDEX idx_work_centers_name ON work_centers(name);"]}, {"name": "job_tasks", "ddl": "CREATE TABLE job_tasks (\n id INTEGER PRIMARY KEY,\n task_code TEXT NOT NULL UNIQUE,\n job_id INTEGER NOT NULL,\n sequence_order INTEGER NOT NULL,\n task_name TEXT NOT NULL,\n work_center_id INTEGER NOT NULL,\n requiring_skill_level TEXT,\n planned_start DATETIME,\n planned_finish DATETIME,\n planned_duration_hours REAL,\n actual_start DATETIME,\n actual_finish DATETIME,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE,\n FOREIGN KEY (work_center_id) REFERENCES work_centers(id) ON DELETE RESTRICT,\n UNIQUE (job_id, sequence_order)\n);", "indexes": ["CREATE INDEX idx_job_tasks_job ON job_tasks(job_id);", "CREATE INDEX idx_job_tasks_work_center ON job_tasks(work_center_id);", "CREATE INDEX idx_job_tasks_planned_range ON job_tasks(planned_start, planned_finish);"]}, {"name": "time_logs", "ddl": "CREATE TABLE time_logs (\n id INTEGER PRIMARY KEY,\n job_task_id INTEGER NOT NULL,\n operator_username TEXT NOT NULL,\n work_center_id INTEGER NOT NULL,\n log_start DATETIME DEFAULT CURRENT_TIMESTAMP,\n actual_duration_hours REAL NOT NULL,\n scrap_quantity INTEGER DEFAULT 0,\n note TEXT,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (job_task_id) REFERENCES job_tasks(id) ON DELETE CASCADE,\n FOREIGN KEY (work_center_id) REFERENCES work_centers(id) ON DELETE RESTRICT\n);", "indexes": ["CREATE INDEX idx_time_logs_job_task ON time_logs(job_task_id);", "CREATE INDEX idx_time_logs_work_center ON time_logs(work_center_id);", "CREATE INDEX idx_time_logs_log_start ON time_logs(log_start);"]}, {"name": "materials", "ddl": "CREATE TABLE materials (\n id INTEGER PRIMARY KEY,\n name TEXT NOT NULL UNIQUE,\n unit_of_measure TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP\n);", "indexes": ["CREATE INDEX idx_materials_name ON materials(name);"]}, {"name": "inventory_lots", "ddl": "CREATE TABLE inventory_lots (\n id INTEGER PRIMARY KEY,\n lot_number TEXT NOT NULL UNIQUE,\n material_id INTEGER NOT NULL,\n on_hand_quantity REAL NOT NULL,\n reserved_quantity REAL NOT NULL DEFAULT 0,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (material_id) REFERENCES materials(id) ON DELETE RESTRICT\n);", "indexes": ["CREATE INDEX idx_inventory_lots_material ON inventory_lots(material_id);", "CREATE INDEX idx_inventory_lots_lot_number ON inventory_lots(lot_number);"]}, {"name": "material_reservations", "ddl": "CREATE TABLE material_reservations (\n id INTEGER PRIMARY KEY,\n job_id INTEGER NOT NULL,\n inventory_lot_id INTEGER NOT NULL,\n quantity REAL NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE CASCADE,\n FOREIGN KEY (inventory_lot_id) REFERENCES inventory_lots(id) ON DELETE RESTRICT\n);", "indexes": ["CREATE INDEX idx_material_reservations_job ON material_reservations(job_id);", "CREATE INDEX idx_material_reservations_lot ON material_reservations(inventory_lot_id);"]}, {"name": "shipments", "ddl": "CREATE TABLE shipments (\n id INTEGER PRIMARY KEY,\n shipment_number TEXT NOT NULL UNIQUE,\n job_id INTEGER NOT NULL,\n customer_id INTEGER NOT NULL,\n delivery_status TEXT NOT NULL,\n shipped_at DATETIME,\n delivered_at DATETIME,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (job_id) REFERENCES jobs(id) ON DELETE RESTRICT,\n FOREIGN KEY (customer_id) REFERENCES customers(id) ON DELETE RESTRICT\n);", "indexes": ["CREATE INDEX idx_shipments_job ON shipments(job_id);", "CREATE INDEX idx_shipments_customer ON shipments(customer_id);", "CREATE INDEX idx_shipments_status ON shipments(delivery_status);"]}, {"name": "shipment_packages", "ddl": "CREATE TABLE shipment_packages (\n id INTEGER PRIMARY KEY,\n shipment_id INTEGER NOT NULL,\n package_number INTEGER NOT NULL,\n weight_kg REAL NOT NULL,\n tracking_number TEXT NOT NULL,\n created_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n updated_at DATETIME DEFAULT CURRENT_TIMESTAMP,\n FOREIGN KEY (shipment_id) REFERENCES shipments(id) ON DELETE CASCADE,\n UNIQUE (shipment_id, package_number),\n UNIQUE (tracking_number)\n);", "indexes": ["CREATE INDEX idx_shipment_packages_shipment ON shipment_packages(shipment_id);", "CREATE INDEX idx_shipment_packages_tracking ON shipment_packages(tracking_number);"]}]}, "db_path": "./outputs/databases/manufacturing_execution_system_1.db"} diff --git a/components/awm/upstream/manufacturing_execution_system_1-gen_envs.jsonl b/components/awm/upstream/manufacturing_execution_system_1-gen_envs.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..cb32d2315d0b0b67e645ec52ffb3e08eaaf7e221 --- /dev/null +++ b/components/awm/upstream/manufacturing_execution_system_1-gen_envs.jsonl @@ -0,0 +1 @@ +{"scenario": "manufacturing_execution_system_1", "db_path": "./outputs/databases/manufacturing_execution_system_1.db", "full_code": "from fastapi import FastAPI, Query, Path, Body\nfrom pydantic import BaseModel, Field, ConfigDict\nfrom typing import Optional, List\nfrom sqlalchemy import create_engine, Column, Integer, String, Float, DateTime, Date, ForeignKey, UniqueConstraint, Index, REAL\nfrom sqlalchemy.orm import declarative_base, relationship, sessionmaker\nfrom datetime import datetime\nimport os\n\ndatabase_url = os.getenv(\"DATABASE_PATH\", \"sqlite:///outputs/databases/craftbench_custom_manufacturing_job_tracker.db\")\nengine = create_engine(database_url, connect_args={\"check_same_thread\": False} if database_url.startswith(\"sqlite\") else {})\nSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)\nBase = declarative_base()\n\nclass User(Base):\n __tablename__ = \"users\"\n id = Column(Integer, primary_key=True)\n username = Column(String, unique=True, nullable=False, index=True)\n email = Column(String, unique=True, nullable=False, index=True)\n full_name = Column(String)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n\nclass Customer(Base):\n __tablename__ = \"customers\"\n id = Column(Integer, primary_key=True)\n name = Column(String, unique=True, nullable=False, index=True)\n billing_address = Column(String, nullable=False)\n contact_person = Column(String)\n email = Column(String)\n phone = Column(String)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n\nclass ProductTemplate(Base):\n __tablename__ = \"product_templates\"\n id = Column(Integer, primary_key=True)\n name = Column(String, unique=True, nullable=False, index=True)\n description = Column(String)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n\nclass ProductTemplateOption(Base):\n __tablename__ = \"product_template_options\"\n id = Column(Integer, primary_key=True)\n product_template_id = Column(Integer, ForeignKey(\"product_templates.id\", ondelete=\"CASCADE\"), nullable=False)\n option_name = Column(String, nullable=False)\n option_value = Column(String, nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n __table_args__ = (UniqueConstraint(\"product_template_id\", \"option_name\", \"option_value\"),)\n product_template = relationship(\"ProductTemplate\", foreign_keys=[product_template_id])\n\nclass StandardTaskSequence(Base):\n __tablename__ = \"standard_task_sequences\"\n id = Column(Integer, primary_key=True)\n product_template_id = Column(Integer, ForeignKey(\"product_templates.id\", ondelete=\"CASCADE\"), nullable=False)\n sequence_order = Column(Integer, nullable=False)\n task_name = Column(String, nullable=False)\n default_planned_duration_hours = Column(REAL, nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n __table_args__ = (UniqueConstraint(\"product_template_id\", \"sequence_order\"),)\n product_template = relationship(\"ProductTemplate\", foreign_keys=[product_template_id])\n\nclass CustomSpec(Base):\n __tablename__ = \"custom_specs\"\n id = Column(Integer, primary_key=True)\n customer_id = Column(Integer, ForeignKey(\"customers.id\", ondelete=\"RESTRICT\"), nullable=False)\n product_template_id = Column(Integer, ForeignKey(\"product_templates.id\", ondelete=\"RESTRICT\"), nullable=False)\n notes = Column(String)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n customer = relationship(\"Customer\", foreign_keys=[customer_id])\n product_template = relationship(\"ProductTemplate\", foreign_keys=[product_template_id])\n\nclass CustomSpecOption(Base):\n __tablename__ = \"custom_spec_options\"\n id = Column(Integer, primary_key=True)\n custom_spec_id = Column(Integer, ForeignKey(\"custom_specs.id\", ondelete=\"CASCADE\"), nullable=False)\n option_name = Column(String, nullable=False)\n option_value = Column(String, nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n __table_args__ = (UniqueConstraint(\"custom_spec_id\", \"option_name\"),)\n custom_spec = relationship(\"CustomSpec\", foreign_keys=[custom_spec_id])\n\nclass CustomSpecNumericParam(Base):\n __tablename__ = \"custom_spec_numeric_params\"\n id = Column(Integer, primary_key=True)\n custom_spec_id = Column(Integer, ForeignKey(\"custom_specs.id\", ondelete=\"CASCADE\"), nullable=False)\n param_name = Column(String, nullable=False)\n param_value = Column(REAL, nullable=False)\n unit = Column(String)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n __table_args__ = (UniqueConstraint(\"custom_spec_id\", \"param_name\"),)\n custom_spec = relationship(\"CustomSpec\", foreign_keys=[custom_spec_id])\n\nclass Quote(Base):\n __tablename__ = \"quotes\"\n id = Column(Integer, primary_key=True)\n quote_number = Column(String, unique=True, nullable=False)\n customer_id = Column(Integer, ForeignKey(\"customers.id\", ondelete=\"RESTRICT\"), nullable=False)\n custom_spec_id = Column(Integer, ForeignKey(\"custom_specs.id\", ondelete=\"SET NULL\"))\n estimated_hours = Column(REAL, nullable=False)\n material_cost = Column(REAL, nullable=False)\n labor_rate = Column(REAL, nullable=False)\n status = Column(String, nullable=False)\n internal_note = Column(String)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n customer = relationship(\"Customer\", foreign_keys=[customer_id])\n custom_spec = relationship(\"CustomSpec\", foreign_keys=[custom_spec_id])\n\nclass Job(Base):\n __tablename__ = \"jobs\"\n id = Column(Integer, primary_key=True)\n job_number = Column(String, unique=True, nullable=False, index=True)\n customer_id = Column(Integer, ForeignKey(\"customers.id\", ondelete=\"RESTRICT\"), nullable=False)\n quote_id = Column(Integer, ForeignKey(\"quotes.id\", ondelete=\"SET NULL\"))\n custom_spec_id = Column(Integer, ForeignKey(\"custom_specs.id\", ondelete=\"SET NULL\"))\n priority = Column(String, nullable=False)\n due_date = Column(Date)\n status = Column(String, nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n customer = relationship(\"Customer\", foreign_keys=[customer_id])\n quote = relationship(\"Quote\", foreign_keys=[quote_id])\n custom_spec = relationship(\"CustomSpec\", foreign_keys=[custom_spec_id])\n\nclass WorkCenter(Base):\n __tablename__ = \"work_centers\"\n id = Column(Integer, primary_key=True)\n name = Column(String, unique=True, nullable=False, index=True)\n description = Column(String)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n\nclass JobTask(Base):\n __tablename__ = \"job_tasks\"\n id = Column(Integer, primary_key=True)\n task_code = Column(String, unique=True, nullable=False)\n job_id = Column(Integer, ForeignKey(\"jobs.id\", ondelete=\"CASCADE\"), nullable=False)\n sequence_order = Column(Integer, nullable=False)\n task_name = Column(String, nullable=False)\n work_center_id = Column(Integer, ForeignKey(\"work_centers.id\", ondelete=\"RESTRICT\"), nullable=False)\n requiring_skill_level = Column(String)\n planned_start = Column(DateTime)\n planned_finish = Column(DateTime)\n planned_duration_hours = Column(REAL)\n actual_start = Column(DateTime)\n actual_finish = Column(DateTime)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n __table_args__ = (UniqueConstraint(\"job_id\", \"sequence_order\"),)\n job = relationship(\"Job\", foreign_keys=[job_id])\n work_center = relationship(\"WorkCenter\", foreign_keys=[work_center_id])\n\nclass TimeLog(Base):\n __tablename__ = \"time_logs\"\n id = Column(Integer, primary_key=True)\n job_task_id = Column(Integer, ForeignKey(\"job_tasks.id\", ondelete=\"CASCADE\"), nullable=False)\n operator_username = Column(String, nullable=False)\n work_center_id = Column(Integer, ForeignKey(\"work_centers.id\", ondelete=\"RESTRICT\"), nullable=False)\n log_start = Column(DateTime, default=datetime.utcnow)\n actual_duration_hours = Column(REAL, nullable=False)\n scrap_quantity = Column(Integer, default=0)\n note = Column(String)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n job_task = relationship(\"JobTask\", foreign_keys=[job_task_id])\n work_center = relationship(\"WorkCenter\", foreign_keys=[work_center_id])\n\nclass Material(Base):\n __tablename__ = \"materials\"\n id = Column(Integer, primary_key=True)\n name = Column(String, unique=True, nullable=False, index=True)\n unit_of_measure = Column(String, nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n\nclass InventoryLot(Base):\n __tablename__ = \"inventory_lots\"\n id = Column(Integer, primary_key=True)\n lot_number = Column(String, unique=True, nullable=False, index=True)\n material_id = Column(Integer, ForeignKey(\"materials.id\", ondelete=\"RESTRICT\"), nullable=False)\n on_hand_quantity = Column(REAL, nullable=False)\n reserved_quantity = Column(REAL, nullable=False, default=0)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n material = relationship(\"Material\", foreign_keys=[material_id])\n\nclass MaterialReservation(Base):\n __tablename__ = \"material_reservations\"\n id = Column(Integer, primary_key=True)\n job_id = Column(Integer, ForeignKey(\"jobs.id\", ondelete=\"CASCADE\"), nullable=False)\n inventory_lot_id = Column(Integer, ForeignKey(\"inventory_lots.id\", ondelete=\"RESTRICT\"), nullable=False)\n quantity = Column(REAL, nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n job = relationship(\"Job\", foreign_keys=[job_id])\n inventory_lot = relationship(\"InventoryLot\", foreign_keys=[inventory_lot_id])\n\nclass Shipment(Base):\n __tablename__ = \"shipments\"\n id = Column(Integer, primary_key=True)\n shipment_number = Column(String, unique=True, nullable=False)\n job_id = Column(Integer, ForeignKey(\"jobs.id\", ondelete=\"RESTRICT\"), nullable=False)\n customer_id = Column(Integer, ForeignKey(\"customers.id\", ondelete=\"RESTRICT\"), nullable=False)\n delivery_status = Column(String, nullable=False)\n shipped_at = Column(DateTime)\n delivered_at = Column(DateTime)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n job = relationship(\"Job\", foreign_keys=[job_id])\n customer = relationship(\"Customer\", foreign_keys=[customer_id])\n\nclass ShipmentPackage(Base):\n __tablename__ = \"shipment_packages\"\n id = Column(Integer, primary_key=True)\n shipment_id = Column(Integer, ForeignKey(\"shipments.id\", ondelete=\"CASCADE\"), nullable=False)\n package_number = Column(Integer, nullable=False)\n weight_kg = Column(REAL, nullable=False)\n tracking_number = Column(String, nullable=False)\n created_at = Column(DateTime, default=datetime.utcnow)\n updated_at = Column(DateTime, default=datetime.utcnow)\n __table_args__ = (UniqueConstraint(\"shipment_id\", \"package_number\"), UniqueConstraint(\"tracking_number\"),)\n shipment = relationship(\"Shipment\", foreign_keys=[shipment_id])\n\nIndex(\"idx_users_username\", User.username)\nIndex(\"idx_users_email\", User.email)\nIndex(\"idx_customers_name\", Customer.name)\nIndex(\"idx_product_templates_name\", ProductTemplate.name)\nIndex(\"idx_pto_template\", ProductTemplateOption.product_template_id)\nIndex(\"idx_pto_name_value\", ProductTemplateOption.option_name, ProductTemplateOption.option_value)\nIndex(\"idx_sts_template\", StandardTaskSequence.product_template_id)\nIndex(\"idx_custom_specs_customer\", CustomSpec.customer_id)\nIndex(\"idx_custom_specs_template\", CustomSpec.product_template_id)\nIndex(\"idx_quotes_customer\", Quote.customer_id)\nIndex(\"idx_quotes_status\", Quote.status)\nIndex(\"idx_jobs_job_number\", Job.job_number)\nIndex(\"idx_jobs_customer\", Job.customer_id)\nIndex(\"idx_jobs_status\", Job.status)\nIndex(\"idx_jobs_due_date\", Job.due_date)\nIndex(\"idx_work_centers_name\", WorkCenter.name)\nIndex(\"idx_job_tasks_job\", JobTask.job_id)\nIndex(\"idx_job_tasks_work_center\", JobTask.work_center_id)\nIndex(\"idx_job_tasks_planned_range\", JobTask.planned_start, JobTask.planned_finish)\nIndex(\"idx_time_logs_job_task\", TimeLog.job_task_id)\nIndex(\"idx_time_logs_work_center\", TimeLog.work_center_id)\nIndex(\"idx_time_logs_log_start\", TimeLog.log_start)\nIndex(\"idx_materials_name\", Material.name)\nIndex(\"idx_inventory_lots_material\", InventoryLot.material_id)\nIndex(\"idx_inventory_lots_lot_number\", InventoryLot.lot_number)\nIndex(\"idx_material_reservations_job\", MaterialReservation.job_id)\nIndex(\"idx_material_reservations_lot\", MaterialReservation.inventory_lot_id)\nIndex(\"idx_shipments_job\", Shipment.job_id)\nIndex(\"idx_shipments_customer\", Shipment.customer_id)\nIndex(\"idx_shipments_status\", Shipment.delivery_status)\nIndex(\"idx_shipment_packages_shipment\", ShipmentPackage.shipment_id)\nIndex(\"idx_shipment_packages_tracking\", ShipmentPackage.tracking_number)\n\nBase.metadata.create_all(bind=engine)\n\napp = FastAPI(title=\"CraftBench Custom Manufacturing Job Tracker\", version=\"1.0.0\")\n\nclass CustomerCreateRequest(BaseModel):\n name: str = Field(..., description=\"Unique customer name\", example=\"Acme Robotics LLC\")\n billing_address: str = Field(..., description=\"Full billing address\", example=\"1200 Industrial Way, Dayton, OH 45402\")\n contact_person: Optional[str] = Field(None, description=\"Primary contact person name\", example=\"Maria Santos\")\n email: Optional[str] = Field(None, description=\"Primary contact email\", example=\"m.santos@acmerobotics.com\")\n phone: Optional[str] = Field(None, description=\"Primary contact phone\", example=\"+1-937-555-0142\")\n\nclass CustomerResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Customer primary key\", example=1)\n name: str = Field(..., description=\"Customer name\", example=\"Acme Robotics LLC\")\n billing_address: str = Field(..., description=\"Billing address\", example=\"1200 Industrial Way, Dayton, OH 45402\")\n contact_person: Optional[str] = Field(None, description=\"Contact person\", example=\"Maria Santos\")\n email: Optional[str] = Field(None, description=\"Contact email\", example=\"m.santos@acmerobotics.com\")\n phone: Optional[str] = Field(None, description=\"Contact phone\", example=\"+1-937-555-0142\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T10:15:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T10:15:00Z\")\n\nclass CustomersListResponse(BaseModel):\n items: List[CustomerResponse] = Field(..., description=\"List of customers\", example=[])\n total: int = Field(..., description=\"Total customers matching filter\", example=1)\n\nclass ProductTemplateCreateRequest(BaseModel):\n name: str = Field(..., description=\"Unique product template name\", example=\"Steel Workbench Pro\")\n description: Optional[str] = Field(None, description=\"Template description\", example=\"Heavy-duty steel workbench for industrial use\")\n\nclass ProductTemplateResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Product template primary key\", example=1)\n name: str = Field(..., description=\"Template name\", example=\"Steel Workbench Pro\")\n description: Optional[str] = Field(None, description=\"Template description\", example=\"Heavy-duty steel workbench for industrial use\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T10:20:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T10:20:00Z\")\n\nclass ProductTemplatesListResponse(BaseModel):\n items: List[ProductTemplateResponse] = Field(..., description=\"List of product templates\", example=[])\n total: int = Field(..., description=\"Total templates matching filter\", example=1)\n\nclass ProductTemplateOptionCreateRequest(BaseModel):\n option_name: str = Field(..., description=\"Name of the option\", example=\"color\")\n option_value: str = Field(..., description=\"Allowed value for the option\", example=\"blue\")\n\nclass ProductTemplateOptionResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Option primary key\", example=1)\n product_template_id: int = Field(..., description=\"Associated product template ID\", example=1)\n option_name: str = Field(..., description=\"Option name\", example=\"color\")\n option_value: str = Field(..., description=\"Option value\", example=\"blue\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T10:25:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T10:25:00Z\")\n\nclass ProductTemplateOptionsListResponse(BaseModel):\n items: List[ProductTemplateOptionResponse] = Field(..., description=\"List of template options\", example=[])\n\nclass StandardTaskSequenceCreateRequest(BaseModel):\n sequence_order: int = Field(..., description=\"Order of this task in the sequence\", example=1)\n task_name: str = Field(..., description=\"Name of the task operation\", example=\"cutting\")\n default_planned_duration_hours: float = Field(..., description=\"Default planned duration in hours\", example=1.5)\n\nclass StandardTaskSequenceResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Standard task primary key\", example=1)\n product_template_id: int = Field(..., description=\"Template ID\", example=1)\n sequence_order: int = Field(..., description=\"Sequence order index\", example=1)\n task_name: str = Field(..., description=\"Task name\", example=\"cutting\")\n default_planned_duration_hours: float = Field(..., description=\"Planned duration in hours\", example=1.5)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T10:30:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T10:30:00Z\")\n\nclass StandardTaskSequencesListResponse(BaseModel):\n items: List[StandardTaskSequenceResponse] = Field(..., description=\"Standard task sequence steps\", example=[])\n\nclass CustomSpecCreateRequest(BaseModel):\n customer_id: int = Field(..., description=\"Customer ID owning the spec\", example=1)\n product_template_id: int = Field(..., description=\"Product template ID\", example=1)\n notes: Optional[str] = Field(None, description=\"Freeform notes about the custom spec\", example=\"Blue 6ft workbench with powder coat\")\n\nclass CustomSpecResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Custom spec primary key\", example=1)\n customer_id: int = Field(..., description=\"Customer ID\", example=1)\n product_template_id: int = Field(..., description=\"Product template ID\", example=1)\n notes: Optional[str] = Field(None, description=\"Notes\", example=\"Blue 6ft workbench with powder coat\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T10:35:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T10:35:00Z\")\n\nclass CustomSpecsListResponse(BaseModel):\n items: List[CustomSpecResponse] = Field(..., description=\"Custom specs\", example=[])\n total: int = Field(..., description=\"Total matching custom specs\", example=1)\n\nclass CustomSpecOptionUpsertRequest(BaseModel):\n option_name: str = Field(..., description=\"Option name\", example=\"color\")\n option_value: str = Field(..., description=\"Option value to store\", example=\"blue\")\n\nclass CustomSpecOptionResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Custom spec option ID\", example=1)\n custom_spec_id: int = Field(..., description=\"Parent custom spec ID\", example=1)\n option_name: str = Field(..., description=\"Option name\", example=\"color\")\n option_value: str = Field(..., description=\"Option value\", example=\"blue\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T10:40:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T10:45:00Z\")\n\nclass CustomSpecOptionsListResponse(BaseModel):\n items: List[CustomSpecOptionResponse] = Field(..., description=\"Custom spec options\", example=[])\n\nclass CustomSpecNumericParamUpsertRequest(BaseModel):\n param_name: str = Field(..., description=\"Parameter name\", example=\"length\")\n param_value: float = Field(..., description=\"Numeric value\", example=1830.0)\n unit: Optional[str] = Field(None, description=\"Measurement unit\", example=\"mm\")\n\nclass CustomSpecNumericParamResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Numeric param ID\", example=1)\n custom_spec_id: int = Field(..., description=\"Custom spec ID\", example=1)\n param_name: str = Field(..., description=\"Parameter name\", example=\"length\")\n param_value: float = Field(..., description=\"Parameter value\", example=1830.0)\n unit: Optional[str] = Field(None, description=\"Parameter unit\", example=\"mm\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T10:45:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T10:50:00Z\")\n\nclass CustomSpecNumericParamsListResponse(BaseModel):\n items: List[CustomSpecNumericParamResponse] = Field(..., description=\"Numeric parameters\", example=[])\n\nclass QuoteCreateRequest(BaseModel):\n quote_number: str = Field(..., description=\"Unique quote number\", example=\"Q-2025-0147\")\n customer_id: int = Field(..., description=\"Customer ID for this quote\", example=1)\n custom_spec_id: Optional[int] = Field(None, description=\"Linked custom spec ID\", example=1)\n estimated_hours: float = Field(..., description=\"Estimated labor hours\", example=12.0)\n material_cost: float = Field(..., description=\"Estimated material cost\", example=420.0)\n labor_rate: float = Field(..., description=\"Labor rate per hour\", example=65.0)\n status: str = Field(..., description=\"Quote status\", example=\"sent\")\n internal_note: Optional[str] = Field(None, description=\"Internal reference note\", example=\"Rush order requested\")\n\nclass QuoteResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Quote ID\", example=1)\n quote_number: str = Field(..., description=\"Quote number\", example=\"Q-2025-0147\")\n customer_id: int = Field(..., description=\"Customer ID\", example=1)\n custom_spec_id: Optional[int] = Field(None, description=\"Custom spec ID or null\", example=1)\n estimated_hours: float = Field(..., description=\"Estimated hours\", example=12.0)\n material_cost: float = Field(..., description=\"Material cost\", example=420.0)\n labor_rate: float = Field(..., description=\"Labor rate\", example=65.0)\n status: str = Field(..., description=\"Quote status\", example=\"sent\")\n internal_note: Optional[str] = Field(None, description=\"Internal note\", example=\"Rush order requested\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T10:55:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T10:55:00Z\")\n\nclass QuotesListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Quote ID\", example=1)\n quote_number: str = Field(..., description=\"Quote number\", example=\"Q-2025-0147\")\n customer_id: int = Field(..., description=\"Customer ID\", example=1)\n status: str = Field(..., description=\"Quote status\", example=\"accepted\")\n estimated_hours: float = Field(..., description=\"Estimated hours\", example=12.0)\n material_cost: float = Field(..., description=\"Material cost\", example=420.0)\n labor_rate: float = Field(..., description=\"Labor rate\", example=65.0)\n\nclass QuotesListResponse(BaseModel):\n items: List[QuotesListItemResponse] = Field(..., description=\"Quotes\", example=[])\n total: int = Field(..., description=\"Total matching quotes\", example=1)\n\nclass QuoteUpdateRequest(BaseModel):\n status: Optional[str] = Field(None, description=\"New status for the quote\", example=\"sent\")\n internal_note: Optional[str] = Field(None, description=\"Updated internal note\", example=\"Customer confirmed\")\n\nclass QuoteUpdateResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Quote ID\", example=1)\n quote_number: str = Field(..., description=\"Quote number\", example=\"Q-2025-0147\")\n status: str = Field(..., description=\"Updated status\", example=\"sent\")\n internal_note: Optional[str] = Field(None, description=\"Updated note\", example=\"Customer confirmed\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-02T09:00:00Z\")\n\nclass JobCreateRequest(BaseModel):\n job_number: str = Field(..., description=\"Unique job number\", example=\"J-2025-0332\")\n customer_id: int = Field(..., description=\"Customer ID\", example=1)\n quote_id: Optional[int] = Field(None, description=\"Linked quote ID\", example=1)\n custom_spec_id: Optional[int] = Field(None, description=\"Linked custom spec ID\", example=1)\n priority: str = Field(..., description=\"Job priority\", example=\"high\")\n due_date: Optional[datetime] = Field(None, description=\"Job due date (YYYY-MM-DD)\", example=\"2026-01-20T00:00:00\")\n status: str = Field(..., description=\"Job status\", example=\"planned\")\n\nclass JobResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Job ID\", example=1)\n job_number: str = Field(..., description=\"Job number\", example=\"J-2025-0332\")\n customer_id: int = Field(..., description=\"Customer ID\", example=1)\n quote_id: Optional[int] = Field(None, description=\"Quote ID\", example=1)\n custom_spec_id: Optional[int] = Field(None, description=\"Custom spec ID\", example=1)\n priority: str = Field(..., description=\"Job priority\", example=\"high\")\n due_date: Optional[datetime] = Field(None, description=\"Due date\", example=\"2026-01-20T00:00:00\")\n status: str = Field(..., description=\"Job status\", example=\"planned\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T11:00:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T11:00:00Z\")\n\nclass JobsListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Job ID\", example=1)\n job_number: str = Field(..., description=\"Job number\", example=\"J-2025-0332\")\n customer_id: int = Field(..., description=\"Customer ID\", example=1)\n status: str = Field(..., description=\"Job status\", example=\"planned\")\n priority: str = Field(..., description=\"Job priority\", example=\"high\")\n due_date: Optional[datetime] = Field(None, description=\"Due date\", example=\"2026-01-20T00:00:00\")\n\nclass JobsListResponse(BaseModel):\n items: List[JobsListItemResponse] = Field(..., description=\"Jobs\", example=[])\n total: int = Field(..., description=\"Total matching jobs\", example=1)\n\nclass JobUpdateRequest(BaseModel):\n status: Optional[str] = Field(None, description=\"New job status\", example=\"shipped\")\n priority: Optional[str] = Field(None, description=\"New job priority\", example=\"high\")\n due_date: Optional[datetime] = Field(None, description=\"Updated job due date\", example=\"2026-01-22T00:00:00\")\n\nclass JobUpdateResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Job ID\", example=1)\n job_number: str = Field(..., description=\"Job number\", example=\"J-2025-0279\")\n status: str = Field(..., description=\"Updated status\", example=\"shipped\")\n priority: str = Field(..., description=\"Updated priority\", example=\"high\")\n due_date: Optional[datetime] = Field(None, description=\"Updated due date\", example=\"2026-01-22T00:00:00\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-02T10:00:00Z\")\n\nclass WorkCenterCreateRequest(BaseModel):\n name: str = Field(..., description=\"Unique work center name\", example=\"Laser Cutter LC-01\")\n description: Optional[str] = Field(None, description=\"Description of the work center\", example=\"High power laser cutting machine\")\n\nclass WorkCenterResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Work center ID\", example=1)\n name: str = Field(..., description=\"Work center name\", example=\"Laser Cutter LC-01\")\n description: Optional[str] = Field(None, description=\"Work center description\", example=\"High power laser cutting machine\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T11:10:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T11:10:00Z\")\n\nclass WorkCentersListResponse(BaseModel):\n items: List[WorkCenterResponse] = Field(..., description=\"Work centers\", example=[])\n\nclass JobTaskCreateRequest(BaseModel):\n task_code: str = Field(..., description=\"Unique task code\", example=\"JT-8793\")\n job_id: int = Field(..., description=\"Associated job ID\", example=1)\n sequence_order: int = Field(..., description=\"Order within the job sequence\", example=1)\n task_name: str = Field(..., description=\"Task operation name\", example=\"cutting\")\n work_center_id: int = Field(..., description=\"Work center ID for this task\", example=1)\n requiring_skill_level: Optional[str] = Field(None, description=\"Required operator skill level\", example=\"intermediate\")\n planned_start: Optional[datetime] = Field(None, description=\"Planned start datetime in ISO8601\", example=\"2026-01-05T08:00:00\")\n planned_finish: Optional[datetime] = Field(None, description=\"Planned finish datetime in ISO8601\", example=\"2026-01-05T10:00:00\")\n planned_duration_hours: Optional[float] = Field(None, description=\"Planned duration in hours\", example=2.0)\n\nclass JobTaskResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Job task ID\", example=1)\n task_code: str = Field(..., description=\"Unique task code\", example=\"JT-8793\")\n job_id: int = Field(..., description=\"Job ID\", example=1)\n sequence_order: int = Field(..., description=\"Sequence order\", example=1)\n task_name: str = Field(..., description=\"Task name\", example=\"cutting\")\n work_center_id: int = Field(..., description=\"Work center ID\", example=1)\n requiring_skill_level: Optional[str] = Field(None, description=\"Required skill level\", example=\"intermediate\")\n planned_start: Optional[datetime] = Field(None, description=\"Planned start datetime\", example=\"2026-01-05T08:00:00\")\n planned_finish: Optional[datetime] = Field(None, description=\"Planned finish datetime\", example=\"2026-01-05T10:00:00\")\n planned_duration_hours: Optional[float] = Field(None, description=\"Planned duration hours\", example=2.0)\n actual_start: Optional[datetime] = Field(None, description=\"Actual start datetime or null\", example=None)\n actual_finish: Optional[datetime] = Field(None, description=\"Actual finish datetime or null\", example=None)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T11:15:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T11:15:00Z\")\n\nclass JobTasksListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Task ID\", example=1)\n task_code: str = Field(..., description=\"Task code\", example=\"JT-8793\")\n job_id: int = Field(..., description=\"Job ID\", example=1)\n sequence_order: int = Field(..., description=\"Sequence order\", example=1)\n task_name: str = Field(..., description=\"Task name\", example=\"cutting\")\n work_center_id: int = Field(..., description=\"Work center ID\", example=1)\n planned_start: Optional[datetime] = Field(None, description=\"Planned start\", example=\"2026-01-05T08:00:00\")\n planned_finish: Optional[datetime] = Field(None, description=\"Planned finish\", example=\"2026-01-05T10:00:00\")\n planned_duration_hours: Optional[float] = Field(None, description=\"Planned duration\", example=2.0)\n\nclass JobTasksListResponse(BaseModel):\n items: List[JobTasksListItemResponse] = Field(..., description=\"Job tasks\", example=[])\n total: int = Field(..., description=\"Total matching tasks\", example=3)\n\nclass TimeLogCreateRequest(BaseModel):\n job_task_id: int = Field(..., description=\"Job task ID being logged\", example=1)\n operator_username: str = Field(..., description=\"Username of the operator\", example=\"op_jwilliams\")\n work_center_id: int = Field(..., description=\"Work center ID where work was performed\", example=2)\n log_start: Optional[datetime] = Field(None, description=\"Start datetime of the log; defaults to now\", example=\"2026-01-05T11:05:00\")\n actual_duration_hours: float = Field(..., description=\"Actual duration in hours\", example=2.4)\n scrap_quantity: Optional[int] = Field(None, description=\"Quantity scrapped during this log\", example=1)\n note: Optional[str] = Field(None, description=\"Notes about the work performed\", example=\"Rewelded one bracket\")\n\nclass TimeLogResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Time log ID\", example=1)\n job_task_id: int = Field(..., description=\"Job task ID\", example=1)\n operator_username: str = Field(..., description=\"Operator username\", example=\"op_jwilliams\")\n work_center_id: int = Field(..., description=\"Work center ID\", example=2)\n log_start: Optional[datetime] = Field(None, description=\"Log start datetime\", example=\"2026-01-05T11:05:00\")\n actual_duration_hours: float = Field(..., description=\"Actual duration hours\", example=2.4)\n scrap_quantity: Optional[int] = Field(None, description=\"Scrap quantity\", example=1)\n note: Optional[str] = Field(None, description=\"Log note\", example=\"Rewelded one bracket\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2026-01-05T13:50:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2026-01-05T13:50:00Z\")\n\nclass TimeLogsListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Time log ID\", example=1)\n job_task_id: int = Field(..., description=\"Job task ID\", example=1)\n operator_username: str = Field(..., description=\"Operator username\", example=\"op_jwilliams\")\n work_center_id: int = Field(..., description=\"Work center ID\", example=2)\n log_start: Optional[datetime] = Field(None, description=\"Log start datetime\", example=\"2026-01-05T11:05:00\")\n actual_duration_hours: float = Field(..., description=\"Duration hours\", example=2.4)\n scrap_quantity: Optional[int] = Field(None, description=\"Scrap quantity\", example=1)\n\nclass TimeLogsListResponse(BaseModel):\n items: List[TimeLogsListItemResponse] = Field(..., description=\"Time logs\", example=[])\n total: int = Field(..., description=\"Total matching time logs\", example=5)\n\nclass MaterialCreateRequest(BaseModel):\n name: str = Field(..., description=\"Unique material name\", example=\"Cold Rolled Steel Sheet 2mm\")\n unit_of_measure: str = Field(..., description=\"Unit of measure\", example=\"kg\")\n\nclass MaterialResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Material ID\", example=1)\n name: str = Field(..., description=\"Material name\", example=\"Cold Rolled Steel Sheet 2mm\")\n unit_of_measure: str = Field(..., description=\"Unit of measure\", example=\"kg\")\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T11:25:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T11:25:00Z\")\n\nclass MaterialsListResponse(BaseModel):\n items: List[MaterialResponse] = Field(..., description=\"Materials\", example=[])\n\nclass InventoryLotCreateRequest(BaseModel):\n lot_number: str = Field(..., description=\"Unique lot identifier\", example=\"LOT-CRS-2401\")\n material_id: int = Field(..., description=\"Associated material ID\", example=1)\n on_hand_quantity: float = Field(..., description=\"Initial on hand quantity\", example=1000.0)\n reserved_quantity: Optional[float] = Field(0.0, description=\"Initial reserved quantity\", example=0.0)\n\nclass InventoryLotResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Inventory lot ID\", example=1)\n lot_number: str = Field(..., description=\"Lot number\", example=\"LOT-CRS-2401\")\n material_id: int = Field(..., description=\"Material ID\", example=1)\n on_hand_quantity: float = Field(..., description=\"On hand quantity\", example=1000.0)\n reserved_quantity: float = Field(..., description=\"Reserved quantity\", example=150.0)\n created_at: Optional[datetime] = Field(None, description=\"Creation time\", example=\"2025-01-01T11:30:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update time\", example=\"2025-01-01T11:30:00Z\")\n\nclass InventoryLotsListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Lot ID\", example=1)\n lot_number: str = Field(..., description=\"Lot number\", example=\"LOT-CRS-2401\")\n material_id: int = Field(..., description=\"Material ID\", example=1)\n on_hand_quantity: float = Field(..., description=\"On hand quantity\", example=850.0)\n reserved_quantity: float = Field(..., description=\"Reserved quantity\", example=150.0)\n\nclass InventoryLotsListResponse(BaseModel):\n items: List[InventoryLotsListItemResponse] = Field(..., description=\"Inventory lots\", example=[])\n\nclass InventoryLotAdjustRequest(BaseModel):\n on_hand_delta: Optional[float] = Field(None, description=\"Delta to apply to on_hand_quantity\", example=-150.0)\n reserved_delta: Optional[float] = Field(None, description=\"Delta to apply to reserved_quantity\", example=150.0)\n\nclass InventoryLotAdjustResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Inventory lot ID\", example=1)\n lot_number: str = Field(..., description=\"Lot number\", example=\"LOT-CRS-2401\")\n on_hand_quantity: float = Field(..., description=\"Updated on hand quantity\", example=850.0)\n reserved_quantity: float = Field(..., description=\"Updated reserved quantity\", example=150.0)\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-02T09:00:00Z\")\n\nclass MaterialReservationCreateRequest(BaseModel):\n job_id: int = Field(..., description=\"Job ID that is reserving material\", example=1)\n inventory_lot_id: int = Field(..., description=\"Inventory lot ID to reserve from\", example=1)\n quantity: float = Field(..., description=\"Quantity to reserve\", example=150.0)\n\nclass MaterialReservationResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Material reservation ID\", example=1)\n job_id: int = Field(..., description=\"Job ID\", example=1)\n inventory_lot_id: int = Field(..., description=\"Inventory lot ID\", example=1)\n quantity: float = Field(..., description=\"Reserved quantity\", example=150.0)\n created_at: Optional[datetime] = Field(None, description=\"Creation timestamp\", example=\"2025-01-01T11:35:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update timestamp\", example=\"2025-01-01T11:35:00Z\")\n\nclass MaterialReservationsListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Reservation ID\", example=1)\n job_id: int = Field(..., description=\"Job ID\", example=1)\n inventory_lot_id: int = Field(..., description=\"Inventory lot ID\", example=1)\n quantity: float = Field(..., description=\"Reserved quantity\", example=150.0)\n\nclass MaterialReservationsListResponse(BaseModel):\n items: List[MaterialReservationsListItemResponse] = Field(..., description=\"Material reservations\", example=[])\n\nclass ShipmentCreateRequest(BaseModel):\n shipment_number: str = Field(..., description=\"Unique shipment number\", example=\"SHP-2025-0101\")\n job_id: int = Field(..., description=\"Job ID being shipped\", example=1)\n customer_id: int = Field(..., description=\"Customer receiving the shipment\", example=1)\n delivery_status: str = Field(..., description=\"Shipment status\", example=\"in_transit\")\n shipped_at: Optional[datetime] = Field(None, description=\"Datetime when shipment left the facility\", example=\"2026-01-10T15:00:00\")\n delivered_at: Optional[datetime] = Field(None, description=\"Datetime when shipment was delivered\", example=None)\n\nclass ShipmentResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Shipment ID\", example=1)\n shipment_number: str = Field(..., description=\"Shipment number\", example=\"SHP-2025-0101\")\n job_id: int = Field(..., description=\"Job ID\", example=1)\n customer_id: int = Field(..., description=\"Customer ID\", example=1)\n delivery_status: str = Field(..., description=\"Shipment status\", example=\"in_transit\")\n shipped_at: Optional[datetime] = Field(None, description=\"Shipped datetime\", example=\"2026-01-10T15:00:00\")\n delivered_at: Optional[datetime] = Field(None, description=\"Delivered datetime or null\", example=None)\n created_at: Optional[datetime] = Field(None, description=\"Creation time\", example=\"2026-01-10T15:05:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update time\", example=\"2026-01-10T15:05:00Z\")\n\nclass ShipmentsListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Shipment ID\", example=1)\n shipment_number: str = Field(..., description=\"Shipment number\", example=\"SHP-2025-0101\")\n job_id: int = Field(..., description=\"Job ID\", example=1)\n customer_id: int = Field(..., description=\"Customer ID\", example=1)\n delivery_status: str = Field(..., description=\"Shipment status\", example=\"in_transit\")\n\nclass ShipmentsListResponse(BaseModel):\n items: List[ShipmentsListItemResponse] = Field(..., description=\"Shipments\", example=[])\n\nclass ShipmentUpdateRequest(BaseModel):\n delivery_status: Optional[str] = Field(None, description=\"New delivery status\", example=\"delivered\")\n shipped_at: Optional[datetime] = Field(None, description=\"Updated shipped_at datetime\", example=\"2026-01-10T15:00:00\")\n delivered_at: Optional[datetime] = Field(None, description=\"Updated delivered_at datetime\", example=\"2026-01-15T11:30:00\")\n\nclass ShipmentUpdateResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Shipment ID\", example=1)\n shipment_number: str = Field(..., description=\"Shipment number\", example=\"SHP-2025-0101\")\n delivery_status: str = Field(..., description=\"Updated delivery status\", example=\"delivered\")\n shipped_at: Optional[datetime] = Field(None, description=\"Shipped datetime\", example=\"2026-01-10T15:00:00\")\n delivered_at: Optional[datetime] = Field(None, description=\"Delivered datetime\", example=\"2026-01-15T11:30:00\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update time\", example=\"2026-01-15T11:35:00Z\")\n\nclass ShipmentPackageCreateRequest(BaseModel):\n shipment_id: int = Field(..., description=\"Shipment ID that this package belongs to\", example=1)\n package_number: int = Field(..., description=\"Sequential package number within the shipment\", example=1)\n weight_kg: float = Field(..., description=\"Weight of the package in kg\", example=45.0)\n tracking_number: str = Field(..., description=\"Unique tracking number\", example=\"CBX123456US\")\n\nclass ShipmentPackageResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Shipment package ID\", example=1)\n shipment_id: int = Field(..., description=\"Shipment ID\", example=1)\n package_number: int = Field(..., description=\"Package number within shipment\", example=1)\n weight_kg: float = Field(..., description=\"Package weight in kg\", example=45.0)\n tracking_number: str = Field(..., description=\"Tracking number\", example=\"CBX123456US\")\n created_at: Optional[datetime] = Field(None, description=\"Creation time\", example=\"2026-01-10T15:10:00Z\")\n updated_at: Optional[datetime] = Field(None, description=\"Last update time\", example=\"2026-01-10T15:10:00Z\")\n\nclass ShipmentPackagesListItemResponse(BaseModel):\n model_config = ConfigDict(from_attributes=True)\n id: int = Field(..., description=\"Package ID\", example=1)\n shipment_id: int = Field(..., description=\"Shipment ID\", example=1)\n package_number: int = Field(..., description=\"Package number\", example=1)\n weight_kg: float = Field(..., description=\"Weight in kg\", example=38.5)\n tracking_number: str = Field(..., description=\"Tracking number\", example=\"CBX123457US\")\n\nclass ShipmentPackagesListResponse(BaseModel):\n items: List[ShipmentPackagesListItemResponse] = Field(..., description=\"Shipment packages\", example=[])\n\nclass CapacityTaskItem(BaseModel):\n job_task_id: int = Field(..., description=\"Job task ID\", example=10)\n task_code: str = Field(..., description=\"Task code\", example=\"JT-8801\")\n job_id: int = Field(..., description=\"Job ID\", example=5)\n task_name: str = Field(..., description=\"Task name\", example=\"cutting\")\n planned_start: Optional[datetime] = Field(None, description=\"Planned start datetime\", example=\"2026-01-05T08:00:00\")\n planned_finish: Optional[datetime] = Field(None, description=\"Planned finish datetime\", example=\"2026-01-05T10:00:00\")\n planned_duration_hours: Optional[float] = Field(None, description=\"Planned hours for this task\", example=2.0)\n actual_hours: float = Field(..., description=\"Sum of actual_duration_hours from time_logs\", example=1.8)\n\nclass CapacityUtilizationResponse(BaseModel):\n work_center_id: int = Field(..., description=\"Analyzed work center ID\", example=1)\n planned_from: datetime = Field(..., description=\"Start of analysis window\", example=\"2026-01-01T00:00:00\")\n planned_to: datetime = Field(..., description=\"End of analysis window\", example=\"2026-01-31T23:59:59\")\n total_planned_hours: float = Field(..., description=\"Sum of planned_duration_hours\", example=120.0)\n total_actual_hours: float = Field(..., description=\"Sum of actual_duration_hours\", example=98.5)\n job_tasks: List[CapacityTaskItem] = Field(..., description=\"Job tasks scheduled in the period\", example=[])\n\n@app.post(\"/api/customers\", response_model=CustomerResponse, summary=\"Create a new customer\", description=\"Add a new customer with billing and contact details\", tags=[\"customers\"], operation_id=\"create_customer\")\nasync def create_customer(request: CustomerCreateRequest = Body(...)) -> CustomerResponse:\n session = SessionLocal()\n obj = Customer(\n name=request.name,\n billing_address=request.billing_address,\n contact_person=request.contact_person,\n email=request.email,\n phone=request.phone,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return CustomerResponse.model_validate(obj)\n\n@app.get(\"/api/customers\", response_model=CustomersListResponse, summary=\"List customers with optional name filter\", description=\"Retrieve customers, optionally filtering by exact or partial name\", tags=[\"customers\"], operation_id=\"list_customers\")\nasync def list_customers(name: Optional[str] = Query(None, description=\"Filter by name containing this text\", example=\"Acme\"), limit: Optional[int] = Query(50, description=\"Maximum records to return\", example=50), offset: Optional[int] = Query(0, description=\"Offset for pagination\", example=0)) -> CustomersListResponse:\n session = SessionLocal()\n query = session.query(Customer)\n if name is not None:\n query = query.filter(Customer.name.contains(name))\n total = query.count()\n objs = query.offset(offset).limit(limit).all()\n items = [CustomerResponse.model_validate(o) for o in objs]\n session.close()\n return CustomersListResponse(items=items, total=total)\n\n@app.get(\"/api/customers/{customer_id}\", response_model=CustomerResponse, summary=\"Get a customer by ID\", description=\"Retrieve a single customer record by its numeric ID\", tags=[\"customers\"], operation_id=\"get_customer_by_id\")\nasync def get_customer_by_id(customer_id: int = Path(..., description=\"Customer primary key ID\", example=1)) -> CustomerResponse:\n session = SessionLocal()\n obj = session.query(Customer).filter(Customer.id == customer_id).first()\n session.close()\n if obj is None:\n return CustomerResponse(id=0, name=\"\", billing_address=\"\", contact_person=None, email=None, phone=None, created_at=None, updated_at=None)\n return CustomerResponse.model_validate(obj)\n\n@app.get(\"/api/customers/by-name/{customer_name}\", response_model=CustomerResponse, summary=\"Get a customer by exact name\", description=\"Lookup a single customer using its unique name\", tags=[\"customers\"], operation_id=\"get_customer_by_name\")\nasync def get_customer_by_name(customer_name: str = Path(..., description=\"Exact customer name to lookup\", example=\"Acme Robotics LLC\")) -> CustomerResponse:\n session = SessionLocal()\n obj = session.query(Customer).filter(Customer.name == customer_name).first()\n session.close()\n if obj is None:\n return CustomerResponse(id=0, name=\"\", billing_address=\"\", contact_person=None, email=None, phone=None, created_at=None, updated_at=None)\n return CustomerResponse.model_validate(obj)\n\n@app.post(\"/api/product-templates\", response_model=ProductTemplateResponse, summary=\"Create a new product template\", description=\"Define a new product template record with optional description\", tags=[\"product_templates\"], operation_id=\"create_product_template\")\nasync def create_product_template(request: ProductTemplateCreateRequest = Body(...)) -> ProductTemplateResponse:\n session = SessionLocal()\n obj = ProductTemplate(\n name=request.name,\n description=request.description,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return ProductTemplateResponse.model_validate(obj)\n\n@app.get(\"/api/product-templates\", response_model=ProductTemplatesListResponse, summary=\"List product templates\", description=\"Retrieve product templates with optional name filter\", tags=[\"product_templates\"], operation_id=\"list_product_templates\")\nasync def list_product_templates(name: Optional[str] = Query(None, description=\"Filter templates containing this name\", example=\"Workbench\"), limit: Optional[int] = Query(50, description=\"Max number of templates to return\", example=50), offset: Optional[int] = Query(0, description=\"Offset for pagination\", example=0)) -> ProductTemplatesListResponse:\n session = SessionLocal()\n query = session.query(ProductTemplate)\n if name is not None:\n query = query.filter(ProductTemplate.name.contains(name))\n total = query.count()\n objs = query.offset(offset).limit(limit).all()\n items = [ProductTemplateResponse.model_validate(o) for o in objs]\n session.close()\n return ProductTemplatesListResponse(items=items, total=total)\n\n@app.get(\"/api/product-templates/{product_template_id}\", response_model=ProductTemplateResponse, summary=\"Get product template by ID\", description=\"Retrieve a single product template using its ID\", tags=[\"product_templates\"], operation_id=\"get_product_template_by_id\")\nasync def get_product_template_by_id(product_template_id: int = Path(..., description=\"Product template ID\", example=1)) -> ProductTemplateResponse:\n session = SessionLocal()\n obj = session.query(ProductTemplate).filter(ProductTemplate.id == product_template_id).first()\n session.close()\n if obj is None:\n return ProductTemplateResponse(id=0, name=\"\", description=None, created_at=None, updated_at=None)\n return ProductTemplateResponse.model_validate(obj)\n\n@app.get(\"/api/product-templates/by-name/{template_name}\", response_model=ProductTemplateResponse, summary=\"Get product template by exact name\", description=\"Lookup a product template using its unique name\", tags=[\"product_templates\"], operation_id=\"get_product_template_by_name\")\nasync def get_product_template_by_name(template_name: str = Path(..., description=\"Exact product template name\", example=\"Steel Workbench Pro\")) -> ProductTemplateResponse:\n session = SessionLocal()\n obj = session.query(ProductTemplate).filter(ProductTemplate.name == template_name).first()\n session.close()\n if obj is None:\n return ProductTemplateResponse(id=0, name=\"\", description=None, created_at=None, updated_at=None)\n return ProductTemplateResponse.model_validate(obj)\n\n@app.post(\"/api/product-templates/{product_template_id}/options\", response_model=ProductTemplateOptionResponse, summary=\"Create an option for a product template\", description=\"Add a single option value for a given product template\", tags=[\"product_template_options\"], operation_id=\"create_product_template_option\")\nasync def create_product_template_option(product_template_id: int = Path(..., description=\"Parent product template ID\", example=1), request: ProductTemplateOptionCreateRequest = Body(...)) -> ProductTemplateOptionResponse:\n session = SessionLocal()\n obj = ProductTemplateOption(\n product_template_id=product_template_id,\n option_name=request.option_name,\n option_value=request.option_value,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return ProductTemplateOptionResponse.model_validate(obj)\n\n@app.get(\"/api/product-templates/{product_template_id}/options\", response_model=ProductTemplateOptionsListResponse, summary=\"List options for a product template\", description=\"Retrieve all option values for a specific product template\", tags=[\"product_template_options\"], operation_id=\"list_product_template_options\")\nasync def list_product_template_options(product_template_id: int = Path(..., description=\"Product template ID\", example=1), option_name: Optional[str] = Query(None, description=\"Filter by option name\", example=\"color\")) -> ProductTemplateOptionsListResponse:\n session = SessionLocal()\n query = session.query(ProductTemplateOption).filter(ProductTemplateOption.product_template_id == product_template_id)\n if option_name is not None:\n query = query.filter(ProductTemplateOption.option_name == option_name)\n objs = query.all()\n items = [ProductTemplateOptionResponse.model_validate(o) for o in objs]\n session.close()\n return ProductTemplateOptionsListResponse(items=items)\n\n@app.post(\"/api/product-templates/{product_template_id}/standard-tasks\", response_model=StandardTaskSequenceResponse, summary=\"Create a standard task for a template\", description=\"Add a single task step into a product template's standard sequence\", tags=[\"standard_task_sequences\"], operation_id=\"create_standard_task_sequence\")\nasync def create_standard_task_sequence(product_template_id: int = Path(..., description=\"Product template ID\", example=1), request: StandardTaskSequenceCreateRequest = Body(...)) -> StandardTaskSequenceResponse:\n session = SessionLocal()\n obj = StandardTaskSequence(\n product_template_id=product_template_id,\n sequence_order=request.sequence_order,\n task_name=request.task_name,\n default_planned_duration_hours=request.default_planned_duration_hours,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return StandardTaskSequenceResponse.model_validate(obj)\n\n@app.get(\"/api/product-templates/{product_template_id}/standard-tasks\", response_model=StandardTaskSequencesListResponse, summary=\"List standard tasks for a template\", description=\"Retrieve all standard tasks for a product template ordered by sequence\", tags=[\"standard_task_sequences\"], operation_id=\"list_standard_task_sequences\")\nasync def list_standard_task_sequences(product_template_id: int = Path(..., description=\"Product template ID\", example=1)) -> StandardTaskSequencesListResponse:\n session = SessionLocal()\n objs = session.query(StandardTaskSequence).filter(StandardTaskSequence.product_template_id == product_template_id).order_by(StandardTaskSequence.sequence_order.asc()).all()\n items = [StandardTaskSequenceResponse.model_validate(o) for o in objs]\n session.close()\n return StandardTaskSequencesListResponse(items=items)\n\n@app.post(\"/api/custom-specs\", response_model=CustomSpecResponse, summary=\"Create a custom specification\", description=\"Create a custom specification linking a customer and product template\", tags=[\"custom_specs\"], operation_id=\"create_custom_spec\")\nasync def create_custom_spec(request: CustomSpecCreateRequest = Body(...)) -> CustomSpecResponse:\n session = SessionLocal()\n obj = CustomSpec(\n customer_id=request.customer_id,\n product_template_id=request.product_template_id,\n notes=request.notes,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return CustomSpecResponse.model_validate(obj)\n\n@app.get(\"/api/custom-specs\", response_model=CustomSpecsListResponse, summary=\"List custom specs\", description=\"List custom specs with optional filters by customer or product template\", tags=[\"custom_specs\"], operation_id=\"list_custom_specs\")\nasync def list_custom_specs(customer_id: Optional[int] = Query(None, description=\"Filter by customer ID\", example=1), product_template_id: Optional[int] = Query(None, description=\"Filter by product template ID\", example=1), limit: Optional[int] = Query(50, description=\"Max records to return\", example=50), offset: Optional[int] = Query(0, description=\"Offset for pagination\", example=0)) -> CustomSpecsListResponse:\n session = SessionLocal()\n query = session.query(CustomSpec)\n if customer_id is not None:\n query = query.filter(CustomSpec.customer_id == customer_id)\n if product_template_id is not None:\n query = query.filter(CustomSpec.product_template_id == product_template_id)\n total = query.count()\n objs = query.offset(offset).limit(limit).all()\n items = [CustomSpecResponse.model_validate(o) for o in objs]\n session.close()\n return CustomSpecsListResponse(items=items, total=total)\n\n@app.get(\"/api/custom-specs/{custom_spec_id}\", response_model=CustomSpecResponse, summary=\"Get custom spec by ID\", description=\"Retrieve a single custom spec by its ID\", tags=[\"custom_specs\"], operation_id=\"get_custom_spec_by_id\")\nasync def get_custom_spec_by_id(custom_spec_id: int = Path(..., description=\"Custom spec ID\", example=1)) -> CustomSpecResponse:\n session = SessionLocal()\n obj = session.query(CustomSpec).filter(CustomSpec.id == custom_spec_id).first()\n session.close()\n if obj is None:\n return CustomSpecResponse(id=0, customer_id=0, product_template_id=0, notes=None, created_at=None, updated_at=None)\n return CustomSpecResponse.model_validate(obj)\n\n@app.post(\"/api/custom-specs/{custom_spec_id}/options\", response_model=CustomSpecOptionResponse, summary=\"Create or update a custom spec option\", description=\"Set a named option value for a custom spec, upserting by option name\", tags=[\"custom_spec_options\"], operation_id=\"upsert_custom_spec_option\")\nasync def upsert_custom_spec_option(custom_spec_id: int = Path(..., description=\"Custom spec ID\", example=1), request: CustomSpecOptionUpsertRequest = Body(...)) -> CustomSpecOptionResponse:\n session = SessionLocal()\n obj = session.query(CustomSpecOption).filter(CustomSpecOption.custom_spec_id == custom_spec_id, CustomSpecOption.option_name == request.option_name).first()\n now = datetime.utcnow()\n if obj is None:\n obj = CustomSpecOption(\n custom_spec_id=custom_spec_id,\n option_name=request.option_name,\n option_value=request.option_value,\n created_at=now,\n updated_at=now,\n )\n session.add(obj)\n else:\n obj.option_value = request.option_value\n obj.updated_at = now\n session.commit()\n session.refresh(obj)\n session.close()\n return CustomSpecOptionResponse.model_validate(obj)\n\n@app.get(\"/api/custom-specs/{custom_spec_id}/options\", response_model=CustomSpecOptionsListResponse, summary=\"List options for a custom spec\", description=\"Retrieve all option name/value pairs for a custom spec\", tags=[\"custom_spec_options\"], operation_id=\"list_custom_spec_options\")\nasync def list_custom_spec_options(custom_spec_id: int = Path(..., description=\"Custom spec ID\", example=1)) -> CustomSpecOptionsListResponse:\n session = SessionLocal()\n objs = session.query(CustomSpecOption).filter(CustomSpecOption.custom_spec_id == custom_spec_id).all()\n items = [CustomSpecOptionResponse.model_validate(o) for o in objs]\n session.close()\n return CustomSpecOptionsListResponse(items=items)\n\n@app.post(\"/api/custom-specs/{custom_spec_id}/numeric-params\", response_model=CustomSpecNumericParamResponse, summary=\"Create or update a numeric param\", description=\"Set a numeric parameter with unit for a custom spec, upserting by name\", tags=[\"custom_spec_numeric_params\"], operation_id=\"upsert_custom_spec_numeric_param\")\nasync def upsert_custom_spec_numeric_param(custom_spec_id: int = Path(..., description=\"Custom spec ID\", example=1), request: CustomSpecNumericParamUpsertRequest = Body(...)) -> CustomSpecNumericParamResponse:\n session = SessionLocal()\n obj = session.query(CustomSpecNumericParam).filter(CustomSpecNumericParam.custom_spec_id == custom_spec_id, CustomSpecNumericParam.param_name == request.param_name).first()\n now = datetime.utcnow()\n if obj is None:\n obj = CustomSpecNumericParam(\n custom_spec_id=custom_spec_id,\n param_name=request.param_name,\n param_value=request.param_value,\n unit=request.unit,\n created_at=now,\n updated_at=now,\n )\n session.add(obj)\n else:\n obj.param_value = request.param_value\n obj.unit = request.unit\n obj.updated_at = now\n session.commit()\n session.refresh(obj)\n session.close()\n return CustomSpecNumericParamResponse.model_validate(obj)\n\n@app.get(\"/api/custom-specs/{custom_spec_id}/numeric-params\", response_model=CustomSpecNumericParamsListResponse, summary=\"List numeric params for a custom spec\", description=\"Retrieve all numeric parameters and units for a custom spec\", tags=[\"custom_spec_numeric_params\"], operation_id=\"list_custom_spec_numeric_params\")\nasync def list_custom_spec_numeric_params(custom_spec_id: int = Path(..., description=\"Custom spec ID\", example=1)) -> CustomSpecNumericParamsListResponse:\n session = SessionLocal()\n objs = session.query(CustomSpecNumericParam).filter(CustomSpecNumericParam.custom_spec_id == custom_spec_id).all()\n items = [CustomSpecNumericParamResponse.model_validate(o) for o in objs]\n session.close()\n return CustomSpecNumericParamsListResponse(items=items)\n\n@app.post(\"/api/quotes\", response_model=QuoteResponse, summary=\"Create a quote\", description=\"Create a quote linked to a customer and optional custom spec\", tags=[\"quotes\"], operation_id=\"create_quote\")\nasync def create_quote(request: QuoteCreateRequest = Body(...)) -> QuoteResponse:\n session = SessionLocal()\n obj = Quote(\n quote_number=request.quote_number,\n customer_id=request.customer_id,\n custom_spec_id=request.custom_spec_id,\n estimated_hours=request.estimated_hours,\n material_cost=request.material_cost,\n labor_rate=request.labor_rate,\n status=request.status,\n internal_note=request.internal_note,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return QuoteResponse.model_validate(obj)\n\n@app.get(\"/api/quotes\", response_model=QuotesListResponse, summary=\"List quotes with filters\", description=\"Retrieve quotes filtered by customer, status, or quote number\", tags=[\"quotes\"], operation_id=\"list_quotes\")\nasync def list_quotes(quote_number: Optional[str] = Query(None, description=\"Filter by exact quote number\", example=\"Q-2025-0147\"), customer_id: Optional[int] = Query(None, description=\"Filter by customer ID\", example=1), status: Optional[str] = Query(None, description=\"Filter by quote status\", example=\"accepted\"), limit: Optional[int] = Query(50, description=\"Max records to return\", example=50), offset: Optional[int] = Query(0, description=\"Offset for pagination\", example=0)) -> QuotesListResponse:\n session = SessionLocal()\n query = session.query(Quote)\n if quote_number is not None:\n query = query.filter(Quote.quote_number == quote_number)\n if customer_id is not None:\n query = query.filter(Quote.customer_id == customer_id)\n if status is not None:\n query = query.filter(Quote.status == status)\n total = query.count()\n objs = query.offset(offset).limit(limit).all()\n items = [QuotesListItemResponse.model_validate(o) for o in objs]\n session.close()\n return QuotesListResponse(items=items, total=total)\n\n@app.get(\"/api/quotes/by-number/{quote_number}\", response_model=QuoteResponse, summary=\"Get quote by quote number\", description=\"Retrieve a single quote by its unique quote_number\", tags=[\"quotes\"], operation_id=\"get_quote_by_number\")\nasync def get_quote_by_number(quote_number: str = Path(..., description=\"Exact quote number to lookup\", example=\"Q-2025-0147\")) -> QuoteResponse:\n session = SessionLocal()\n obj = session.query(Quote).filter(Quote.quote_number == quote_number).first()\n session.close()\n if obj is None:\n return QuoteResponse(id=0, quote_number=\"\", customer_id=0, custom_spec_id=None, estimated_hours=0.0, material_cost=0.0, labor_rate=0.0, status=\"\", internal_note=None, created_at=None, updated_at=None)\n return QuoteResponse.model_validate(obj)\n\n@app.patch(\"/api/quotes/{quote_id}\", response_model=QuoteUpdateResponse, summary=\"Update quote status or note\", description=\"Update mutable fields such as status or internal_note for a quote\", tags=[\"quotes\"], operation_id=\"update_quote_partial\")\nasync def update_quote_partial(quote_id: int = Path(..., description=\"Quote ID to update\", example=1), request: QuoteUpdateRequest = Body(...)) -> QuoteUpdateResponse:\n session = SessionLocal()\n obj = session.query(Quote).filter(Quote.id == quote_id).first()\n now = datetime.utcnow()\n if obj is not None:\n if request.status is not None:\n obj.status = request.status\n if request.internal_note is not None:\n obj.internal_note = request.internal_note\n obj.updated_at = now\n session.commit()\n session.refresh(obj)\n session.close()\n if obj is None:\n return QuoteUpdateResponse(id=0, quote_number=\"\", status=\"\", internal_note=None, updated_at=None)\n return QuoteUpdateResponse.model_validate(obj)\n\n@app.post(\"/api/jobs\", response_model=JobResponse, summary=\"Create a job\", description=\"Create a manufacturing job linked to customer, quote, and custom spec\", tags=[\"jobs\"], operation_id=\"create_job\")\nasync def create_job(request: JobCreateRequest = Body(...)) -> JobResponse:\n session = SessionLocal()\n due = None\n if request.due_date is not None:\n if isinstance(request.due_date, datetime):\n due = request.due_date.date()\n obj = Job(\n job_number=request.job_number,\n customer_id=request.customer_id,\n quote_id=request.quote_id,\n custom_spec_id=request.custom_spec_id,\n priority=request.priority,\n due_date=due,\n status=request.status,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n resp_due = None\n if obj.due_date is not None:\n resp_due = datetime.combine(obj.due_date, datetime.min.time())\n return JobResponse(\n id=obj.id,\n job_number=obj.job_number,\n customer_id=obj.customer_id,\n quote_id=obj.quote_id,\n custom_spec_id=obj.custom_spec_id,\n priority=obj.priority,\n due_date=resp_due,\n status=obj.status,\n created_at=obj.created_at,\n updated_at=obj.updated_at,\n )\n\n@app.get(\"/api/jobs\", response_model=JobsListResponse, summary=\"List jobs with filters\", description=\"Retrieve jobs filtered by customer, status, or job_number\", tags=[\"jobs\"], operation_id=\"list_jobs\")\nasync def list_jobs(job_number: Optional[str] = Query(None, description=\"Filter by exact job number\", example=\"J-2025-0332\"), customer_id: Optional[int] = Query(None, description=\"Filter by customer ID\", example=1), status: Optional[str] = Query(None, description=\"Filter by job status\", example=\"planned\"), due_date_from: Optional[datetime] = Query(None, description=\"Filter by due date on or after this date\", example=\"2026-01-01T00:00:00\"), due_date_to: Optional[datetime] = Query(None, description=\"Filter by due date on or before this date\", example=\"2026-01-31T00:00:00\"), limit: Optional[int] = Query(50, description=\"Max records to return\", example=50), offset: Optional[int] = Query(0, description=\"Offset for pagination\", example=0)) -> JobsListResponse:\n session = SessionLocal()\n query = session.query(Job)\n if job_number is not None:\n query = query.filter(Job.job_number == job_number)\n if customer_id is not None:\n query = query.filter(Job.customer_id == customer_id)\n if status is not None:\n query = query.filter(Job.status == status)\n if due_date_from is not None:\n query = query.filter(Job.due_date >= due_date_from.date())\n if due_date_to is not None:\n query = query.filter(Job.due_date <= due_date_to.date())\n total = query.count()\n objs = query.offset(offset).limit(limit).all()\n items: List[JobsListItemResponse] = []\n for o in objs:\n resp_due = None\n if o.due_date is not None:\n resp_due = datetime.combine(o.due_date, datetime.min.time())\n items.append(JobsListItemResponse(id=o.id, job_number=o.job_number, customer_id=o.customer_id, status=o.status, priority=o.priority, due_date=resp_due))\n session.close()\n return JobsListResponse(items=items, total=total)\n\n@app.get(\"/api/jobs/by-number/{job_number}\", response_model=JobResponse, summary=\"Get job by job number\", description=\"Retrieve a single job by its unique job_number\", tags=[\"jobs\"], operation_id=\"get_job_by_number\")\nasync def get_job_by_number(job_number: str = Path(..., description=\"Exact job number to lookup\", example=\"J-2025-0332\")) -> JobResponse:\n session = SessionLocal()\n obj = session.query(Job).filter(Job.job_number == job_number).first()\n session.close()\n if obj is None:\n return JobResponse(id=0, job_number=\"\", customer_id=0, quote_id=None, custom_spec_id=None, priority=\"\", due_date=None, status=\"\", created_at=None, updated_at=None)\n resp_due = None\n if obj.due_date is not None:\n resp_due = datetime.combine(obj.due_date, datetime.min.time())\n return JobResponse(id=obj.id, job_number=obj.job_number, customer_id=obj.customer_id, quote_id=obj.quote_id, custom_spec_id=obj.custom_spec_id, priority=obj.priority, due_date=resp_due, status=obj.status, created_at=obj.created_at, updated_at=obj.updated_at)\n\n@app.patch(\"/api/jobs/{job_id}\", response_model=JobUpdateResponse, summary=\"Update job status or priority\", description=\"Update mutable job fields like status, priority, or due_date\", tags=[\"jobs\"], operation_id=\"update_job_partial\")\nasync def update_job_partial(job_id: int = Path(..., description=\"Job ID to update\", example=1), request: JobUpdateRequest = Body(...)) -> JobUpdateResponse:\n session = SessionLocal()\n obj = session.query(Job).filter(Job.id == job_id).first()\n now = datetime.utcnow()\n if obj is not None:\n if request.status is not None:\n obj.status = request.status\n if request.priority is not None:\n obj.priority = request.priority\n if request.due_date is not None:\n if isinstance(request.due_date, datetime):\n obj.due_date = request.due_date.date()\n obj.updated_at = now\n session.commit()\n session.refresh(obj)\n session.close()\n if obj is None:\n return JobUpdateResponse(id=0, job_number=\"\", status=\"\", priority=\"\", due_date=None, updated_at=None)\n resp_due = None\n if obj.due_date is not None:\n resp_due = datetime.combine(obj.due_date, datetime.min.time())\n return JobUpdateResponse(id=obj.id, job_number=obj.job_number, status=obj.status, priority=obj.priority, due_date=resp_due, updated_at=obj.updated_at)\n\n@app.post(\"/api/work-centers\", response_model=WorkCenterResponse, summary=\"Create a work center\", description=\"Create a new work center such as a machine or cell\", tags=[\"work_centers\"], operation_id=\"create_work_center\")\nasync def create_work_center(request: WorkCenterCreateRequest = Body(...)) -> WorkCenterResponse:\n session = SessionLocal()\n obj = WorkCenter(\n name=request.name,\n description=request.description,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return WorkCenterResponse.model_validate(obj)\n\n@app.get(\"/api/work-centers\", response_model=WorkCentersListResponse, summary=\"List work centers\", description=\"Retrieve work centers with optional name filter\", tags=[\"work_centers\"], operation_id=\"list_work_centers\")\nasync def list_work_centers(name: Optional[str] = Query(None, description=\"Filter by name containing this text\", example=\"Laser Cutter\")) -> WorkCentersListResponse:\n session = SessionLocal()\n query = session.query(WorkCenter)\n if name is not None:\n query = query.filter(WorkCenter.name.contains(name))\n objs = query.all()\n items = [WorkCenterResponse.model_validate(o) for o in objs]\n session.close()\n return WorkCentersListResponse(items=items)\n\n@app.get(\"/api/work-centers/by-name/{work_center_name}\", response_model=WorkCenterResponse, summary=\"Get work center by name\", description=\"Lookup a work center by its unique name\", tags=[\"work_centers\"], operation_id=\"get_work_center_by_name\")\nasync def get_work_center_by_name(work_center_name: str = Path(..., description=\"Exact work center name\", example=\"Laser Cutter LC-01\")) -> WorkCenterResponse:\n session = SessionLocal()\n obj = session.query(WorkCenter).filter(WorkCenter.name == work_center_name).first()\n session.close()\n if obj is None:\n return WorkCenterResponse(id=0, name=\"\", description=None, created_at=None, updated_at=None)\n return WorkCenterResponse.model_validate(obj)\n\n@app.post(\"/api/job-tasks\", response_model=JobTaskResponse, summary=\"Create a job task\", description=\"Create a single job task step for a specific job and work center\", tags=[\"job_tasks\"], operation_id=\"create_job_task\")\nasync def create_job_task(request: JobTaskCreateRequest = Body(...)) -> JobTaskResponse:\n session = SessionLocal()\n obj = JobTask(\n task_code=request.task_code,\n job_id=request.job_id,\n sequence_order=request.sequence_order,\n task_name=request.task_name,\n work_center_id=request.work_center_id,\n requiring_skill_level=request.requiring_skill_level,\n planned_start=request.planned_start,\n planned_finish=request.planned_finish,\n planned_duration_hours=request.planned_duration_hours,\n actual_start=None,\n actual_finish=None,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return JobTaskResponse.model_validate(obj)\n\n@app.get(\"/api/job-tasks\", response_model=JobTasksListResponse, summary=\"List job tasks with filters\", description=\"List job tasks filtered by job, work center, or date range\", tags=[\"job_tasks\"], operation_id=\"list_job_tasks\")\nasync def list_job_tasks(job_id: Optional[int] = Query(None, description=\"Filter by job ID\", example=1), work_center_id: Optional[int] = Query(None, description=\"Filter by work center ID\", example=1), planned_start_from: Optional[datetime] = Query(None, description=\"Filter tasks with planned_start on or after this datetime\", example=\"2026-01-01T00:00:00\"), planned_finish_to: Optional[datetime] = Query(None, description=\"Filter tasks with planned_finish on or before this datetime\", example=\"2026-01-31T23:59:59\"), limit: Optional[int] = Query(100, description=\"Max records to return\", example=100), offset: Optional[int] = Query(0, description=\"Offset for pagination\", example=0)) -> JobTasksListResponse:\n session = SessionLocal()\n query = session.query(JobTask)\n if job_id is not None:\n query = query.filter(JobTask.job_id == job_id)\n if work_center_id is not None:\n query = query.filter(JobTask.work_center_id == work_center_id)\n if planned_start_from is not None:\n query = query.filter(JobTask.planned_start >= planned_start_from)\n if planned_finish_to is not None:\n query = query.filter(JobTask.planned_finish <= planned_finish_to)\n total = query.count()\n objs = query.offset(offset).limit(limit).all()\n items = [JobTasksListItemResponse.model_validate(o) for o in objs]\n session.close()\n return JobTasksListResponse(items=items, total=total)\n\n@app.get(\"/api/job-tasks/by-code/{task_code}\", response_model=JobTaskResponse, summary=\"Get job task by task code\", description=\"Retrieve a single job task by its unique task_code\", tags=[\"job_tasks\"], operation_id=\"get_job_task_by_code\")\nasync def get_job_task_by_code(task_code: str = Path(..., description=\"Task code to lookup\", example=\"JT-8793\")) -> JobTaskResponse:\n session = SessionLocal()\n obj = session.query(JobTask).filter(JobTask.task_code == task_code).first()\n session.close()\n if obj is None:\n return JobTaskResponse(id=0, task_code=\"\", job_id=0, sequence_order=0, task_name=\"\", work_center_id=0, requiring_skill_level=None, planned_start=None, planned_finish=None, planned_duration_hours=None, actual_start=None, actual_finish=None, created_at=None, updated_at=None)\n return JobTaskResponse.model_validate(obj)\n\n@app.post(\"/api/time-logs\", response_model=TimeLogResponse, summary=\"Create a time log for a job task\", description=\"Record actual time, scrap, and notes for a job task at a work center\", tags=[\"time_logs\"], operation_id=\"create_time_log\")\nasync def create_time_log(request: TimeLogCreateRequest = Body(...)) -> TimeLogResponse:\n session = SessionLocal()\n log_start_value = request.log_start if request.log_start is not None else datetime.utcnow()\n scrap_quantity_value = request.scrap_quantity if request.scrap_quantity is not None else 0\n obj = TimeLog(\n job_task_id=request.job_task_id,\n operator_username=request.operator_username,\n work_center_id=request.work_center_id,\n log_start=log_start_value,\n actual_duration_hours=request.actual_duration_hours,\n scrap_quantity=scrap_quantity_value,\n note=request.note,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return TimeLogResponse.model_validate(obj)\n\n@app.get(\"/api/time-logs\", response_model=TimeLogsListResponse, summary=\"List time logs with filters\", description=\"List time logs by job_task, work center, or date range\", tags=[\"time_logs\"], operation_id=\"list_time_logs\")\nasync def list_time_logs(job_task_id: Optional[int] = Query(None, description=\"Filter by job task ID\", example=1), work_center_id: Optional[int] = Query(None, description=\"Filter by work center ID\", example=2), log_start_from: Optional[datetime] = Query(None, description=\"Filter logs with log_start on or after this datetime\", example=\"2026-01-01T00:00:00\"), log_start_to: Optional[datetime] = Query(None, description=\"Filter logs with log_start on or before this datetime\", example=\"2026-01-31T23:59:59\"), limit: Optional[int] = Query(100, description=\"Max records to return\", example=100), offset: Optional[int] = Query(0, description=\"Offset for pagination\", example=0)) -> TimeLogsListResponse:\n session = SessionLocal()\n query = session.query(TimeLog)\n if job_task_id is not None:\n query = query.filter(TimeLog.job_task_id == job_task_id)\n if work_center_id is not None:\n query = query.filter(TimeLog.work_center_id == work_center_id)\n if log_start_from is not None:\n query = query.filter(TimeLog.log_start >= log_start_from)\n if log_start_to is not None:\n query = query.filter(TimeLog.log_start <= log_start_to)\n total = query.count()\n objs = query.offset(offset).limit(limit).all()\n items = [TimeLogsListItemResponse.model_validate(o) for o in objs]\n session.close()\n return TimeLogsListResponse(items=items, total=total)\n\n@app.post(\"/api/materials\", response_model=MaterialResponse, summary=\"Create a material\", description=\"Create a new material definition with unit of measure\", tags=[\"materials\"], operation_id=\"create_material\")\nasync def create_material(request: MaterialCreateRequest = Body(...)) -> MaterialResponse:\n session = SessionLocal()\n obj = Material(\n name=request.name,\n unit_of_measure=request.unit_of_measure,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return MaterialResponse.model_validate(obj)\n\n@app.get(\"/api/materials\", response_model=MaterialsListResponse, summary=\"List materials\", description=\"Retrieve materials with optional name filter\", tags=[\"materials\"], operation_id=\"list_materials\")\nasync def list_materials(name: Optional[str] = Query(None, description=\"Filter materials containing this name\", example=\"Cold Rolled Steel\")) -> MaterialsListResponse:\n session = SessionLocal()\n query = session.query(Material)\n if name is not None:\n query = query.filter(Material.name.contains(name))\n objs = query.all()\n items = [MaterialResponse.model_validate(o) for o in objs]\n session.close()\n return MaterialsListResponse(items=items)\n\n@app.get(\"/api/materials/by-name/{material_name}\", response_model=MaterialResponse, summary=\"Get material by name\", description=\"Lookup a material by its unique name\", tags=[\"materials\"], operation_id=\"get_material_by_name\")\nasync def get_material_by_name(material_name: str = Path(..., description=\"Exact material name\", example=\"Cold Rolled Steel Sheet 2mm\")) -> MaterialResponse:\n session = SessionLocal()\n obj = session.query(Material).filter(Material.name == material_name).first()\n session.close()\n if obj is None:\n return MaterialResponse(id=0, name=\"\", unit_of_measure=\"\", created_at=None, updated_at=None)\n return MaterialResponse.model_validate(obj)\n\n@app.post(\"/api/inventory-lots\", response_model=InventoryLotResponse, summary=\"Create an inventory lot\", description=\"Create a new inventory lot for a material with quantity balances\", tags=[\"inventory_lots\"], operation_id=\"create_inventory_lot\")\nasync def create_inventory_lot(request: InventoryLotCreateRequest = Body(...)) -> InventoryLotResponse:\n session = SessionLocal()\n reserved = request.reserved_quantity if request.reserved_quantity is not None else 0.0\n obj = InventoryLot(\n lot_number=request.lot_number,\n material_id=request.material_id,\n on_hand_quantity=request.on_hand_quantity,\n reserved_quantity=reserved,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return InventoryLotResponse.model_validate(obj)\n\n@app.get(\"/api/inventory-lots\", response_model=InventoryLotsListResponse, summary=\"List inventory lots\", description=\"List inventory lots filtered by material or lot_number\", tags=[\"inventory_lots\"], operation_id=\"list_inventory_lots\")\nasync def list_inventory_lots(lot_number: Optional[str] = Query(None, description=\"Filter by exact lot number\", example=\"LOT-CRS-2401\"), material_id: Optional[int] = Query(None, description=\"Filter by material ID\", example=1)) -> InventoryLotsListResponse:\n session = SessionLocal()\n query = session.query(InventoryLot)\n if lot_number is not None:\n query = query.filter(InventoryLot.lot_number == lot_number)\n if material_id is not None:\n query = query.filter(InventoryLot.material_id == material_id)\n objs = query.all()\n items = [InventoryLotsListItemResponse.model_validate(o) for o in objs]\n session.close()\n return InventoryLotsListResponse(items=items)\n\n@app.get(\"/api/inventory-lots/by-number/{lot_number}\", response_model=InventoryLotResponse, summary=\"Get inventory lot by lot number\", description=\"Retrieve a single inventory lot by its unique lot_number\", tags=[\"inventory_lots\"], operation_id=\"get_inventory_lot_by_number\")\nasync def get_inventory_lot_by_number(lot_number: str = Path(..., description=\"Exact lot number\", example=\"LOT-CRS-2401\")) -> InventoryLotResponse:\n session = SessionLocal()\n obj = session.query(InventoryLot).filter(InventoryLot.lot_number == lot_number).first()\n session.close()\n if obj is None:\n return InventoryLotResponse(id=0, lot_number=\"\", material_id=0, on_hand_quantity=0.0, reserved_quantity=0.0, created_at=None, updated_at=None)\n return InventoryLotResponse.model_validate(obj)\n\n@app.post(\"/api/inventory-lots/{inventory_lot_id}/adjust\", response_model=InventoryLotAdjustResponse, summary=\"Adjust inventory lot quantities\", description=\"Atomically adjust on_hand_quantity and reserved_quantity for a lot\", tags=[\"inventory_lots\"], operation_id=\"adjust_inventory_lot\")\nasync def adjust_inventory_lot(inventory_lot_id: int = Path(..., description=\"Inventory lot ID\", example=1), request: InventoryLotAdjustRequest = Body(...)) -> InventoryLotAdjustResponse:\n session = SessionLocal()\n obj = session.query(InventoryLot).filter(InventoryLot.id == inventory_lot_id).first()\n if obj is not None:\n if request.on_hand_delta is not None:\n obj.on_hand_quantity = obj.on_hand_quantity + request.on_hand_delta\n if request.reserved_delta is not None:\n obj.reserved_quantity = obj.reserved_quantity + request.reserved_delta\n obj.updated_at = datetime.utcnow()\n session.commit()\n session.refresh(obj)\n session.close()\n if obj is None:\n return InventoryLotAdjustResponse(id=0, lot_number=\"\", on_hand_quantity=0.0, reserved_quantity=0.0, updated_at=None)\n return InventoryLotAdjustResponse.model_validate(obj)\n\n@app.post(\"/api/material-reservations\", response_model=MaterialReservationResponse, summary=\"Create a material reservation\", description=\"Reserve a quantity from an inventory lot for a job\", tags=[\"material_reservations\"], operation_id=\"create_material_reservation\")\nasync def create_material_reservation(request: MaterialReservationCreateRequest = Body(...)) -> MaterialReservationResponse:\n session = SessionLocal()\n obj = MaterialReservation(\n job_id=request.job_id,\n inventory_lot_id=request.inventory_lot_id,\n quantity=request.quantity,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n lot = session.query(InventoryLot).filter(InventoryLot.id == request.inventory_lot_id).first()\n if lot is not None:\n lot.reserved_quantity = lot.reserved_quantity + request.quantity\n lot.on_hand_quantity = lot.on_hand_quantity - request.quantity\n lot.updated_at = datetime.utcnow()\n session.commit()\n session.refresh(obj)\n session.close()\n return MaterialReservationResponse.model_validate(obj)\n\n@app.get(\"/api/material-reservations\", response_model=MaterialReservationsListResponse, summary=\"List material reservations\", description=\"List material reservations filtered by job or inventory lot\", tags=[\"material_reservations\"], operation_id=\"list_material_reservations\")\nasync def list_material_reservations(job_id: Optional[int] = Query(None, description=\"Filter by job ID\", example=1), inventory_lot_id: Optional[int] = Query(None, description=\"Filter by inventory lot ID\", example=1)) -> MaterialReservationsListResponse:\n session = SessionLocal()\n query = session.query(MaterialReservation)\n if job_id is not None:\n query = query.filter(MaterialReservation.job_id == job_id)\n if inventory_lot_id is not None:\n query = query.filter(MaterialReservation.inventory_lot_id == inventory_lot_id)\n objs = query.all()\n items = [MaterialReservationsListItemResponse.model_validate(o) for o in objs]\n session.close()\n return MaterialReservationsListResponse(items=items)\n\n@app.post(\"/api/shipments\", response_model=ShipmentResponse, summary=\"Create a shipment\", description=\"Create a shipment record for a job and customer with initial status\", tags=[\"shipments\"], operation_id=\"create_shipment\")\nasync def create_shipment(request: ShipmentCreateRequest = Body(...)) -> ShipmentResponse:\n session = SessionLocal()\n obj = Shipment(\n shipment_number=request.shipment_number,\n job_id=request.job_id,\n customer_id=request.customer_id,\n delivery_status=request.delivery_status,\n shipped_at=request.shipped_at,\n delivered_at=request.delivered_at,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return ShipmentResponse.model_validate(obj)\n\n@app.get(\"/api/shipments\", response_model=ShipmentsListResponse, summary=\"List shipments\", description=\"List shipments filtered by job, customer, or status\", tags=[\"shipments\"], operation_id=\"list_shipments\")\nasync def list_shipments(shipment_number: Optional[str] = Query(None, description=\"Filter by shipment number\", example=\"SHP-2025-0101\"), job_id: Optional[int] = Query(None, description=\"Filter by job ID\", example=1), customer_id: Optional[int] = Query(None, description=\"Filter by customer ID\", example=1), delivery_status: Optional[str] = Query(None, description=\"Filter by delivery status\", example=\"in_transit\")) -> ShipmentsListResponse:\n session = SessionLocal()\n query = session.query(Shipment)\n if shipment_number is not None:\n query = query.filter(Shipment.shipment_number == shipment_number)\n if job_id is not None:\n query = query.filter(Shipment.job_id == job_id)\n if customer_id is not None:\n query = query.filter(Shipment.customer_id == customer_id)\n if delivery_status is not None:\n query = query.filter(Shipment.delivery_status == delivery_status)\n objs = query.all()\n items = [ShipmentsListItemResponse.model_validate(o) for o in objs]\n session.close()\n return ShipmentsListResponse(items=items)\n\n@app.patch(\"/api/shipments/{shipment_id}\", response_model=ShipmentUpdateResponse, summary=\"Update shipment status or dates\", description=\"Update shipment delivery_status, shipped_at, or delivered_at\", tags=[\"shipments\"], operation_id=\"update_shipment_partial\")\nasync def update_shipment_partial(shipment_id: int = Path(..., description=\"Shipment ID\", example=1), request: ShipmentUpdateRequest = Body(...)) -> ShipmentUpdateResponse:\n session = SessionLocal()\n obj = session.query(Shipment).filter(Shipment.id == shipment_id).first()\n now = datetime.utcnow()\n if obj is not None:\n if request.delivery_status is not None:\n obj.delivery_status = request.delivery_status\n if request.shipped_at is not None:\n obj.shipped_at = request.shipped_at\n if request.delivered_at is not None:\n obj.delivered_at = request.delivered_at\n obj.updated_at = now\n session.commit()\n session.refresh(obj)\n session.close()\n if obj is None:\n return ShipmentUpdateResponse(id=0, shipment_number=\"\", delivery_status=\"\", shipped_at=None, delivered_at=None, updated_at=None)\n return ShipmentUpdateResponse.model_validate(obj)\n\n@app.post(\"/api/shipment-packages\", response_model=ShipmentPackageResponse, summary=\"Create a shipment package\", description=\"Create a single package entry for an existing shipment\", tags=[\"shipment_packages\"], operation_id=\"create_shipment_package\")\nasync def create_shipment_package(request: ShipmentPackageCreateRequest = Body(...)) -> ShipmentPackageResponse:\n session = SessionLocal()\n obj = ShipmentPackage(\n shipment_id=request.shipment_id,\n package_number=request.package_number,\n weight_kg=request.weight_kg,\n tracking_number=request.tracking_number,\n created_at=datetime.utcnow(),\n updated_at=datetime.utcnow(),\n )\n session.add(obj)\n session.commit()\n session.refresh(obj)\n session.close()\n return ShipmentPackageResponse.model_validate(obj)\n\n@app.get(\"/api/shipment-packages\", response_model=ShipmentPackagesListResponse, summary=\"List shipment packages\", description=\"List packages filtered by shipment or tracking_number\", tags=[\"shipment_packages\"], operation_id=\"list_shipment_packages\")\nasync def list_shipment_packages(shipment_id: Optional[int] = Query(None, description=\"Filter by shipment ID\", example=1), tracking_number: Optional[str] = Query(None, description=\"Filter by tracking number\", example=\"CBX123456US\")) -> ShipmentPackagesListResponse:\n session = SessionLocal()\n query = session.query(ShipmentPackage)\n if shipment_id is not None:\n query = query.filter(ShipmentPackage.shipment_id == shipment_id)\n if tracking_number is not None:\n query = query.filter(ShipmentPackage.tracking_number == tracking_number)\n objs = query.all()\n items = [ShipmentPackagesListItemResponse.model_validate(o) for o in objs]\n session.close()\n return ShipmentPackagesListResponse(items=items)\n\n@app.get(\"/api/work-centers/{work_center_id}/capacity-utilization\", response_model=CapacityUtilizationResponse, summary=\"Get work center capacity utilization\", description=\"Aggregate planned vs actual hours for a work center over a date range\", tags=[\"capacity\", \"work_centers\", \"job_tasks\", \"time_logs\"], operation_id=\"get_work_center_capacity_utilization\")\nasync def get_work_center_capacity_utilization(work_center_id: int = Path(..., description=\"Work center ID to analyze\", example=1), planned_from: datetime = Query(..., description=\"Start of planned window (inclusive, ISO8601 datetime)\", example=\"2026-01-01T00:00:00\"), planned_to: datetime = Query(..., description=\"End of planned window (inclusive, ISO8601 datetime)\", example=\"2026-01-31T23:59:59\")) -> CapacityUtilizationResponse:\n session = SessionLocal()\n tasks_query = session.query(JobTask).filter(JobTask.work_center_id == work_center_id, JobTask.planned_start != None, JobTask.planned_finish != None, JobTask.planned_start >= planned_from, JobTask.planned_finish <= planned_to)\n tasks = tasks_query.all()\n total_planned_hours = 0.0\n total_actual_hours = 0.0\n items: List[CapacityTaskItem] = []\n for t in tasks:\n planned = t.planned_duration_hours if t.planned_duration_hours is not None else 0.0\n total_planned_hours = total_planned_hours + planned\n logs = session.query(TimeLog).filter(TimeLog.job_task_id == t.id, TimeLog.work_center_id == work_center_id).all()\n actual_sum = 0.0\n for lg in logs:\n actual_sum = actual_sum + float(lg.actual_duration_hours)\n total_actual_hours = total_actual_hours + actual_sum\n items.append(CapacityTaskItem(job_task_id=t.id, task_code=t.task_code, job_id=t.job_id, task_name=t.task_name, planned_start=t.planned_start, planned_finish=t.planned_finish, planned_duration_hours=t.planned_duration_hours if t.planned_duration_hours is not None else 0.0, actual_hours=actual_sum))\n session.close()\n return CapacityUtilizationResponse(work_center_id=work_center_id, planned_from=planned_from, planned_to=planned_to, total_planned_hours=total_planned_hours, total_actual_hours=total_actual_hours, job_tasks=items)\n\nif __name__ == \"__main__\":\n import uvicorn\n host = os.getenv(\"HOST\", \"127.0.0.1\")\n port = int(os.getenv(\"PORT\", \"8000\"))\n uvicorn.run(app, host=host, port=port)"} diff --git a/components/awm/upstream/manufacturing_execution_system_1-gen_sample.jsonl b/components/awm/upstream/manufacturing_execution_system_1-gen_sample.jsonl new file mode 100644 index 0000000000000000000000000000000000000000..0bac139114dad9bffeca2d59762cb959a8a87efb --- /dev/null +++ b/components/awm/upstream/manufacturing_execution_system_1-gen_sample.jsonl @@ -0,0 +1 @@ +{"scenario": "manufacturing_execution_system_1", "tables_count": 18, "inserts_count": 114, "sample_data": {"tables": [{"table_name": "users", "reasoning": "Users represent system operators or authenticated agents. Creating a primary user with id=1 and additional users allows time_logs and ownership associations for realistic operations. Although user_id is not referenced directly in other tables, having multiple realistic users supports broader testing and aligns with the requirement that user id=1 exists as the main actor.", "insert_statements": ["INSERT INTO users (id, username, email, full_name, created_at, updated_at) VALUES (1, 'planner_anna', 'anna.planner@example.com', 'Anna Planner', '2025-10-01 09:00:00', '2025-12-01 10:00:00');", "INSERT INTO users (id, username, email, full_name, created_at, updated_at) VALUES (2, 'op_jwilliams', 'jwilliams@example.com', 'James Williams', '2025-10-05 08:30:00', '2025-12-15 14:20:00');", "INSERT INTO users (id, username, email, full_name, created_at, updated_at) VALUES (3, 'op_mgarcia', 'mgarcia@example.com', 'Maria Garcia', '2025-11-01 07:45:00', '2025-12-20 16:10:00');", "INSERT INTO users (id, username, email, full_name, created_at, updated_at) VALUES (4, 'scheduler_bot', 'scheduler.bot@example.com', 'Scheduler Bot', '2025-12-01 12:00:00', '2025-12-25 12:00:00');"]}, {"table_name": "customers", "reasoning": "Customers are required for creating quotes, jobs, custom specs, and shipments. We create Acme Robotics LLC for the tasks plus additional customers to support searching, listing, and shipping variations. Data adheres to schema constraints including unique names and non-null billing_address.", "insert_statements": ["INSERT INTO customers (id, name, billing_address, contact_person, email, phone, created_at, updated_at) VALUES (1, 'Acme Robotics LLC', '1200 Industrial Way, Dayton, OH 45402', 'Maria Santos', 'm.santos@acmerobotics.com', '+1-937-555-0142', '2025-12-20 10:00:00', '2025-12-20 10:00:00');", "INSERT INTO customers (id, name, billing_address, contact_person, email, phone, created_at, updated_at) VALUES (2, 'Precision Automation Inc', '4550 Tech Park Dr, Columbus, OH 43215', 'Liam Chen', 'liam.chen@precisionauto.com', '+1-614-555-0101', '2025-11-15 09:30:00', '2025-12-10 11:45:00');", "INSERT INTO customers (id, name, billing_address, contact_person, email, phone, created_at, updated_at) VALUES (3, 'Greenfield Fabrication Co', '890 Foundry Rd, Cincinnati, OH 45202', 'Emily Davis', 'edavis@greenfieldfab.com', '+1-513-555-0199', '2025-10-05 14:15:00', '2025-12-05 16:00:00');", "INSERT INTO customers (id, name, billing_address, contact_person, email, phone, created_at, updated_at) VALUES (4, 'Summit Industrial Solutions', '2300 Summit Blvd, Akron, OH 44308', 'Robert King', 'rking@summitindustrial.com', '+1-330-555-0222', '2025-09-01 11:20:00', '2025-11-01 12:00:00');", "INSERT INTO customers (id, name, billing_address, contact_person, email, phone, created_at, updated_at) VALUES (5, 'Metro Machine Works', '101 Machine Way, Toledo, OH 43604', 'Olivia Perez', 'operez@metromachineworks.com', '+1-419-555-0333', '2025-07-18 13:40:00', '2025-12-01 09:05:00');"]}, {"table_name": "product_templates", "reasoning": "Product templates define configurable products used by custom_specs and standard_task_sequences. We add Steel Workbench Pro per the task and other templates for diversity. Names are unique as required, enabling agents to select templates and derive default task sequences.", "insert_statements": ["INSERT INTO product_templates (id, name, description, created_at, updated_at) VALUES (1, 'Steel Workbench Pro', 'Heavy-duty steel workbench with configurable size, color, and finish.', '2025-12-21 09:00:00', '2025-12-21 09:00:00');", "INSERT INTO product_templates (id, name, description, created_at, updated_at) VALUES (2, 'Aluminum Equipment Rack', 'Modular aluminum equipment rack for industrial control systems.', '2025-10-10 10:00:00', '2025-12-01 10:00:00');", "INSERT INTO product_templates (id, name, description, created_at, updated_at) VALUES (3, 'Stainless Storage Cabinet', 'Corrosion-resistant storage cabinet with adjustable shelves.', '2025-09-15 11:30:00', '2025-11-01 08:20:00');", "INSERT INTO product_templates (id, name, description, created_at, updated_at) VALUES (4, 'Robot Safety Guard Rail', 'Guard rail system for robotic work cells.', '2025-08-05 13:10:00', '2025-10-01 09:45:00');", "INSERT INTO product_templates (id, name, description, created_at, updated_at) VALUES (5, 'Custom Machine Base', 'Fabricated steel base for automated machinery.', '2025-07-22 15:00:00', '2025-09-20 15:30:00');"]}, {"table_name": "product_template_options", "reasoning": "Template options define available discrete configuration choices for each product template, like color or size. We create full option sets for Steel Workbench Pro and varied options for other templates. Unique constraints per template and option_name/option_value are respected.", "insert_statements": ["INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (1, 1, 'color', 'gray', '2025-12-21 09:05:00', '2025-12-21 09:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (2, 1, 'color', 'blue', '2025-12-21 09:05:00', '2025-12-21 09:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (3, 1, 'size', '4ft', '2025-12-21 09:05:00', '2025-12-21 09:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (4, 1, 'size', '6ft', '2025-12-21 09:05:00', '2025-12-21 09:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (5, 1, 'finish_type', 'powder_coat', '2025-12-21 09:05:00', '2025-12-21 09:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (6, 1, 'finish_type', 'galvanized', '2025-12-21 09:05:00', '2025-12-21 09:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (7, 2, 'height', '42U', '2025-10-10 10:05:00', '2025-10-10 10:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (8, 2, 'height', '24U', '2025-10-10 10:05:00', '2025-10-10 10:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (9, 2, 'finish', 'anodized', '2025-10-10 10:05:00', '2025-10-10 10:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (10, 3, 'door_type', 'swing', '2025-09-15 11:35:00', '2025-09-15 11:35:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (11, 3, 'door_type', 'sliding', '2025-09-15 11:35:00', '2025-09-15 11:35:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (12, 4, 'coating', 'safety_yellow', '2025-08-05 13:15:00', '2025-08-05 13:15:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (13, 4, 'coating', 'galvanized', '2025-08-05 13:15:00', '2025-08-05 13:15:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (14, 5, 'mounting_style', 'floor', '2025-07-22 15:05:00', '2025-07-22 15:05:00');", "INSERT INTO product_template_options (id, product_template_id, option_name, option_value, created_at, updated_at) VALUES (15, 5, 'mounting_style', 'frame', '2025-07-22 15:05:00', '2025-07-22 15:05:00');"]}, {"table_name": "standard_task_sequences", "reasoning": "Standard task sequences provide default operations and durations for each product template. We define the requested cutting\u2192welding\u2192grinding\u2192painting sequence for Steel Workbench Pro and additional sequences for other templates. This supports auto-creation of job_tasks from templates.", "insert_statements": ["INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (1, 1, 1, 'cutting', 1.5, '2025-12-21 09:10:00', '2025-12-21 09:10:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (2, 1, 2, 'welding', 2.0, '2025-12-21 09:10:00', '2025-12-21 09:10:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (3, 1, 3, 'grinding', 0.75, '2025-12-21 09:10:00', '2025-12-21 09:10:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (4, 1, 4, 'painting', 1.0, '2025-12-21 09:10:00', '2025-12-21 09:10:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (5, 2, 1, 'cutting', 1.0, '2025-10-10 10:10:00', '2025-10-10 10:10:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (6, 2, 2, 'drilling', 1.2, '2025-10-10 10:10:00', '2025-10-10 10:10:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (7, 2, 3, 'assembly', 1.5, '2025-10-10 10:10:00', '2025-10-10 10:10:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (8, 3, 1, 'cutting', 0.8, '2025-09-15 11:40:00', '2025-09-15 11:40:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (9, 3, 2, 'forming', 1.3, '2025-09-15 11:40:00', '2025-09-15 11:40:00');", "INSERT INTO standard_task_sequences (id, product_template_id, sequence_order, task_name, default_planned_duration_hours, created_at, updated_at) VALUES (10, 3, 3, 'welding', 1.7, '2025-09-15 11:40:00', '2025-09-15 11:40:00');"]}, {"table_name": "custom_specs", "reasoning": "Custom specs bind a customer to a product template with specific configuration. We create the requested spec for Acme Robotics LLC and others for variety. Foreign keys to customers and product_templates ensure integrity, enabling quoting and job creation based on these specs.", "insert_statements": ["INSERT INTO custom_specs (id, customer_id, product_template_id, notes, created_at, updated_at) VALUES (1, 1, 1, 'Blue 6ft workbench with powder coat finish for robotics cell.', '2025-12-22 08:00:00', '2025-12-22 08:00:00');", "INSERT INTO custom_specs (id, customer_id, product_template_id, notes, created_at, updated_at) VALUES (2, 2, 2, '42U anodized rack with reinforced base.', '2025-11-20 09:15:00', '2025-11-20 09:15:00');", "INSERT INTO custom_specs (id, customer_id, product_template_id, notes, created_at, updated_at) VALUES (3, 3, 3, 'Stainless cabinet for chemical storage, sliding doors.', '2025-10-10 10:20:00', '2025-10-10 10:20:00');", "INSERT INTO custom_specs (id, customer_id, product_template_id, notes, created_at, updated_at) VALUES (4, 1, 4, 'Guard rail around dual-robot cell.', '2025-11-05 13:00:00', '2025-11-05 13:00:00');", "INSERT INTO custom_specs (id, customer_id, product_template_id, notes, created_at, updated_at) VALUES (5, 4, 5, 'Machine base with integrated leveling feet.', '2025-09-25 14:30:00', '2025-09-25 14:30:00');"]}, {"table_name": "custom_spec_options", "reasoning": "Custom spec options store chosen values for configurable attributes per custom spec. We add explicit color, size, and finish_type for Acme\u2019s Steel Workbench Pro and other specs. Unique constraints per custom_spec_id and option_name are respected to avoid duplicates.", "insert_statements": ["INSERT INTO custom_spec_options (id, custom_spec_id, option_name, option_value, created_at, updated_at) VALUES (1, 1, 'color', 'blue', '2025-12-22 08:05:00', '2025-12-22 08:05:00');", "INSERT INTO custom_spec_options (id, custom_spec_id, option_name, option_value, created_at, updated_at) VALUES (2, 1, 'size', '6ft', '2025-12-22 08:05:00', '2025-12-22 08:05:00');", "INSERT INTO custom_spec_options (id, custom_spec_id, option_name, option_value, created_at, updated_at) VALUES (3, 1, 'finish_type', 'powder_coat', '2025-12-22 08:05:00', '2025-12-22 08:05:00');", "INSERT INTO custom_spec_options (id, custom_spec_id, option_name, option_value, created_at, updated_at) VALUES (4, 2, 'height', '42U', '2025-11-20 09:20:00', '2025-11-20 09:20:00');", "INSERT INTO custom_spec_options (id, custom_spec_id, option_name, option_value, created_at, updated_at) VALUES (5, 2, 'finish', 'anodized', '2025-11-20 09:20:00', '2025-11-20 09:20:00');", "INSERT INTO custom_spec_options (id, custom_spec_id, option_name, option_value, created_at, updated_at) VALUES (6, 3, 'door_type', 'sliding', '2025-10-10 10:25:00', '2025-10-10 10:25:00');", "INSERT INTO custom_spec_options (id, custom_spec_id, option_name, option_value, created_at, updated_at) VALUES (7, 4, 'coating', 'safety_yellow', '2025-11-05 13:05:00', '2025-11-05 13:05:00');", "INSERT INTO custom_spec_options (id, custom_spec_id, option_name, option_value, created_at, updated_at) VALUES (8, 5, 'mounting_style', 'floor', '2025-09-25 14:35:00', '2025-09-25 14:35:00');"]}, {"table_name": "custom_spec_numeric_params", "reasoning": "Numeric parameters store dimensional and tolerance data for each spec. We define length, width, height, and flatness_tolerance for Acme\u2019s workbench and additional metrics for other specs. Units are provided where appropriate, supporting engineering calculations and quoting.", "insert_statements": ["INSERT INTO custom_spec_numeric_params (id, custom_spec_id, param_name, param_value, unit, created_at, updated_at) VALUES (1, 1, 'length', 1830.0, 'mm', '2025-12-22 08:10:00', '2025-12-22 08:10:00');", "INSERT INTO custom_spec_numeric_params (id, custom_spec_id, param_name, param_value, unit, created_at, updated_at) VALUES (2, 1, 'width', 760.0, 'mm', '2025-12-22 08:10:00', '2025-12-22 08:10:00');", "INSERT INTO custom_spec_numeric_params (id, custom_spec_id, param_name, param_value, unit, created_at, updated_at) VALUES (3, 1, 'height', 900.0, 'mm', '2025-12-22 08:10:00', '2025-12-22 08:10:00');", "INSERT INTO custom_spec_numeric_params (id, custom_spec_id, param_name, param_value, unit, created_at, updated_at) VALUES (4, 1, 'flatness_tolerance', 0.5, 'mm', '2025-12-22 08:10:00', '2025-12-22 08:10:00');", "INSERT INTO custom_spec_numeric_params (id, custom_spec_id, param_name, param_value, unit, created_at, updated_at) VALUES (5, 2, 'depth', 800.0, 'mm', '2025-11-20 09:25:00', '2025-11-20 09:25:00');", "INSERT INTO custom_spec_numeric_params (id, custom_spec_id, param_name, param_value, unit, created_at, updated_at) VALUES (6, 3, 'height', 2000.0, 'mm', '2025-10-10 10:30:00', '2025-10-10 10:30:00');", "INSERT INTO custom_spec_numeric_params (id, custom_spec_id, param_name, param_value, unit, created_at, updated_at) VALUES (7, 4, 'rail_length', 6000.0, 'mm', '2025-11-05 13:10:00', '2025-11-05 13:10:00');", "INSERT INTO custom_spec_numeric_params (id, custom_spec_id, param_name, param_value, unit, created_at, updated_at) VALUES (8, 5, 'base_length', 2500.0, 'mm', '2025-09-25 14:40:00', '2025-09-25 14:40:00');"]}, {"table_name": "quotes", "reasoning": "Quotes link customers to estimated cost and time for custom specs, feeding job creation. We include the requested new quote for Acme\u2019s workbench, plus quote Q-2025-0147 in accepted status and several others with varied statuses, supporting conversion and listing workflows.", "insert_statements": ["INSERT INTO quotes (id, quote_number, customer_id, custom_spec_id, estimated_hours, material_cost, labor_rate, status, internal_note, created_at, updated_at) VALUES (1, 'Q-2025-0100', 2, 2, 18.0, 650.00, 70.00, 'draft', 'Initial rack concept.', '2025-11-21 10:00:00', '2025-11-22 11:00:00');", "INSERT INTO quotes (id, quote_number, customer_id, custom_spec_id, estimated_hours, material_cost, labor_rate, status, internal_note, created_at, updated_at) VALUES (2, 'Q-2025-0125', 3, 3, 22.5, 980.00, 62.00, 'sent', 'Stainless cabinet for chemical storage.', '2025-10-12 09:30:00', '2025-10-13 09:30:00');", "INSERT INTO quotes (id, quote_number, customer_id, custom_spec_id, estimated_hours, material_cost, labor_rate, status, internal_note, created_at, updated_at) VALUES (3, 'Q-2025-0140', 1, 4, 30.0, 1500.00, 65.00, 'rejected', 'Guard rail around dual-robot cell, price too high per customer.', '2025-11-06 10:15:00', '2025-11-20 10:15:00');", "INSERT INTO quotes (id, quote_number, customer_id, custom_spec_id, estimated_hours, material_cost, labor_rate, status, internal_note, created_at, updated_at) VALUES (4, 'Q-2025-0147', 1, 1, 16.0, 520.00, 65.00, 'accepted', 'Steel Workbench Pro for robotics line.', '2025-12-10 08:45:00', '2025-12-18 09:00:00');", "INSERT INTO quotes (id, quote_number, customer_id, custom_spec_id, estimated_hours, material_cost, labor_rate, status, internal_note, created_at, updated_at) VALUES (5, 'Q-2025-0155', 4, 5, 40.0, 2100.00, 68.00, 'accepted', 'Custom machine base with vibration damping.', '2025-09-27 13:00:00', '2025-10-02 13:00:00');", "INSERT INTO quotes (id, quote_number, customer_id, custom_spec_id, estimated_hours, material_cost, labor_rate, status, internal_note, created_at, updated_at) VALUES (6, 'Q-2025-0160', 1, 1, 12.0, 420.00, 65.00, 'sent', 'Rush order requested, target ship in 10 business days.', '2025-12-22 09:00:00', '2025-12-22 09:00:00');"]}, {"table_name": "jobs", "reasoning": "Jobs represent approved work tied to customers, quotes, and specs. We add job from accepted quote Q-2025-0147 with high priority and planned status, plus jobs J-2025-0332 and J-2025-0279 for tasks, inventory, and shipment operations, and additional jobs for capacity analysis.", "insert_statements": ["INSERT INTO jobs (id, job_number, customer_id, quote_id, custom_spec_id, priority, due_date, status, created_at, updated_at) VALUES (1, 'J-2025-0279', 1, 3, 4, 'medium', '2025-12-15', 'completed', '2025-11-25 08:00:00', '2025-12-16 17:00:00');", "INSERT INTO jobs (id, job_number, customer_id, quote_id, custom_spec_id, priority, due_date, status, created_at, updated_at) VALUES (2, 'J-2025-0332', 2, 1, 2, 'high', '2026-01-22', 'in_progress', '2025-12-28 09:00:00', '2025-12-30 10:00:00');", "INSERT INTO jobs (id, job_number, customer_id, quote_id, custom_spec_id, priority, due_date, status, created_at, updated_at) VALUES (3, 'J-2025-0340', 3, 2, 3, 'low', '2026-01-10', 'planned', '2025-12-20 10:30:00', '2025-12-20 10:30:00');", "INSERT INTO jobs (id, job_number, customer_id, quote_id, custom_spec_id, priority, due_date, status, created_at, updated_at) VALUES (4, 'J-2025-0350', 4, 5, 5, 'high', '2026-01-18', 'planned', '2025-12-21 11:00:00', '2025-12-21 11:00:00');", "INSERT INTO jobs (id, job_number, customer_id, quote_id, custom_spec_id, priority, due_date, status, created_at, updated_at) VALUES (5, 'J-2026-0005', 1, 4, 1, 'high', '2026-01-20', 'planned', '2025-12-22 10:00:00', '2025-12-22 10:00:00');", "INSERT INTO jobs (id, job_number, customer_id, quote_id, custom_spec_id, priority, due_date, status, created_at, updated_at) VALUES (6, 'J-2026-0006', 1, 6, 1, 'high', '2026-01-25', 'planned', '2025-12-23 09:15:00', '2025-12-23 09:15:00');"]}, {"table_name": "work_centers", "reasoning": "Work centers identify physical or logical production resources used in job_tasks and time_logs. We add Laser Cutter LC-01, Weld Cell WC-02, Paint Booth PB-01, and other centers for diverse scheduling and capacity utilization analysis, conforming to unique name constraint.", "insert_statements": ["INSERT INTO work_centers (id, name, description, created_at, updated_at) VALUES (1, 'Laser Cutter LC-01', 'Trumpf fiber laser cutting cell.', '2025-07-01 08:00:00', '2025-12-01 08:00:00');", "INSERT INTO work_centers (id, name, description, created_at, updated_at) VALUES (2, 'Weld Cell WC-02', 'Robotic MIG welding cell.', '2025-07-01 08:05:00', '2025-12-01 08:05:00');", "INSERT INTO work_centers (id, name, description, created_at, updated_at) VALUES (3, 'Paint Booth PB-01', 'Powder coating booth.', '2025-07-01 08:10:00', '2025-12-01 08:10:00');", "INSERT INTO work_centers (id, name, description, created_at, updated_at) VALUES (4, 'Grinding Station GS-01', 'Manual grinding station.', '2025-07-01 08:15:00', '2025-12-01 08:15:00');", "INSERT INTO work_centers (id, name, description, created_at, updated_at) VALUES (5, 'Assembly Cell AC-01', 'Bench assembly area.', '2025-07-01 08:20:00', '2025-12-01 08:20:00');"]}, {"table_name": "job_tasks", "reasoning": "Job tasks break jobs into sequenced operations at specific work centers, required for planning, execution, and time logging. We define tasks for job J-2025-0332 per instructions, create task JT-8793 for welding, and add multiple LC-01 tasks in January 2026 for utilization queries.", "insert_statements": ["INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (1, 'JT-8001', 2, 1, 'cutting', 1, 'intermediate', '2026-01-05 08:00:00', '2026-01-05 10:00:00', 2.0, NULL, NULL, '2025-12-28 09:10:00', '2025-12-28 09:10:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (2, 'JT-8002', 2, 2, 'welding', 2, 'advanced', '2026-01-05 11:00:00', '2026-01-05 14:00:00', 3.0, NULL, NULL, '2025-12-28 09:10:00', '2025-12-28 09:10:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (3, 'JT-8003', 2, 3, 'painting', 3, 'intermediate', '2026-01-06 09:00:00', '2026-01-06 11:00:00', 2.0, NULL, NULL, '2025-12-28 09:10:00', '2025-12-28 09:10:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (4, 'JT-8793', 2, 4, 'welding rework', 2, 'advanced', '2026-01-07 08:00:00', '2026-01-07 10:30:00', 2.5, NULL, NULL, '2025-12-29 08:00:00', '2025-12-29 08:00:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (5, 'JT-8100', 1, 1, 'cutting', 1, 'intermediate', '2025-12-05 08:00:00', '2025-12-05 10:00:00', 2.0, '2025-12-05 08:05:00', '2025-12-05 09:50:00', '2025-11-25 08:10:00', '2025-12-05 10:00:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (6, 'JT-8101', 1, 2, 'welding', 2, 'advanced', '2025-12-06 08:00:00', '2025-12-06 11:00:00', 3.0, '2025-12-06 08:10:00', '2025-12-06 11:05:00', '2025-11-25 08:10:00', '2025-12-06 11:10:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (7, 'JT-8200', 3, 1, 'cutting', 1, 'intermediate', '2026-01-03 07:00:00', '2026-01-03 09:00:00', 2.0, NULL, NULL, '2025-12-20 10:40:00', '2025-12-20 10:40:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (8, 'JT-8201', 4, 1, 'cutting', 1, 'intermediate', '2026-01-15 08:00:00', '2026-01-15 12:00:00', 4.0, NULL, NULL, '2025-12-21 11:10:00', '2025-12-21 11:10:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (9, 'JT-8202', 5, 1, 'cutting', 1, 'intermediate', '2026-01-20 13:00:00', '2026-01-20 16:00:00', 3.0, NULL, NULL, '2025-12-22 10:10:00', '2025-12-22 10:10:00');", "INSERT INTO job_tasks (id, task_code, job_id, sequence_order, task_name, work_center_id, requiring_skill_level, planned_start, planned_finish, planned_duration_hours, actual_start, actual_finish, created_at, updated_at) VALUES (10, 'JT-8203', 6, 1, 'cutting', 1, 'intermediate', '2026-02-01 09:00:00', '2026-02-01 11:00:00', 2.0, NULL, NULL, '2025-12-23 09:20:00', '2025-12-23 09:20:00');"]}, {"table_name": "time_logs", "reasoning": "Time logs capture actual work done on job_tasks at specific work centers, with operators, durations, and scrap. We add the requested log for operator op_jwilliams on JT-8793 and additional logs for various LC-01 tasks to enable capacity utilization and performance analysis.", "insert_statements": ["INSERT INTO time_logs (id, job_task_id, operator_username, work_center_id, log_start, actual_duration_hours, scrap_quantity, note, created_at, updated_at) VALUES (1, 4, 'op_jwilliams', 2, '2026-01-07 08:05:00', 2.4, 1, 'Rewelded one bracket due to misalignment found during in-process check', '2026-01-07 10:45:00', '2026-01-07 10:45:00');", "INSERT INTO time_logs (id, job_task_id, operator_username, work_center_id, log_start, actual_duration_hours, scrap_quantity, note, created_at, updated_at) VALUES (2, 1, 'op_mgarcia', 1, '2026-01-05 08:00:00', 1.8, 0, 'Cut parts per program WB-332.', '2026-01-05 10:00:00', '2026-01-05 10:00:00');", "INSERT INTO time_logs (id, job_task_id, operator_username, work_center_id, log_start, actual_duration_hours, scrap_quantity, note, created_at, updated_at) VALUES (3, 7, 'op_mgarcia', 1, '2026-01-03 07:05:00', 2.1, 0, 'Cut cabinet panels.', '2026-01-03 09:15:00', '2026-01-03 09:15:00');", "INSERT INTO time_logs (id, job_task_id, operator_username, work_center_id, log_start, actual_duration_hours, scrap_quantity, note, created_at, updated_at) VALUES (4, 8, 'op_jwilliams', 1, '2026-01-15 08:10:00', 3.9, 2, 'Extra skeleton parts cut due to nesting error.', '2026-01-15 12:10:00', '2026-01-15 12:10:00');", "INSERT INTO time_logs (id, job_task_id, operator_username, work_center_id, log_start, actual_duration_hours, scrap_quantity, note, created_at, updated_at) VALUES (5, 9, 'op_mgarcia', 1, '2026-01-20 13:05:00', 2.7, 0, 'Rush laser job for Acme workbench.', '2026-01-20 16:00:00', '2026-01-20 16:00:00');", "INSERT INTO time_logs (id, job_task_id, operator_username, work_center_id, log_start, actual_duration_hours, scrap_quantity, note, created_at, updated_at) VALUES (6, 5, 'op_mgarcia', 1, '2025-12-05 08:05:00', 1.6, 0, 'Cut parts for completed job.', '2025-12-05 09:55:00', '2025-12-05 09:55:00');"]}, {"table_name": "materials", "reasoning": "Materials represent inventory items that can be reserved for jobs. We create Cold Rolled Steel Sheet 2mm for the reservation task and several other materials to simulate a realistic inventory environment with different units of measure.", "insert_statements": ["INSERT INTO materials (id, name, unit_of_measure, created_at, updated_at) VALUES (1, 'Cold Rolled Steel Sheet 2mm', 'sheet', '2025-06-01 08:00:00', '2025-12-01 08:00:00');", "INSERT INTO materials (id, name, unit_of_measure, created_at, updated_at) VALUES (2, 'Hot Rolled Steel Plate 10mm', 'kg', '2025-06-01 08:05:00', '2025-12-01 08:05:00');", "INSERT INTO materials (id, name, unit_of_measure, created_at, updated_at) VALUES (3, 'Stainless Steel Sheet 1.5mm', 'sheet', '2025-06-01 08:10:00', '2025-12-01 08:10:00');", "INSERT INTO materials (id, name, unit_of_measure, created_at, updated_at) VALUES (4, 'Powder Coat Paint Blue', 'kg', '2025-06-01 08:15:00', '2025-12-01 08:15:00');", "INSERT INTO materials (id, name, unit_of_measure, created_at, updated_at) VALUES (5, 'Shielding Gas Mix 92/8', 'cylinder', '2025-06-01 08:20:00', '2025-12-01 08:20:00');"]}, {"table_name": "inventory_lots", "reasoning": "Inventory lots track on-hand and reserved quantities per material. We define LOT-CRS-2401 with sufficient quantity for the 150-unit reservation and multiple other lots to test different reservation and availability scenarios. Quantities comply with non-null constraints.", "insert_statements": ["INSERT INTO inventory_lots (id, lot_number, material_id, on_hand_quantity, reserved_quantity, created_at, updated_at) VALUES (1, 'LOT-CRS-2401', 1, 500.0, 0.0, '2025-12-15 09:00:00', '2025-12-15 09:00:00');", "INSERT INTO inventory_lots (id, lot_number, material_id, on_hand_quantity, reserved_quantity, created_at, updated_at) VALUES (2, 'LOT-CRS-2399', 1, 120.0, 20.0, '2025-11-10 09:00:00', '2025-12-10 09:00:00');", "INSERT INTO inventory_lots (id, lot_number, material_id, on_hand_quantity, reserved_quantity, created_at, updated_at) VALUES (3, 'LOT-HRS-2310', 2, 2000.0, 300.0, '2025-10-01 08:00:00', '2025-12-01 08:00:00');", "INSERT INTO inventory_lots (id, lot_number, material_id, on_hand_quantity, reserved_quantity, created_at, updated_at) VALUES (4, 'LOT-SSS-2402', 3, 150.0, 0.0, '2025-12-18 10:00:00', '2025-12-18 10:00:00');", "INSERT INTO inventory_lots (id, lot_number, material_id, on_hand_quantity, reserved_quantity, created_at, updated_at) VALUES (5, 'LOT-PCB-2401', 4, 80.0, 10.0, '2025-12-01 11:00:00', '2025-12-10 11:00:00');"]}, {"table_name": "material_reservations", "reasoning": "Material reservations link jobs to specific inventory lots and quantities. We reserve 150 units from LOT-CRS-2401 for job J-2025-0332 as requested, and create additional reservations to test reporting and constraints. Values observe foreign keys to jobs and inventory_lots.", "insert_statements": ["INSERT INTO material_reservations (id, job_id, inventory_lot_id, quantity, created_at, updated_at) VALUES (1, 2, 1, 150.0, '2025-12-29 09:30:00', '2025-12-29 09:30:00');", "INSERT INTO material_reservations (id, job_id, inventory_lot_id, quantity, created_at, updated_at) VALUES (2, 1, 2, 50.0, '2025-11-26 08:30:00', '2025-11-26 08:30:00');", "INSERT INTO material_reservations (id, job_id, inventory_lot_id, quantity, created_at, updated_at) VALUES (3, 3, 4, 40.0, '2025-12-21 09:00:00', '2025-12-21 09:00:00');", "INSERT INTO material_reservations (id, job_id, inventory_lot_id, quantity, created_at, updated_at) VALUES (4, 5, 1, 80.0, '2025-12-23 10:30:00', '2025-12-23 10:30:00');"]}, {"table_name": "shipments", "reasoning": "Shipments capture outbound deliveries of completed jobs to customers. We create a shipment for completed job J-2025-0279 to Acme Robotics LLC with status in_transit so job_status can be updated to shipped by the agent, plus extra shipments to support listing and filtering.", "insert_statements": ["INSERT INTO shipments (id, shipment_number, job_id, customer_id, delivery_status, shipped_at, delivered_at, created_at, updated_at) VALUES (1, 'SHP-2025-0200', 1, 1, 'in_transit', '2025-12-17 09:00:00', NULL, '2025-12-17 09:00:00', '2025-12-17 09:00:00');", "INSERT INTO shipments (id, shipment_number, job_id, customer_id, delivery_status, shipped_at, delivered_at, created_at, updated_at) VALUES (2, 'SHP-2025-0180', 3, 3, 'delivered', '2025-12-10 14:00:00', '2025-12-12 10:00:00', '2025-12-10 14:00:00', '2025-12-12 10:00:00');", "INSERT INTO shipments (id, shipment_number, job_id, customer_id, delivery_status, shipped_at, delivered_at, created_at, updated_at) VALUES (3, 'SHP-2025-0185', 4, 4, 'ready_to_ship', NULL, NULL, '2025-12-15 15:00:00', '2025-12-15 15:00:00');"]}, {"table_name": "shipment_packages", "reasoning": "Shipment packages store per-package weights and tracking numbers. For the Acme job shipment, we create two packages with specified weights and tracking numbers. Additional packages for other shipments provide variety. Unique constraints on tracking_number and (shipment_id, package_number) are maintained.", "insert_statements": ["INSERT INTO shipment_packages (id, shipment_id, package_number, weight_kg, tracking_number, created_at, updated_at) VALUES (1, 1, 1, 45.0, 'CBX123456US', '2025-12-17 09:05:00', '2025-12-17 09:05:00');", "INSERT INTO shipment_packages (id, shipment_id, package_number, weight_kg, tracking_number, created_at, updated_at) VALUES (2, 1, 2, 38.5, 'CBX123457US', '2025-12-17 09:05:00', '2025-12-17 09:05:00');", "INSERT INTO shipment_packages (id, shipment_id, package_number, weight_kg, tracking_number, created_at, updated_at) VALUES (3, 2, 1, 55.0, 'CBX123458US', '2025-12-10 14:05:00', '2025-12-10 14:05:00');", "INSERT INTO shipment_packages (id, shipment_id, package_number, weight_kg, tracking_number, created_at, updated_at) VALUES (4, 3, 1, 30.0, 'CBX123459US', '2025-12-15 15:05:00', '2025-12-15 15:05:00');"]}]}} diff --git a/components/math/ADAPTATIONS.txt b/components/math/ADAPTATIONS.txt new file mode 100644 index 0000000000000000000000000000000000000000..a042f80edc30c928064fb76d3f8f8d3c7f6c7232 --- /dev/null +++ b/components/math/ADAPTATIONS.txt @@ -0,0 +1,2 @@ +Interface: exec and finish. Working directory: /workdir. Input: instance.json. Output: answer.json. +Reset restores the original task input; finish invokes the original checker. Registered tasks and alternatives are listed in the root REGISTRATION.json. diff --git a/components/math/FILE_ALLOWLIST.json b/components/math/FILE_ALLOWLIST.json new file mode 100644 index 0000000000000000000000000000000000000000..d6f78c7ad8f8051a639723b520f88be230666f49 --- /dev/null +++ b/components/math/FILE_ALLOWLIST.json @@ -0,0 +1,596 @@ +{ + "component": "math", + "files": [ + { + "path": "ADAPTATIONS.txt", + "sha256": "15c3c4f106c052941f16970b3981ae9c9a7bbe4c913430bcac10edbc14e73151", + "bytes": 253, + "role": "adapter_documentation", + "parent_sha256": "f737285b66a06c5927f29c4abc1a88eb0e3e105013d655ef4ea142b2c185e981" + }, + { + "path": "NOTICE.txt", + "sha256": "73b544ecebc5d10e34e72f187bfdccf8ad66c9df4c37b03eeca7323a12401248", + "bytes": 703, + "role": "license_and_attribution" + }, + { + "path": "SDK_DEPENDENCIES.json", + "sha256": "a037cf3ce617aa3e0216bf5e0677d229679bfffdd30dba9057b58bb413c39732", + "bytes": 25904, + "role": "dependency_manifest" + }, + { + "path": "SOURCE.json", + "sha256": "a91ceb6c6b39e532fbef753034f1979d2364672d9bb6a45395c946dd8208befd", + "bytes": 1081, + "role": "metadata" + }, + { + "path": "TASKS.json", + "sha256": "fe67677e50ff773b044feb9122e26a4dbb1dc647a5c88ba9db0adf952167104a", + "bytes": 3905, + "role": "metadata", + "parent_sha256": "55358840bcbda8eb1efed14464392594a96390c781ff914756eea0acfbe36137" + }, + { + "path": "config.json", + "sha256": "190f2c6c257c0cbc4cb6bfa2efe8e5fdca221b1c18b39aa70331781f2be79afa", + "bytes": 5968, + "role": "runtime_registry" + }, + { + "path": "licenses/MathConstraint-LICENSE", + "sha256": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "bytes": 18656, + "role": "license_and_attribution", + "source": { + "repo": "vireshpati/Math-Constraint", + "source_url": "https://github.com/vireshpati/Math-Constraint/blob/main/LICENSE", + "git_blob_sha": "4ea99c213c5c0c005ae4e80df8e52169d06896ec", + "license": { + "key": "cc-by-4.0", + "name": "Creative Commons Attribution 4.0 International", + "spdx_id": "CC-BY-4.0", + "url": "https://api.github.com/licenses/cc-by-4.0", + "node_id": "MDc6TGljZW5zZTI1" + }, + "sha256": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "retrieval_scope": "license text only; not a claim about the original generator revision" + } + }, + { + "path": "licenses/RLVE-LICENSE", + "sha256": "10afac3400d1abccc7ec2322e07563a3e495c13ac39d3865564aa2e2423b398e", + "bytes": 1069, + "role": "license_and_attribution", + "source": { + "repo": "Zhiyuan-Zeng/RLVE", + "source_url": "https://github.com/Zhiyuan-Zeng/RLVE/blob/main/LICENSE", + "git_blob_sha": "5677eb6d02ee26cd27b6dce1cbfaa9676b1a2382", + "license": { + "key": "mit", + "name": "MIT License", + "spdx_id": "MIT", + "url": "https://api.github.com/licenses/mit", + "node_id": "MDc6TGljZW5zZTEz" + }, + "sha256": "10afac3400d1abccc7ec2322e07563a3e495c13ac39d3865564aa2e2423b398e", + "retrieval_scope": "license text only; not a claim about the original generator revision" + } + }, + { + "path": "licenses/UPSTREAM_COLLECTION_LICENSES.md", + "sha256": "200b2ce93f2a5b9671165f9aea3cc4d89db995352c1e1e3db6d418262b058516", + "bytes": 462, + "role": "license_and_attribution" + }, + { + "path": "runtime/common/__init__.py", + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "execution_adapter", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "path": "runtime/common/contracts.py", + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "role": "execution_adapter", + "parent_sha256": "2df4ab6636056806069216ee52576ac979255cb895b49b0c72c3686f3d9c5ae2" + }, + { + "path": "runtime/common/http_routes.py", + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "role": "execution_adapter", + "parent_sha256": "2876ad9a5d35eeb0e1ebb40346e5d230d8326ac8280ec260459798cf7a4eee18" + }, + { + "path": "runtime/common/models.py", + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "role": "execution_adapter", + "parent_sha256": "9fa259555127367477c21ca27f0ee6ac4a49e5f5744ecd91bf23a3ea1d0ab07d" + }, + { + "path": "runtime/native_shell/__init__.py", + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "role": "execution_adapter", + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "path": "runtime/native_shell/actor_launcher.py", + "sha256": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "bytes": 5012, + "role": "execution_adapter", + "parent_sha256": "254abfeedc1d69cf228f923b5b43452d820c8ba5889fd8595e322e19efc7a896" + }, + { + "path": "runtime/native_shell/backend.py", + "sha256": "6cc693d7a384d6d76b8c99bfb6af2e5188c03aac81671cfec3414733fb98089a", + "bytes": 13484, + "role": "execution_adapter", + "parent_sha256": "2fb83a818f65fadd7562bdd14b92254b41d740f4d212f4dd8aba58c23c48db52" + }, + { + "path": "runtime/native_shell/environment.py", + "sha256": "cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53", + "bytes": 1616, + "role": "execution_adapter", + "parent_sha256": "1c1ded0928c4757a87696f818cf9004a29e55f992495ffa0aacde9112dad7fea" + }, + { + "path": "runtime/native_shell/guard.py", + "sha256": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "bytes": 13254, + "role": "execution_adapter", + "parent_sha256": "8b24c249acc86d5d4fad2b495072c7927b353471b18bd4fd881ae7deef206d02" + }, + { + "path": "runtime/native_shell/launch_service.py", + "sha256": "db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b", + "bytes": 2383, + "role": "execution_adapter", + "parent_sha256": "c698c3b27e551f9986bf9e5aac9d337bf2e662058f5ba05d0882aaf2008ff98a" + }, + { + "path": "runtime/native_shell/server.py", + "sha256": "3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e", + "bytes": 640, + "role": "execution_adapter", + "parent_sha256": "e993b18fd0e871ee97700a725d2d57722428209c34e6caf0fd86479ca6b7a374" + }, + { + "path": "runtime/native_shell/verifier_launcher.py", + "sha256": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "bytes": 962, + "role": "execution_adapter", + "parent_sha256": "aa03260a2bcc91c9e23fd32dda0d75d1979ee7f4f64e87ea635f6bcd6048b075" + }, + { + "path": "runtime/native_shell/wire_client.py", + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "role": "execution_adapter", + "parent_sha256": "8b05bffad6831c34e38e26926aa121845dc7e4150a6620ef1df690191a84e0d1" + }, + { + "path": "upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-costas-array-l3-s0/environment/instance.json", + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "bytes": 98, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/environment/instance.json", + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-costas-array-l3-s0/instruction.md", + "sha256": "88e4a26e71d8483fbc89627210e4ed07f6dfef0fb16ce3e6d31e84a04bd050f9", + "bytes": 723, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/instruction.md", + "sha256": "88e4a26e71d8483fbc89627210e4ed07f6dfef0fb16ce3e6d31e84a04bd050f9", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-costas-array-l3-s0/task.toml", + "sha256": "b62ba527da418f1b84d165707ea56ea805953289b0993cc3176e988ef59c3d32", + "bytes": 694, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/task.toml", + "sha256": "b62ba527da418f1b84d165707ea56ea805953289b0993cc3176e988ef59c3d32", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-costas-array-l3-s0/tests/check.py", + "sha256": "3c0290e35201f077926099989cd0e82c10bf091cb33c572cacc02bca075debdb", + "bytes": 809, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/tests/check.py", + "sha256": "3c0290e35201f077926099989cd0e82c10bf091cb33c572cacc02bca075debdb", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-costas-array-l3-s0/tests/instance.json", + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "bytes": 98, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/tests/instance.json", + "sha256": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-costas-array-l3-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-costas-array-l3-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-ramsey-l4-s0/environment/instance.json", + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "bytes": 84, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/environment/instance.json", + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-ramsey-l4-s0/instruction.md", + "sha256": "dacf1d28faa912ac766cb9a8859b9a2d08940d2c52a9f8460c85ce0595a16c81", + "bytes": 599, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/instruction.md", + "sha256": "dacf1d28faa912ac766cb9a8859b9a2d08940d2c52a9f8460c85ce0595a16c81", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-ramsey-l4-s0/task.toml", + "sha256": "d2ea623dfdf1ab4864399d4231f17b7c6800cc73e1ad9d1c583816d149dca377", + "bytes": 672, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/task.toml", + "sha256": "d2ea623dfdf1ab4864399d4231f17b7c6800cc73e1ad9d1c583816d149dca377", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-ramsey-l4-s0/tests/check.py", + "sha256": "923f9e1258610a3cc3d5c2984b1855ed7341af13bc7592ff42aed0e0f91fc74d", + "bytes": 1220, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/tests/check.py", + "sha256": "923f9e1258610a3cc3d5c2984b1855ed7341af13bc7592ff42aed0e0f91fc74d", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-ramsey-l4-s0/tests/instance.json", + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "bytes": 84, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/tests/instance.json", + "sha256": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-ramsey-l4-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-ramsey-l4-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-social-golfers-l4-s0/environment/instance.json", + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "bytes": 100, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/environment/instance.json", + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-social-golfers-l4-s0/instruction.md", + "sha256": "a638ef887b79167571086549b8d9438447d07b800772aac868b3e9a2e6899cd2", + "bytes": 560, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/instruction.md", + "sha256": "a638ef887b79167571086549b8d9438447d07b800772aac868b3e9a2e6899cd2", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-social-golfers-l4-s0/task.toml", + "sha256": "fb08db6bba18360321c1ac959d0af5f655435579d5cb88864d924897254c7546", + "bytes": 705, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/task.toml", + "sha256": "fb08db6bba18360321c1ac959d0af5f655435579d5cb88864d924897254c7546", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-social-golfers-l4-s0/tests/check.py", + "sha256": "9514518058e308fc2ae0ec0b8ce8a50993d5dfa09708ac9c3609e1edbbae126a", + "bytes": 1132, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/tests/check.py", + "sha256": "9514518058e308fc2ae0ec0b8ce8a50993d5dfa09708ac9c3609e1edbbae126a", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-social-golfers-l4-s0/tests/instance.json", + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "bytes": 100, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/tests/instance.json", + "sha256": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-social-golfers-l4-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "byte_identical": true + } + }, + { + "path": "upstream/construct-mc-social-golfers-l4-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "byte_identical": true + } + }, + { + "path": "upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "bytes": 389, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile", + "sha256": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "byte_identical": true + } + }, + { + "path": "upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json", + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "bytes": 99, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/environment/instance.json", + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "byte_identical": true + } + }, + { + "path": "upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md", + "sha256": "db8d002ee820a699d6b7b819cb88ed583990529649255af446c22c98889ad370", + "bytes": 579, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/instruction.md", + "sha256": "db8d002ee820a699d6b7b819cb88ed583990529649255af446c22c98889ad370", + "byte_identical": true + } + }, + { + "path": "upstream/construct-rlve-round-robin-scores-l3-s0/task.toml", + "sha256": "d42f4225ae8850e6abe3e1b612b0da6f2e896322a3e9e00e6addb988a8f8332a", + "bytes": 741, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/task.toml", + "sha256": "d42f4225ae8850e6abe3e1b612b0da6f2e896322a3e9e00e6addb988a8f8332a", + "byte_identical": true + } + }, + { + "path": "upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py", + "sha256": "930cd10836482427303a497cfa896934ccdc24116879eaa4c5d32a572d01353c", + "bytes": 820, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/tests/check.py", + "sha256": "930cd10836482427303a497cfa896934ccdc24116879eaa4c5d32a572d01353c", + "byte_identical": true + } + }, + { + "path": "upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json", + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "bytes": 99, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/tests/instance.json", + "sha256": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "byte_identical": true + } + }, + { + "path": "upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "bytes": 4652, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/tests/run.py", + "sha256": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "byte_identical": true + } + }, + { + "path": "upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "bytes": 391, + "role": "original_task_source", + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0/tests/test.sh", + "sha256": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "byte_identical": true + } + } + ] +} diff --git a/components/math/MANIFEST.json b/components/math/MANIFEST.json new file mode 100644 index 0000000000000000000000000000000000000000..4f12a3f35c716bcf2332629c2cffc91807a44b0b --- /dev/null +++ b/components/math/MANIFEST.json @@ -0,0 +1,57 @@ +{ + "SOURCE.json": "a91ceb6c6b39e532fbef753034f1979d2364672d9bb6a45395c946dd8208befd", + "config.json": "190f2c6c257c0cbc4cb6bfa2efe8e5fdca221b1c18b39aa70331781f2be79afa", + "NOTICE.txt": "73b544ecebc5d10e34e72f187bfdccf8ad66c9df4c37b03eeca7323a12401248", + "SDK_DEPENDENCIES.json": "a037cf3ce617aa3e0216bf5e0677d229679bfffdd30dba9057b58bb413c39732", + "TASKS.json": "fe67677e50ff773b044feb9122e26a4dbb1dc647a5c88ba9db0adf952167104a", + "ADAPTATIONS.txt": "15c3c4f106c052941f16970b3981ae9c9a7bbe4c913430bcac10edbc14e73151", + "FILE_ALLOWLIST.json": "3391c140ba8b7dd1378d16065c7488379b3114ce3f6009461bf31c416138e2f5", + "licenses/RLVE-LICENSE": "10afac3400d1abccc7ec2322e07563a3e495c13ac39d3865564aa2e2423b398e", + "licenses/MathConstraint-LICENSE": "9e5f1b3c610b9c2da5c313bf81d577a7d1acec686bdb0384edefa6df0f90cd94", + "licenses/UPSTREAM_COLLECTION_LICENSES.md": "200b2ce93f2a5b9671165f9aea3cc4d89db995352c1e1e3db6d418262b058516", + "upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md": "db8d002ee820a699d6b7b819cb88ed583990529649255af446c22c98889ad370", + "upstream/construct-rlve-round-robin-scores-l3-s0/task.toml": "d42f4225ae8850e6abe3e1b612b0da6f2e896322a3e9e00e6addb988a8f8332a", + "upstream/construct-mc-costas-array-l3-s0/instruction.md": "88e4a26e71d8483fbc89627210e4ed07f6dfef0fb16ce3e6d31e84a04bd050f9", + "upstream/construct-mc-costas-array-l3-s0/task.toml": "b62ba527da418f1b84d165707ea56ea805953289b0993cc3176e988ef59c3d32", + "upstream/construct-mc-social-golfers-l4-s0/instruction.md": "a638ef887b79167571086549b8d9438447d07b800772aac868b3e9a2e6899cd2", + "upstream/construct-mc-social-golfers-l4-s0/task.toml": "fb08db6bba18360321c1ac959d0af5f655435579d5cb88864d924897254c7546", + "upstream/construct-mc-ramsey-l4-s0/instruction.md": "dacf1d28faa912ac766cb9a8859b9a2d08940d2c52a9f8460c85ce0595a16c81", + "upstream/construct-mc-ramsey-l4-s0/task.toml": "d2ea623dfdf1ab4864399d4231f17b7c6800cc73e1ad9d1c583816d149dca377", + "upstream/construct-mc-ramsey-l4-s0/tests/run.py": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "upstream/construct-mc-ramsey-l4-s0/tests/check.py": "923f9e1258610a3cc3d5c2984b1855ed7341af13bc7592ff42aed0e0f91fc74d", + "upstream/construct-mc-ramsey-l4-s0/tests/instance.json": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "upstream/construct-mc-ramsey-l4-s0/tests/test.sh": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "upstream/construct-mc-ramsey-l4-s0/environment/instance.json": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92", + "upstream/construct-mc-social-golfers-l4-s0/tests/run.py": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "upstream/construct-mc-social-golfers-l4-s0/tests/check.py": "9514518058e308fc2ae0ec0b8ce8a50993d5dfa09708ac9c3609e1edbbae126a", + "upstream/construct-mc-social-golfers-l4-s0/tests/instance.json": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "upstream/construct-mc-social-golfers-l4-s0/tests/test.sh": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "upstream/construct-mc-social-golfers-l4-s0/environment/instance.json": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73", + "upstream/construct-mc-costas-array-l3-s0/tests/run.py": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "upstream/construct-mc-costas-array-l3-s0/tests/check.py": "3c0290e35201f077926099989cd0e82c10bf091cb33c572cacc02bca075debdb", + "upstream/construct-mc-costas-array-l3-s0/tests/instance.json": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "upstream/construct-mc-costas-array-l3-s0/tests/test.sh": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "upstream/construct-mc-costas-array-l3-s0/environment/instance.json": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5", + "upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py": "930cd10836482427303a497cfa896934ccdc24116879eaa4c5d32a572d01353c", + "upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile": "56b0b880643a6915bad1e66b9d127578e69853f00a5e198ddfdf3d72a490fa1c", + "upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a", + "runtime/native_shell/server.py": "3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e", + "runtime/native_shell/backend.py": "6cc693d7a384d6d76b8c99bfb6af2e5188c03aac81671cfec3414733fb98089a", + "runtime/native_shell/launch_service.py": "db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b", + "runtime/native_shell/wire_client.py": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "runtime/native_shell/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "runtime/native_shell/verifier_launcher.py": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "runtime/native_shell/environment.py": "cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53", + "runtime/native_shell/guard.py": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "runtime/native_shell/actor_launcher.py": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "runtime/common/models.py": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "runtime/common/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "runtime/common/http_routes.py": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "runtime/common/contracts.py": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1" +} diff --git a/components/math/NOTICE.txt b/components/math/NOTICE.txt new file mode 100644 index 0000000000000000000000000000000000000000..ba9faa16e64b0cb44c41d4326fc5da53aa4c30b8 --- /dev/null +++ b/components/math/NOTICE.txt @@ -0,0 +1,5 @@ +Original mathematical construction tasks. +Published by amphora; see SOURCE.json for the immutable dataset revision. +Costas array, Ramsey edge colouring and social golfers originate in MathConstraint by Viresh Pati and contributors, https://github.com/vireshpati/Math-Constraint, CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/legalcode). +Tournament score realisation originates in RLVE-Gym by Zhiyuan Zeng and contributors, https://github.com/Zhiyuan-Zeng/RLVE, MIT. Original copyright notices are preserved in licenses/. +The Harbor publisher adapted upstream checkers; we preserve that published version byte for byte. Our adaptation is limited to the OpenEnv interface and isolated execution. diff --git a/components/math/SDK_DEPENDENCIES.json b/components/math/SDK_DEPENDENCIES.json new file mode 100644 index 0000000000000000000000000000000000000000..b57732bb502e33b63bea9ff612f4123077d80330 --- /dev/null +++ b/components/math/SDK_DEPENDENCIES.json @@ -0,0 +1,667 @@ +{ + "openenv_revision": "86a180ede21e044f7929b9a7783ad83aa67d83a3", + "openenv_wheel_sha256": "93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a", + "python": "3.11", + "wheels": { + "pycparser": { + "version": "3.11", + "sha256": "51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", + "filename": "pycparser-3.11-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "keyring": { + "version": "25.7.0", + "sha256": "be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", + "filename": "keyring-25.7.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "huggingface-hub": { + "version": "2.2.0", + "sha256": "1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3", + "filename": "huggingface_hub-2.2.0-py3-none-any.whl", + "requires_python": ">=3.10.0" + }, + "safehttpx": { + "version": "0.1.7", + "sha256": "c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde", + "filename": "safehttpx-0.1.7-py3-none-any.whl", + "requires_python": ">3.9" + }, + "truststore": { + "version": "0.10.4", + "sha256": "adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981", + "filename": "truststore-0.10.4-py3-none-any.whl", + "requires_python": ">= 3.10" + }, + "urllib3": { + "version": "2.8.0", + "sha256": "0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", + "filename": "urllib3-2.8.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "python-dotenv": { + "version": "1.2.4", + "sha256": "42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", + "filename": "python_dotenv-1.2.4-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "more-itertools": { + "version": "11.1.0", + "sha256": "4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192", + "filename": "more_itertools-11.1.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "idna": { + "version": "3.20", + "sha256": "ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", + "filename": "idna-3.20-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "cryptography": { + "version": "50.0.2", + "sha256": "4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856", + "filename": "cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", + "requires_python": ">=3.9, !=3.9.0, !=3.9.1" + }, + "httpx-sse": { + "version": "0.4.3", + "sha256": "0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc", + "filename": "httpx_sse-0.4.3-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "packaging": { + "version": "26.3", + "sha256": "d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", + "filename": "packaging-26.3-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "jaraco.classes": { + "version": "3.4.0", + "sha256": "f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790", + "filename": "jaraco.classes-3.4.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "tomli-w": { + "version": "1.2.0", + "sha256": "188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", + "filename": "tomli_w-1.2.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "uncalled-for": { + "version": "0.4.1", + "sha256": "b611b38879d9fe5088297e7bb28f2ddd12d2d73dad933d93da107fb63eb4058e", + "filename": "uncalled_for-0.4.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "beartype": { + "version": "0.23.0", + "sha256": "a88b85be516c064d4de2b42045a258a43be97bce5cbc18b777f332027c0979f7", + "filename": "beartype-0.23.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "openai": { + "version": "3.28.0", + "sha256": "1ea40a084ffe2f9f16fd3bea6e870f757853b536b18d8e737c518ef849a2920c", + "filename": "openai-3.28.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "pydantic-settings": { + "version": "2.15.0", + "sha256": "0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42", + "filename": "pydantic_settings-2.15.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "openapi-pydantic": { + "version": "0.6.0", + "sha256": "8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3", + "filename": "openapi_pydantic-0.6.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "httpcore": { + "version": "1.0.9", + "sha256": "2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", + "filename": "httpcore-1.0.9-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "exceptiongroup": { + "version": "1.3.1", + "sha256": "a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", + "filename": "exceptiongroup-1.3.1-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "rich-rst": { + "version": "2.2.0", + "sha256": "1ea1c43813dc4a8d86475fce27ffb74e0ada3d4656c9f8130ba2a59868055fe9", + "filename": "rich_rst-2.2.0-py3-none-any.whl", + "requires_python": null + }, + "starlette": { + "version": "1.7.0", + "sha256": "67f8e99895493dd2911a03f11314af6ceebeae4e704bb9f43dfc6a9db151c93e", + "filename": "starlette-1.7.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "secretstorage": { + "version": "3.5.0", + "sha256": "0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", + "filename": "secretstorage-3.5.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "annotated-doc": { + "version": "0.0.5", + "sha256": "117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101", + "filename": "annotated_doc-0.0.5-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "rpds-py": { + "version": "2026.9.1", + "sha256": "136a1c3fe4402b7008bc81cb62ee538481795b61a7e83df88dff3b3f02b726ff", + "filename": "rpds_py-2026.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.11" + }, + "markdown-it-py": { + "version": "4.2.0", + "sha256": "9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a", + "filename": "markdown_it_py-4.2.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "mdurl": { + "version": "0.1.2", + "sha256": "84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", + "filename": "mdurl-0.1.2-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "pandas": { + "version": "3.0.6", + "sha256": "47121f9571503f724c9b93e297ab6254ac99c77adf5e9ed085ea419fd585c258", + "filename": "pandas-3.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.11" + }, + "jsonschema-specifications": { + "version": "2025.9.1", + "sha256": "98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", + "filename": "jsonschema_specifications-2025.9.1-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "griffelib": { + "version": "2.3.2", + "sha256": "8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274", + "filename": "griffelib-2.3.2-py3-none-any.whl", + "requires_python": ">=3.11" + }, + "tomlkit": { + "version": "0.14.0", + "sha256": "592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680", + "filename": "tomlkit-0.14.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "gradio": { + "version": "6.30.0", + "sha256": "aae3aa81ec9f44e55781b498ad2ba12b117aa512e8d2bb0ef3e52af7f2ee6305", + "filename": "gradio-6.30.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "zipp": { + "version": "4.1.1", + "sha256": "8979f52d874162f485ff2981e3891f3a3317b7a3dd43ff1e1775b9304f307a9c", + "filename": "zipp-4.1.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "docstring-parser": { + "version": "0.18.0", + "sha256": "b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b", + "filename": "docstring_parser-0.18.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "semantic-version": { + "version": "2.10.0", + "sha256": "de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177", + "filename": "semantic_version-2.10.0-py2.py3-none-any.whl", + "requires_python": ">=2.7" + }, + "jsonschema-path": { + "version": "0.5.0", + "sha256": "2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2", + "filename": "jsonschema_path-0.5.0-py3-none-any.whl", + "requires_python": ">=3.10,<4.0.0" + }, + "brotli": { + "version": "1.2.0", + "sha256": "40d918bce2b427a0c4ba189df7a006ac0c7277c180aee4617d99e9ccaaf59e6a", + "filename": "brotli-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "requires_python": null + }, + "markupsafe": { + "version": "3.0.4", + "sha256": "6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808", + "filename": "markupsafe-3.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.9" + }, + "orjson": { + "version": "3.13.0", + "sha256": "89bcf2d4bc6c9a7e1763c8cf534f38712e66b76a0fefda7fb7785462f0d635e4", + "filename": "orjson-3.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.10" + }, + "importlib-metadata": { + "version": "9.0.1", + "sha256": "bba5600596a7e21f3eef53281cf28d6a5195634d2f2b78ff9501a3272c6eaab0", + "filename": "importlib_metadata-9.0.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "py-key-value-aio": { + "version": "0.4.6", + "sha256": "820b30c7959fc738ea3d00160cdb10cd258f51e38737b2add530defeea1ded77", + "filename": "py_key_value_aio-0.4.6-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "joserfc": { + "version": "1.7.5", + "sha256": "add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159", + "filename": "joserfc-1.7.5-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "dnspython": { + "version": "2.9.0", + "sha256": "9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9", + "filename": "dnspython-2.9.0-py3-none-any.whl", + "requires_python": ">=3.11" + }, + "tomli": { + "version": "2.5.0", + "sha256": "d7e369fd63331746182360977b1892bfc215476a30d61612d732425311639f56", + "filename": "tomli-2.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.8" + }, + "pydub": { + "version": "0.25.1", + "sha256": "65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6", + "filename": "pydub-0.25.1-py2.py3-none-any.whl", + "requires_python": null + }, + "pillow": { + "version": "12.3.0", + "sha256": "23d27a3e0307ec2244cc51e7287b919aa68d097504ebe19df4e76a98a3eea5bd", + "filename": "pillow-12.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.10" + }, + "pathable": { + "version": "0.6.0", + "sha256": "82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566", + "filename": "pathable-0.6.0-py3-none-any.whl", + "requires_python": ">=3.10,<4.0" + }, + "pydantic": { + "version": "2.14.0", + "sha256": "15fab1bea6f1dc5003b54fc2ecab230c1fd1dbade2acd4addc52d81e32416d4b", + "filename": "pydantic-2.14.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "six": { + "version": "1.17.0", + "sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", + "filename": "six-1.17.0-py2.py3-none-any.whl", + "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + }, + "cffi": { + "version": "2.1.1", + "sha256": "34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632", + "filename": "cffi-2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "requires_python": ">=3.10" + }, + "attrs": { + "version": "26.1.0", + "sha256": "c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", + "filename": "attrs-26.1.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "jeepney": { + "version": "0.9.0", + "sha256": "97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683", + "filename": "jeepney-0.9.0-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "charset-normalizer": { + "version": "3.5.2", + "sha256": "211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f", + "filename": "charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.7" + }, + "pytz": { + "version": "2026.5", + "sha256": "e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", + "filename": "pytz-2026.5-py2.py3-none-any.whl", + "requires_python": null + }, + "python-dateutil": { + "version": "2.9.0.post0", + "sha256": "a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", + "filename": "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", + "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" + }, + "fastmcp": { + "version": "3.4.8", + "sha256": "ab4e8abe6c9d50b110f367e8c29f82b90c1478ac9180be61af10354f84f0ad8c", + "filename": "fastmcp-3.4.8-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "pygments": { + "version": "2.21.0", + "sha256": "2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", + "filename": "pygments-2.21.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "httpcore2": { + "version": "2.13.1", + "sha256": "e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a", + "filename": "httpcore2-2.13.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "openenv": { + "version": "0.6.1.dev0", + "sha256": "93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a", + "filename": "openenv-0.6.1.dev0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "typer": { + "version": "0.27.3", + "sha256": "e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff", + "filename": "typer-0.27.3-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "jsonref": { + "version": "1.1.0", + "sha256": "590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9", + "filename": "jsonref-1.1.0-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "referencing": { + "version": "0.37.0", + "sha256": "381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", + "filename": "referencing-0.37.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "rich": { + "version": "15.0.0", + "sha256": "33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", + "filename": "rich-15.0.0-py3-none-any.whl", + "requires_python": ">=3.9.0" + }, + "annotated-types": { + "version": "0.8.0", + "sha256": "f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", + "filename": "annotated_types-0.8.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "jsonschema": { + "version": "4.26.0", + "sha256": "d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", + "filename": "jsonschema-4.26.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "numpy": { + "version": "2.4.6", + "sha256": "89cd468399cfd2504718f0ba50e410dca55a170b61a02ad92bb18c8a65186e93", + "filename": "numpy-2.4.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.11" + }, + "shellingham": { + "version": "1.5.4", + "sha256": "7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", + "filename": "shellingham-1.5.4-py2.py3-none-any.whl", + "requires_python": ">=3.7" + }, + "jinja2": { + "version": "3.1.6", + "sha256": "85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", + "filename": "jinja2-3.1.6-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "caio": { + "version": "0.12.9", + "sha256": "bf12d4f014b2a33e642ed7905b5787656ede2fc24be21f7c086826ff0d32cec3", + "filename": "caio-0.12.9-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "watchfiles": { + "version": "1.3.0", + "sha256": "b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1", + "filename": "watchfiles-1.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.10" + }, + "fsspec": { + "version": "2026.9.0", + "sha256": "8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", + "filename": "fsspec-2026.9.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "aiofile": { + "version": "3.12.3", + "sha256": "5c1bcc9e929c50834608e8cc1a4cc1d7503eb60c15a535b779fd39e2f372c017", + "filename": "aiofile-3.12.3-py3-none-any.whl", + "requires_python": ">=3.11" + }, + "pydantic-core": { + "version": "2.50.0", + "sha256": "ac223ea031905319a64d0df116979ae438b42d6265862a3d63c9f9808c2905a7", + "filename": "pydantic_core-2.50.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.10" + }, + "typing-inspection": { + "version": "0.4.4", + "sha256": "65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", + "filename": "typing_inspection-0.4.4-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "typing-extensions": { + "version": "4.16.0", + "sha256": "481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", + "filename": "typing_extensions-4.16.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "gradio-client": { + "version": "2.7.2", + "sha256": "12c9d2d940df28eb8dce58eef61f5e808265ad87bbbca53704d1330aa701e5e2", + "filename": "gradio_client-2.7.2-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "authlib": { + "version": "1.8.0", + "sha256": "88aebbd9af6757e14e912d5dc007ae1dc1f3e27e3b2152ce7c552ee2c3b3c121", + "filename": "authlib-1.8.0-py2.py3-none-any.whl", + "requires_python": ">=3.10" + }, + "jaraco.functools": { + "version": "4.6.0", + "sha256": "99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30", + "filename": "jaraco_functools-4.6.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "jiter": { + "version": "0.17.0", + "sha256": "5888fe5abc1ca2fa834a3e1b4c7ef0dcece286a7d7e95a609ef0934b777b9fc9", + "filename": "jiter-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.10" + }, + "httpx2": { + "version": "2.13.1", + "sha256": "6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4", + "filename": "httpx2-2.13.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "sse-starlette": { + "version": "3.5.0", + "sha256": "3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997", + "filename": "sse_starlette-3.5.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "platformdirs": { + "version": "4.12.4", + "sha256": "78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7", + "filename": "platformdirs-4.12.4-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "cyclopts": { + "version": "5.2.0", + "sha256": "5da2a5d65164e03008621fc4795946b88a722b881398b5dfa58afa6218342cff", + "filename": "cyclopts-5.2.0-py3-none-any.whl", + "requires_python": ">=3.11" + }, + "pyyaml": { + "version": "6.0.3", + "sha256": "b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", + "filename": "pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.8" + }, + "pyperclip": { + "version": "1.11.0", + "sha256": "299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273", + "filename": "pyperclip-1.11.0-py3-none-any.whl", + "requires_python": null + }, + "cachetools": { + "version": "7.2.1", + "sha256": "63aa53dfe7473c10cccdd5a01dedf76ef2c4b73a58840d9396e7d0752cbdac3b", + "filename": "cachetools-7.2.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "groovy": { + "version": "0.1.2", + "sha256": "7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64", + "filename": "groovy-0.1.2-py3-none-any.whl", + "requires_python": ">3.9" + }, + "websockets": { + "version": "17.2", + "sha256": "376a693697ddb695ea282ead76060f4847f90e564b12b4389f2c7589e6fadb9e", + "filename": "websockets-17.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", + "requires_python": ">=3.11" + }, + "httpx": { + "version": "0.28.1", + "sha256": "d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", + "filename": "httpx-0.28.1-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "jaraco.context": { + "version": "6.1.2", + "sha256": "bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535", + "filename": "jaraco_context-6.1.2-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "python-multipart": { + "version": "0.0.32", + "sha256": "ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23", + "filename": "python_multipart-0.0.32-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "requests": { + "version": "2.34.2", + "sha256": "2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", + "filename": "requests-2.34.2-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "pyjwt": { + "version": "2.15.1", + "sha256": "42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193", + "filename": "pyjwt-2.15.1-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "anyio": { + "version": "4.15.1", + "sha256": "6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101", + "filename": "anyio-4.15.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "uvicorn": { + "version": "0.54.0", + "sha256": "505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf", + "filename": "uvicorn-0.54.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "tqdm": { + "version": "4.70.1", + "sha256": "c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", + "filename": "tqdm-4.70.1-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "fastmcp-slim": { + "version": "3.4.8", + "sha256": "e72c6b74e90c5dcdc8f58087fbdf213636d8b5d339384a498de1c5df6fc037a7", + "filename": "fastmcp_slim-3.4.8-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "backports.tarfile": { + "version": "1.2.0", + "sha256": "77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34", + "filename": "backports.tarfile-1.2.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "opentelemetry-api": { + "version": "1.45.1", + "sha256": "b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb", + "filename": "opentelemetry_api-1.45.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "sniffio": { + "version": "1.3.1", + "sha256": "2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "filename": "sniffio-1.3.1-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "filelock": { + "version": "4.1.0", + "sha256": "2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1", + "filename": "filelock-4.1.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "hf-gradio": { + "version": "0.4.1", + "sha256": "76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3", + "filename": "hf_gradio-0.4.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "mcp": { + "version": "1.30.0", + "sha256": "666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0", + "filename": "mcp-1.30.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "email-validator": { + "version": "2.3.0", + "sha256": "80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4", + "filename": "email_validator-2.3.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "hf-xet": { + "version": "1.7.0", + "sha256": "2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8", + "filename": "hf_xet-1.7.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "requires_python": ">=3.8" + }, + "certifi": { + "version": "2026.7.22", + "sha256": "62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", + "filename": "certifi-2026.7.22-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "fastapi": { + "version": "0.143.0", + "sha256": "3e9395fd35276425b61b516a31fdd7c77fe2af83e41b4da22e30696fb1304c5d", + "filename": "fastapi-0.143.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "h11": { + "version": "0.16.0", + "sha256": "63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", + "filename": "h11-0.16.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "click": { + "version": "8.5.0", + "sha256": "255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", + "filename": "click-8.5.0-py3-none-any.whl", + "requires_python": ">=3.10" + } + } +} diff --git a/components/math/SOURCE.json b/components/math/SOURCE.json new file mode 100644 index 0000000000000000000000000000000000000000..3752aec469d5e080ee73c17fcd373fbf5e741270 --- /dev/null +++ b/components/math/SOURCE.json @@ -0,0 +1,28 @@ +{ + "source_dataset": "amphora/MathConstructOptimize-Envs-harbor", + "source_revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "source_url": "https://huggingface.co/datasets/amphora/MathConstructOptimize-Envs-harbor/tree/66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "tasks": [ + { + "task_id": "construct-mc-costas-array-l3-s0", + "source": "MathConstraint", + "license": "CC-BY-4.0" + }, + { + "task_id": "construct-mc-ramsey-l4-s0", + "source": "MathConstraint", + "license": "CC-BY-4.0" + }, + { + "task_id": "construct-rlve-round-robin-scores-l3-s0", + "source": "RLVE-Gym/round_robin", + "license": "MIT" + }, + { + "task_id": "construct-mc-social-golfers-l4-s0", + "source": "MathConstraint", + "license": "CC-BY-4.0" + } + ], + "adaptation": "Original prompts, instances and checker files unchanged. Shared OpenEnv action/observation and isolated shell execution added. Original task workspace and no-network policy preserved. Upstream solution scripts omitted from runtime and this source component." +} \ No newline at end of file diff --git a/components/math/TASKS.json b/components/math/TASKS.json new file mode 100644 index 0000000000000000000000000000000000000000..eead893f607b6ad3db9bdb85699dfdf0f15cda14 --- /dev/null +++ b/components/math/TASKS.json @@ -0,0 +1,119 @@ +{ + "tasks": [ + { + "task_id": "construct-mc-costas-array-l3-s0", + "selection": "primary_candidate", + "interface": { + "operations": [ + "exec", + "finish" + ], + "workspace": "/workdir", + "input": "/workdir/instance.json", + "output": "/workdir/answer.json", + "network": false + }, + "resources": { + "cpus": 2, + "memory_mb": 4096, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 300.0 + }, + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-costas-array-l3-s0", + "original_family": "MathConstraint/costas_array", + "license": "CC-BY-4.0" + }, + "model_evidence": "Old exact-task API records available, differing profiles; no new official wire performance claim." + }, + { + "task_id": "construct-mc-ramsey-l4-s0", + "selection": "primary_candidate", + "interface": { + "operations": [ + "exec", + "finish" + ], + "workspace": "/workdir", + "input": "/workdir/instance.json", + "output": "/workdir/answer.json", + "network": false + }, + "resources": { + "cpus": 2, + "memory_mb": 4096, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 300.0 + }, + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-ramsey-l4-s0", + "original_family": "MathConstraint/ramsey", + "license": "CC-BY-4.0" + }, + "model_evidence": "No valid target-model calibration for this exact task; original-checker and actual wire CPU controls only." + }, + { + "task_id": "construct-rlve-round-robin-scores-l3-s0", + "selection": "available_not_selected", + "interface": { + "operations": [ + "exec", + "finish" + ], + "workspace": "/workdir", + "input": "/workdir/instance.json", + "output": "/workdir/answer.json", + "network": false + }, + "resources": { + "cpus": 2, + "memory_mb": 4096, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 300.0 + }, + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-rlve-round-robin-scores-l3-s0", + "original_family": "RLVE-Gym/round_robin", + "license": "MIT" + }, + "model_evidence": "No valid target-model calibration for this exact task; original-checker and actual wire CPU controls only." + }, + { + "task_id": "construct-mc-social-golfers-l4-s0", + "selection": "primary_candidate", + "interface": { + "operations": [ + "exec", + "finish" + ], + "workspace": "/workdir", + "input": "/workdir/instance.json", + "output": "/workdir/answer.json", + "network": false + }, + "resources": { + "cpus": 2, + "memory_mb": 4096, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 300.0 + }, + "source": { + "repo": "amphora/MathConstructOptimize-Envs-harbor", + "revision": "66cd5c87d51113c76faaef1b05397f1a6282a0f7", + "path": "tasks/construct-mc-social-golfers-l4-s0", + "original_family": "MathConstraint/social_golfers", + "license": "CC-BY-4.0" + }, + "model_evidence": "No valid target-model calibration for this exact task; original-checker and actual wire CPU controls only." + } + ], + "schema_sha256": "10993deaaa8553929fa0b3b6bf3c1ad100baaaf9ff10ae8ed139a8ec4279a3c4", + "image_task_count": 4, + "selection_is_not_automatically_all_available_tasks": true +} diff --git a/components/math/config.json b/components/math/config.json new file mode 100644 index 0000000000000000000000000000000000000000..e0fbb2290b324b89b2ee053158189383564f0a32 --- /dev/null +++ b/components/math/config.json @@ -0,0 +1,148 @@ +{ + "tasks": [ + { + "id": "construct-mc-costas-array-l3-s0", + "source": "/opt/native-shell/tasks/construct-mc-costas-array-l3-s0/source", + "pristine_workspace": "/opt/native-shell/tasks/construct-mc-costas-array-l3-s0/pristine", + "workspace": "/workdir", + "inputs": [ + "/workdir/instance.json" + ], + "outputs": [ + "/workdir/answer.json" + ], + "editable": [], + "grading_mode": "file-output", + "grader": { + "kind": "original-shell", + "script": "test.sh", + "executes_learner_code": false + }, + "python": "/usr/local/bin/python3", + "cpus": 2, + "memory_mb": 4096, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 300.0, + "source_sha256": { + "task.toml": "b62ba527da418f1b84d165707ea56ea805953289b0993cc3176e988ef59c3d32", + "instruction.md": "88e4a26e71d8483fbc89627210e4ed07f6dfef0fb16ce3e6d31e84a04bd050f9", + "tests/run.py": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "tests/check.py": "3c0290e35201f077926099989cd0e82c10bf091cb33c572cacc02bca075debdb", + "tests/test.sh": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "tests/instance.json": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5" + }, + "pristine_sha256": { + "instance.json": "15a02495c009c52f7cbc0f2c1daa95e0a4d0981026e123b83aaa892565fd68b5" + } + }, + { + "id": "construct-mc-ramsey-l4-s0", + "source": "/opt/native-shell/tasks/construct-mc-ramsey-l4-s0/source", + "pristine_workspace": "/opt/native-shell/tasks/construct-mc-ramsey-l4-s0/pristine", + "workspace": "/workdir", + "inputs": [ + "/workdir/instance.json" + ], + "outputs": [ + "/workdir/answer.json" + ], + "editable": [], + "grading_mode": "file-output", + "grader": { + "kind": "original-shell", + "script": "test.sh", + "executes_learner_code": false + }, + "python": "/usr/local/bin/python3", + "cpus": 2, + "memory_mb": 4096, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 300.0, + "source_sha256": { + "task.toml": "d2ea623dfdf1ab4864399d4231f17b7c6800cc73e1ad9d1c583816d149dca377", + "instruction.md": "dacf1d28faa912ac766cb9a8859b9a2d08940d2c52a9f8460c85ce0595a16c81", + "tests/run.py": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "tests/check.py": "923f9e1258610a3cc3d5c2984b1855ed7341af13bc7592ff42aed0e0f91fc74d", + "tests/test.sh": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "tests/instance.json": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92" + }, + "pristine_sha256": { + "instance.json": "9c2fb12f3e08390c54d4ec516860f404fee82ff0c9d1fdc952364965b6307b92" + } + }, + { + "id": "construct-rlve-round-robin-scores-l3-s0", + "source": "/opt/native-shell/tasks/construct-rlve-round-robin-scores-l3-s0/source", + "pristine_workspace": "/opt/native-shell/tasks/construct-rlve-round-robin-scores-l3-s0/pristine", + "workspace": "/workdir", + "inputs": [ + "/workdir/instance.json" + ], + "outputs": [ + "/workdir/answer.json" + ], + "editable": [], + "grading_mode": "file-output", + "grader": { + "kind": "original-shell", + "script": "test.sh", + "executes_learner_code": false + }, + "python": "/usr/local/bin/python3", + "cpus": 2, + "memory_mb": 4096, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 300.0, + "source_sha256": { + "task.toml": "d42f4225ae8850e6abe3e1b612b0da6f2e896322a3e9e00e6addb988a8f8332a", + "instruction.md": "db8d002ee820a699d6b7b819cb88ed583990529649255af446c22c98889ad370", + "tests/run.py": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "tests/check.py": "930cd10836482427303a497cfa896934ccdc24116879eaa4c5d32a572d01353c", + "tests/test.sh": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "tests/instance.json": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a" + }, + "pristine_sha256": { + "instance.json": "b8c26f77936e8e23c97ff9488800c364a5c1b8663a93d508500dcde958a4721a" + } + }, + { + "id": "construct-mc-social-golfers-l4-s0", + "source": "/opt/native-shell/tasks/construct-mc-social-golfers-l4-s0/source", + "pristine_workspace": "/opt/native-shell/tasks/construct-mc-social-golfers-l4-s0/pristine", + "workspace": "/workdir", + "inputs": [ + "/workdir/instance.json" + ], + "outputs": [ + "/workdir/answer.json" + ], + "editable": [], + "grading_mode": "file-output", + "grader": { + "kind": "original-shell", + "script": "test.sh", + "executes_learner_code": false + }, + "python": "/usr/local/bin/python3", + "cpus": 2, + "memory_mb": 4096, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 300.0, + "source_sha256": { + "task.toml": "fb08db6bba18360321c1ac959d0af5f655435579d5cb88864d924897254c7546", + "instruction.md": "a638ef887b79167571086549b8d9438447d07b800772aac868b3e9a2e6899cd2", + "tests/run.py": "d364958443f46cf3ebb71808afc270e23203f62550246eb5008a847a8701bd73", + "tests/check.py": "9514518058e308fc2ae0ec0b8ce8a50993d5dfa09708ac9c3609e1edbbae126a", + "tests/test.sh": "a35b815edf35d07fee8b5b341be2af0539010888f73ce39a0c15f025367eae3e", + "tests/instance.json": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73" + }, + "pristine_sha256": { + "instance.json": "cb27969d6fe8e38fac137b603f5e86da8b5f66023bc8288c6476e1b8881bfe73" + } + } + ], + "private_root": "/opt/native-shell/private", + "max_actions": 64, + "command_timeout_sec": 120, + "output_limit_bytes": 65536 +} \ No newline at end of file diff --git a/components/math/licenses/MathConstraint-LICENSE b/components/math/licenses/MathConstraint-LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..4ea99c213c5c0c005ae4e80df8e52169d06896ec --- /dev/null +++ b/components/math/licenses/MathConstraint-LICENSE @@ -0,0 +1,395 @@ +Attribution 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution 4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution 4.0 International Public License ("Public License"). To the +extent this Public License may be interpreted as a contract, You are +granted the Licensed Rights in consideration of Your acceptance of +these terms and conditions, and the Licensor grants You such rights in +consideration of benefits the Licensor receives from making the +Licensed Material available under these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Adapter's License means the license You apply to Your Copyright + and Similar Rights in Your contributions to Adapted Material in + accordance with the terms and conditions of this Public License. + + c. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + d. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + e. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + f. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + g. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + h. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part; and + + b. produce, reproduce, and Share Adapted Material. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material (including in modified + form), You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + 4. If You Share Adapted Material You produce, the Adapter's + License You apply must not prevent recipients of the Adapted + Material from complying with this Public License. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/components/math/licenses/RLVE-LICENSE b/components/math/licenses/RLVE-LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..5677eb6d02ee26cd27b6dce1cbfaa9676b1a2382 --- /dev/null +++ b/components/math/licenses/RLVE-LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Zhiyuan Zeng + +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/components/math/licenses/UPSTREAM_COLLECTION_LICENSES.md b/components/math/licenses/UPSTREAM_COLLECTION_LICENSES.md new file mode 100644 index 0000000000000000000000000000000000000000..456ee2faedb2514e72a6d3c735adb745dc943146 --- /dev/null +++ b/components/math/licenses/UPSTREAM_COLLECTION_LICENSES.md @@ -0,0 +1,9 @@ +# Licenses + +This collection repackages tasks from several sources. Each row's `license` column gives the license of its source: + +- MIT: RLVE-Gym, NPPC, EinsteinArena (platform and baselines) +- CC-BY-4.0: MathConstraint; AlphaEvolve repository of problems (materials) +- Apache-2.0: Reasoning Gym, FunSearch, AlphaEvolve repository of problems (code), Finch / Evolution Fine-Tuning (code) + +Please attribute the original authors when using the corresponding tasks. diff --git a/components/math/runtime/common/__init__.py b/components/math/runtime/common/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/components/math/runtime/common/__init__.py @@ -0,0 +1 @@ + diff --git a/components/math/runtime/common/contracts.py b/components/math/runtime/common/contracts.py new file mode 100644 index 0000000000000000000000000000000000000000..b33d03fd3c21f3b117be3a4664274c109ac6fa9d --- /dev/null +++ b/components/math/runtime/common/contracts.py @@ -0,0 +1,7 @@ + +from copy import deepcopy + +ACTION_SCHEMA = {'type': 'object', 'description': 'Return one action object per reply, then wait for its observation. To finish, send {"op":"finish"}. A command is a JSON string: encode newlines as \\n and internal double quotes as \\". Do not wrap the object in prose, Markdown, or tags.', 'examples': [{'op': 'finish'}], 'oneOf': [{'properties': {'op': {'const': 'exec'}, 'command': {'type': 'string'}}, 'required': ['op', 'command'], 'additionalProperties': False}, {'properties': {'op': {'const': 'call'}, 'tool': {'type': 'string'}, 'arguments': {'type': 'object'}}, 'required': ['op', 'tool', 'arguments'], 'additionalProperties': False}, {'properties': {'op': {'const': 'finish'}}, 'required': ['op'], 'additionalProperties': False}]} + +def observation_payload(task_id, message, data=None, reward=0.0, done=False): + return {"task_id": str(task_id), "message": str(message), "data": {} if data is None else data, "reward": reward, "done": bool(done), "metadata": {}} diff --git a/components/math/runtime/common/http_routes.py b/components/math/runtime/common/http_routes.py new file mode 100644 index 0000000000000000000000000000000000000000..a3ab94f85fc92d044895d022d16d4659be018d8b --- /dev/null +++ b/components/math/runtime/common/http_routes.py @@ -0,0 +1,64 @@ + +from threading import RLock +from contextlib import asynccontextmanager +from copy import deepcopy +from fastapi import HTTPException +from pydantic import ValidationError +from starlette.concurrency import run_in_threadpool +from openenv.core.env_server.serialization import serialize_observation +from openenv.core.env_server.types import ResetRequest,ResetResponse,StepRequest,StepResponse +from .models import ArenaAction + + +def install_persistent_http_routes(app,env,conflict_error=None): + lock=RLock() + app.router.routes=[route for route in app.router.routes if getattr(route,'path',None) not in {'/reset','/step','/state'}] + + def reset_sync(request): + with lock: + return ResetResponse(**serialize_observation(env.reset(**request.model_dump(exclude_unset=True)))) + + def step_sync(request): + with lock: + action=ArenaAction.model_validate(request.action) + return StepResponse(**serialize_observation(env.step(action,timeout_s=request.timeout_s))) + + def state_sync(): + with lock: + value=env.state + return value.model_copy(deep=True) if hasattr(value,'model_copy') else deepcopy(value) + + @app.post('/reset',response_model=ResetResponse) + async def reset(request:ResetRequest): + try:return await run_in_threadpool(reset_sync,request) + except (ValueError,IndexError) as exc:raise HTTPException(status_code=400,detail=str(exc)) from exc + except Exception as exc: + if conflict_error is not None and isinstance(exc,conflict_error): + raise HTTPException(status_code=409,detail=str(exc)) from exc + raise + + @app.post('/step',response_model=StepResponse) + async def step(request:StepRequest): + try:return await run_in_threadpool(step_sync,request) + except (ValueError,ValidationError) as exc:raise HTTPException(status_code=422,detail=str(exc)) from exc + + @app.get('/state') + async def state(): + return await run_in_threadpool(state_sync) + + def shutdown(): + with lock:env.close() + + + + + original_lifespan=app.router.lifespan_context + + @asynccontextmanager + async def lifespan(application): + async with original_lifespan(application) as state: + try:yield state + finally:await run_in_threadpool(shutdown) + + app.router.lifespan_context=lifespan + return lock diff --git a/components/math/runtime/common/models.py b/components/math/runtime/common/models.py new file mode 100644 index 0000000000000000000000000000000000000000..b862e2d3259ab1c55bbb46e6423587b742dbcc51 --- /dev/null +++ b/components/math/runtime/common/models.py @@ -0,0 +1,54 @@ + +from copy import deepcopy +import math +from typing import Any, Literal +import jsonschema +from openenv.core.env_server.types import Action, Observation +from pydantic import ConfigDict, Field, model_serializer, model_validator +from .contracts import ACTION_SCHEMA + + +class ArenaAction(Action): + model_config=ConfigDict(extra='forbid',frozen=True,validate_assignment=False) + op: Literal['exec', 'call', 'finish'] + command: str | None = None + tool: str | None = None + arguments: dict[str, Any] | None = None + + @model_validator(mode='before') + @classmethod + def exact_contract(cls, value): + if isinstance(value, cls): + return value + def finite(item): + if isinstance(item,float) and not math.isfinite(item): + raise ValueError('Non-finite JSON number') + if isinstance(item,dict): + for part in item.values():finite(part) + elif isinstance(item,list): + for part in item:finite(part) + finite(value) + try: + jsonschema.Draft202012Validator(ACTION_SCHEMA).validate(value) + except jsonschema.ValidationError as exc: + raise ValueError(exc.message) from exc + return value + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema, handler): + return deepcopy(ACTION_SCHEMA) + + def action_payload(self): + if self.op=='exec':return {'op':'exec','command':self.command} + if self.op=='call':return {'op':'call','tool':self.tool,'arguments':self.arguments} + return {'op':'finish'} + + @model_serializer + def canonical_serialization(self): + return self.action_payload() + + +class ArenaObservation(Observation): + task_id: str = '' + message: str = '' + data: dict[str, Any] = Field(default_factory=dict) diff --git a/components/math/runtime/native_shell/__init__.py b/components/math/runtime/native_shell/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/components/math/runtime/native_shell/__init__.py @@ -0,0 +1 @@ + diff --git a/components/math/runtime/native_shell/actor_launcher.py b/components/math/runtime/native_shell/actor_launcher.py new file mode 100644 index 0000000000000000000000000000000000000000..82e7bd183e0e328163d12ef3fb049c14737c8978 --- /dev/null +++ b/components/math/runtime/native_shell/actor_launcher.py @@ -0,0 +1,117 @@ + +import argparse +import ctypes +import errno +import os +import resource +import sys + + +def deny_actor_network(): + + + + + + lib = ctypes.CDLL("libseccomp.so.2", use_errno=True) + lib.seccomp_init.argtypes = [ctypes.c_uint32] + lib.seccomp_init.restype = ctypes.c_void_p + lib.seccomp_syscall_resolve_name.argtypes = [ctypes.c_char_p] + lib.seccomp_syscall_resolve_name.restype = ctypes.c_int + lib.seccomp_rule_add.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_int, ctypes.c_uint] + lib.seccomp_rule_add.restype = ctypes.c_int + lib.seccomp_load.argtypes = [ctypes.c_void_p] + lib.seccomp_load.restype = ctypes.c_int + lib.seccomp_release.argtypes = [ctypes.c_void_p] + context = lib.seccomp_init(0x7FFF0000) + if not context: + raise RuntimeError("seccomp_init failed") + blocked = ("socket", "socketpair", "connect", "bind", "listen", "accept", "accept4", + "sendto", "sendmsg", "sendmmsg", "recvfrom", "recvmsg", "recvmmsg", + "shutdown", "getsockname", "getpeername", "setsockopt", "getsockopt", + + "io_uring_setup", "io_uring_register", "io_uring_enter") + try: + for name in blocked: + number = lib.seccomp_syscall_resolve_name(name.encode()) + if number < 0: + raise RuntimeError("Required syscall could not be resolved: " + name) + rc = lib.seccomp_rule_add(context, 0x00050000 | errno.EPERM, number, 0) + if rc: + raise OSError(-rc, "seccomp rule: " + name) + rc = lib.seccomp_load(context) + if rc: + raise OSError(-rc, "seccomp_load") + finally: + lib.seccomp_release(context) + + +def enter(uid, gid, cwd, status_fd, memory_mb, cpus, nproc): + if sys.platform != "linux" or os.geteuid() != 0 or uid <= 0 or gid <= 0: + raise RuntimeError("A Linux root supervisor and non-root actor IDs are required") + libc = ctypes.CDLL(None, use_errno=True) + if libc.prctl(38, 1, 0, 0, 0): + raise OSError(ctypes.get_errno(), "PR_SET_NO_NEW_PRIVS") + if libc.prctl(47, 4, 0, 0, 0): + raise OSError(ctypes.get_errno(), "PR_CAP_AMBIENT_CLEAR_ALL") + if libc.prctl(8, 0, 0, 0, 0): + raise OSError(ctypes.get_errno(), "PR_SET_KEEPCAPS") + os.setgroups([]) + os.setresgid(gid, gid, gid) + os.setresuid(uid, uid, uid) + if os.getresuid() != (uid, uid, uid) or os.getresgid() != (gid, gid, gid): + raise RuntimeError("Actor identity change did not take effect") + if libc.prctl(4, 0, 0, 0, 0): + raise OSError(ctypes.get_errno(), "PR_SET_DUMPABLE") + os.chdir(cwd) + os.umask(0o077) + resource.setrlimit(resource.RLIMIT_CORE, (0, 0)) + resource.setrlimit(resource.RLIMIT_FSIZE, (16 * 1024 * 1024,) * 2) + resource.setrlimit(resource.RLIMIT_NOFILE, (128, 128)) + resource.setrlimit(resource.RLIMIT_NPROC, (nproc, nproc)) + resource.setrlimit(resource.RLIMIT_AS, (memory_mb * 1024 * 1024,) * 2) + allowed = sorted(os.sched_getaffinity(0)) + os.sched_setaffinity(0, allowed[:cpus]) + deny_actor_network() + state = dict(line.split(":", 1) for line in open("/proc/self/status") if ":" in line) + if state["NoNewPrivs"].strip() != "1" or int(state["CapEff"].strip(), 16): + raise RuntimeError("Actor still has effective capabilities or lacks no_new_privs") + if state["Seccomp"].strip() != "2": + raise RuntimeError("Actor seccomp filter did not become active") + os.write(status_fd, b"ready") + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--uid", type=int, required=True) + parser.add_argument("--gid", type=int, required=True) + parser.add_argument("--cwd", required=True) + parser.add_argument("--status-fd", type=int, required=True) + parser.add_argument('--memory-mb', type=int, required=True) + parser.add_argument('--cpus', type=int, required=True) + parser.add_argument('--nproc', type=int, default=32) + parser.add_argument("argv", nargs=argparse.REMAINDER) + args = parser.parse_args() + argv = args.argv[1:] if args.argv[:1] == ["--"] else args.argv + if not argv: + parser.error("A command is required") + try: + if not 128 <= args.memory_mb <= 16384 or not 1 <= args.cpus <= 2 or not 1 <= args.nproc <= 64: + raise ValueError('Invalid actor resource bounds') + enter(args.uid, args.gid, args.cwd, args.status_fd, args.memory_mb, args.cpus, args.nproc) + except Exception as exc: + os.write(args.status_fd, ("error:" + str(exc)).encode()[:2048]) + raise + finally: + os.close(args.status_fd) + + env = {"PATH": "/usr/local/bin:/usr/bin:/bin", "HOME": args.cwd, + "TMPDIR": args.cwd + "/.actor_tmp", "LANG": "C.UTF-8", + "LC_ALL": "C.UTF-8", "PYTHONDONTWRITEBYTECODE": "1", + "OPENBLAS_NUM_THREADS": str(args.cpus), "OMP_NUM_THREADS": str(args.cpus), + "MKL_NUM_THREADS": str(args.cpus), "NUMEXPR_NUM_THREADS": str(args.cpus)} + os.execvpe(argv[0], argv, env) + + +if __name__ == "__main__": + main() diff --git a/components/math/runtime/native_shell/backend.py b/components/math/runtime/native_shell/backend.py new file mode 100644 index 0000000000000000000000000000000000000000..18d596ca0e7685dbefdf23ea8b13ca3592198e53 --- /dev/null +++ b/components/math/runtime/native_shell/backend.py @@ -0,0 +1,266 @@ + + + + + +import hashlib +import json +import math +import os +from pathlib import Path +import shutil +import signal +import subprocess +import sys +from threading import Lock, RLock +import time +from uuid import uuid4 + +from common.contracts import ACTION_SCHEMA, observation_payload +from .guard import Guard, GuardError, Policy, ordinary + +_lease = Lock() + + +class RuntimeUnavailable(RuntimeError): + pass + + +def sha256(path): + return hashlib.sha256(Path(path).read_bytes()).hexdigest() + + +def clear_contents(path): + path = Path(path) + if path.is_symlink(): + raise RuntimeUnavailable('Trusted root was replaced by a symlink') + path.mkdir(parents=True, exist_ok=True) + for child in path.iterdir(): + if not child.is_symlink() and child.is_dir(): + shutil.rmtree(child) + else: + child.unlink() + + +class ShellBackend: + def __init__(self, config_path=None): + self.config_path=Path(config_path or os.environ.get('NATIVE_SHELL_CONFIG','/opt/native-shell/config.json')) + self.config=json.loads(self.config_path.read_text()) + self.tasks={item['id']:item for item in self.config['tasks']} + if not self.tasks: + raise ValueError('No prepared tasks') + if len({task['workspace'] for task in self.tasks.values()})!=1: + raise ValueError('One runtime image must use one original workspace root') + for task in self.tasks.values(): + if task.get('grading_mode') != 'file-output': + raise ValueError('Learner-code graders are not supported by the file-output guard') + if task['grader']['kind'] not in ('pytest', 'original-shell'): + raise ValueError('Unreviewed grader kind') + if task['grader'].get('executes_learner_code') is not False: + raise ValueError('Explicit file-output grader review is required') + work=Path(task['workspace']) + if str(work) not in ('/app','/workdir','/home/user'): + raise ValueError('Workspace must be an explicitly supported original task root') + if not (128 <= task['memory_mb'] <= 16384 and 1 <= task['cpus'] <= 2): + raise ValueError('Resources exceed the reviewed Arena bounds') + self.lock=RLock() + self.owns_lease=False + self.guard=None + self.task=None + self.final=None + self.failed=False + self.episode_id=None + self.step_count=0 + self.started=0.0 + + def _private_root(self): + return Path(self.config.get('private_root','/opt/native-shell/private')) + + def _check_task_sources(self,task): + root=Path(task['source']) + actual={str(path.relative_to(root)) for path in root.rglob('*') if path.is_file()} + if actual!=set(task['source_sha256']) or any(path.is_symlink() for path in root.rglob('*')): + raise RuntimeUnavailable('Pinned original source tree membership changed') + for relative,digest in task['source_sha256'].items(): + path=root/relative + if path.is_symlink() or not path.is_file() or sha256(path)!=digest: + raise RuntimeUnavailable('Pinned original task source changed') + pristine=Path(task['pristine_workspace']) + if {str(path.relative_to(pristine)) for path in pristine.rglob('*') if path.is_file()}!=set(task['pristine_sha256']): + raise RuntimeUnavailable('Pristine input tree membership changed') + for relative,digest in task['pristine_sha256'].items(): + path=pristine/relative + if path.is_symlink() or not path.is_file() or sha256(path)!=digest: + raise RuntimeUnavailable('Pristine task input changed') + + def reset(self,*,task_id=None,index=None,split='train',seed=None,episode_id=None,**kwargs): + with self.lock: + if sys.platform!='linux' or os.geteuid()!=0 or os.environ.get('ARENA_DEDICATED_CONTAINER')!='1': + raise RuntimeUnavailable('Use a dedicated disposable Linux container with a root supervisor') + if split!='train': + raise ValueError('Unknown split') + if task_id is None: + selected=0 if index is None else index + if type(selected) is not int or not 0<=selected1048576: + raise ValueError('Command exceeds the transport limit') + limit=min(float(timeout_s or self.config.get('command_timeout_sec',120)),remaining, + self.config.get('command_timeout_sec',120)) + result=self.guard.run_actor(action['command'],timeout=max(.01,limit), + output_limit=self.config.get('output_limit_bytes',65536)) + self.step_count+=1 + if self.step_count>=self.config.get('max_actions',64): + return self._finish() + return observation_payload(self.task['id'],'Command completed.',result) + + def _finish(self): + try: + return self._finish_impl() + except Exception: + self.failed=True + self.guard.stop_actor() + raise + finally: + if self.owns_lease: + self.owns_lease=False + _lease.release() + + def _finish_impl(self): + try: + self.guard.freeze() + except GuardError: + self.guard.stop_actor() + self.final=observation_payload(self.task['id'],'Output violates the published regular-file boundary.', + {'status':'invalid_output'},reward=0.0,done=True) + return self.final + + + + clear_contents('/tmp');os.chown('/tmp',0,0);os.chmod('/tmp',0o700) + grader=self.task['grader'] + python=self.task['python'] + private=self._private_root()/'episode' + verifier_tmp=private/'tmp';verifier_tmp.mkdir(mode=0o700) + if grader['kind']=='pytest': + command=[python,'-I','-B','-m','pytest','-c','/dev/null','--confcutdir=/tests', + '--rootdir=/tests','--import-mode=importlib','-p','no:cacheprovider', + '/tests/'+grader['test_file'],'-q'] + else: + command=['/bin/bash','--noprofile','--norc','/tests/'+grader['script']] + command=[python,'-I','-B',str(Path(__file__).with_name('verifier_launcher.py')), + '--cpus',str(self.task['cpus']),'--memory-mb',str(self.task['memory_mb']), + '--wall-seconds',str(self.task['verifier_timeout_sec']),'--',*command] + env={'PATH':'/usr/local/bin:/usr/bin:/bin','HOME':'/root','LANG':'C.UTF-8','LC_ALL':'C.UTF-8', + 'PYTHONDONTWRITEBYTECODE':'1','PYTHONNOUSERSITE':'1','PYTEST_DISABLE_PLUGIN_AUTOLOAD':'1', + 'OPENBLAS_NUM_THREADS':str(self.task['cpus']),'OMP_NUM_THREADS':str(self.task['cpus']), + 'TMPDIR':str(verifier_tmp)} + process=subprocess.Popen(command,cwd='/tests',env=env,stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE,stderr=subprocess.PIPE,start_new_session=True) + try: + stdout,stderr=process.communicate(timeout=self.task['verifier_timeout_sec']) + except subprocess.TimeoutExpired: + os.killpg(process.pid,signal.SIGKILL);process.communicate() + raise RuntimeUnavailable('Original verifier exceeded its time limit') + self.guard.check_integrity() + (private/'verifier-result.json').write_text(json.dumps({'return_code':process.returncode, + 'stdout':stdout.decode(errors='replace')[-262144:],'stderr':stderr.decode(errors='replace')[-262144:]},indent=2)+'\n') + if grader['kind']=='pytest': + if process.returncode not in (0,1): + raise RuntimeUnavailable('Original pytest did not produce a valid score') + reward=float(process.returncode==0) + else: + if process.returncode!=0: + raise RuntimeUnavailable('Original grader script failed') + try:reward=float(Path('/logs/verifier/reward.txt').read_text().strip()) + except (OSError,ValueError) as exc:raise RuntimeUnavailable('Original grader produced no numeric score') from exc + if not math.isfinite(reward) or not 0<=reward<=1: + raise RuntimeUnavailable('Original grader produced an invalid score') + self.final=observation_payload(self.task['id'],'Original verifier completed.', + {'status':'verified','step_count':self.step_count},reward=reward,done=True) + return self.final + + @property + def state(self): + return {'episode_id':self.episode_id,'step_count':self.step_count,'task_id':self.task['id'] if self.task else None, + 'done':self.final is not None or self.failed,'infrastructure_failed':self.failed} + + def close(self): + with self.lock: + if self.owns_lease: + try: + if self.guard is not None:self.guard.stop_actor() + finally: + self.guard=None;self.task=None;self.final=None;self.episode_id=None;self.failed=False + self.owns_lease=False;_lease.release() diff --git a/components/math/runtime/native_shell/environment.py b/components/math/runtime/native_shell/environment.py new file mode 100644 index 0000000000000000000000000000000000000000..c5bd72d364747be79eb618ee2f0a042ceba972ea --- /dev/null +++ b/components/math/runtime/native_shell/environment.py @@ -0,0 +1,46 @@ + +from openenv.core.env_server.interfaces import Environment +from openenv.core.env_server.types import State, EnvironmentMetadata +from common.models import ArenaAction, ArenaObservation +from .backend import ShellBackend + + +class NativeHarborEnvironment(Environment): + SUPPORTS_CONCURRENT_SESSIONS = False + + def __init__(self): + super().__init__() + self.backend=ShellBackend() + + def reset(self,**kwargs): + return ArenaObservation.model_validate(self.backend.reset(**kwargs)) + + def step(self,action,timeout_s=None,**kwargs): + value=action.action_payload() if isinstance(action,ArenaAction) else ArenaAction.model_validate(action).action_payload() + return ArenaObservation.model_validate(self.backend.step(value,timeout_s=timeout_s)) + + @property + def state(self): + return State.model_validate(self.backend.state) + + def close(self): + self.backend.close() + + def get_metadata(self): + return EnvironmentMetadata(name='native_harbor',version='0.1.0',description='Original Harbor tasks with offline dependencies and private file-output grading.') + + def list_splits(self): + return ['train'] + + def list_tasks(self,split): + if split!='train':raise ValueError('Unknown split') + return [{'id':key,'index':index} for index,key in enumerate(self.backend.tasks)] + + def num_tasks(self,split): + return len(self.list_tasks(split)) + + def get_task(self,split,index): + return self.list_tasks(split)[index] + + def get_task_range(self,split,start=None,stop=None): + return self.list_tasks(split)[start:stop] diff --git a/components/math/runtime/native_shell/guard.py b/components/math/runtime/native_shell/guard.py new file mode 100644 index 0000000000000000000000000000000000000000..5070c37a4e2e1c5027888dd518cce766df4ad740 --- /dev/null +++ b/components/math/runtime/native_shell/guard.py @@ -0,0 +1,322 @@ + + + + + +from dataclasses import dataclass +import hashlib +import json +import os +from pathlib import Path +import selectors +import signal +import stat +import subprocess +import sys +import time + + +class GuardError(RuntimeError): + pass + + +def ordinary(path): + path = Path(path) + for current in [path, *path.parents]: + if current.is_symlink(): + raise GuardError(f"Symlink is forbidden in guarded path: {current}") + st = path.lstat() + if not (stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode)): + raise GuardError(f"Special filesystem object: {path}") + if stat.S_ISREG(st.st_mode) and st.st_nlink != 1: + raise GuardError(f"Hard-linked file: {path}") + return st + + +def descendants(path): + + pending = [(Path(path), 0)] + seen = 0 + while pending: + current, depth = pending.pop() + seen += 1 + if depth > 32 or seen > 4096: + raise GuardError("Guarded tree exceeds prototype depth/file limits") + st = ordinary(current) + yield current + if stat.S_ISDIR(st.st_mode): + pending.extend((child, depth + 1) for child in sorted(current.iterdir(), reverse=True)) + + +def record(path): + st = ordinary(path) + result = {"uid": st.st_uid, "gid": st.st_gid, "mode": stat.S_IMODE(st.st_mode), + "dev": st.st_dev, "inode": st.st_ino, + "kind": "directory" if stat.S_ISDIR(st.st_mode) else "file"} + if stat.S_ISREG(st.st_mode): + h = hashlib.sha256() + with open(path, "rb") as stream: + for block in iter(lambda: stream.read(65536), b""): + h.update(block) + result.update(size=st.st_size, nlink=st.st_nlink, sha256=h.hexdigest()) + return result + + +@dataclass(frozen=True) +class Policy: + workspace: Path + inputs: tuple[Path, ...] + private_paths: tuple[Path, ...] + output_paths: tuple[Path, ...] + editable_paths: tuple[Path, ...] = () + private_write_dirs: tuple[Path, ...] = (Path("/logs/verifier"),) + uid: int = 2000 + gid: int = 2000 + state_dir: Path = Path("/opt/guard-private") + memory_mb: int = 2048 + cpus: int = 1 + nproc: int = 32 + actor_python: str = '/usr/local/bin/python3' + + +class Guard: + def __init__(self, policy): + if sys.platform != "linux" or os.geteuid() != 0: + raise GuardError("Guard requires a dedicated Linux root supervisor") + self.policy = policy + self.records = {} + self.closed_trees = {} + self.phase = "new" + + @staticmethod + def check_runtime_paths(): + + + for path in [Path(sys.executable).resolve(), Path("/bin/bash").resolve(), + Path("/usr/local/bin"), Path("/usr/bin")]: + for item in [path, *path.parents]: + st = item.stat() + if st.st_uid != 0 or st.st_mode & 0o022: + raise GuardError(f"Untrusted runtime lookup path: {item}") + + def _protect_parents(self, path): + + + for parent in [Path(path).parent, *Path(path).parent.parents]: + st = ordinary(parent) + os.chown(parent, 0, 0) + mode = stat.S_IMODE(st.st_mode) + if mode & 0o022: + os.chmod(parent, mode | stat.S_ISVTX) + + def _seal(self, path, private=False): + objects = list(descendants(path)) + for current in objects: + st = ordinary(current) + os.chown(current, 0, 0) + directory = stat.S_ISDIR(st.st_mode) + os.chmod(current, (0o700 if directory else 0o600) if private else + (0o555 if directory or st.st_mode & 0o111 else 0o444)) + self._protect_parents(path) + for current in objects: + self.records[str(current)] = record(current) + if Path(path).is_dir(): + self.closed_trees[str(path)] = sorted(str(x) for x in objects) + + def prepare(self): + if self.phase != "new": + raise GuardError("Guard preparation is single use") + p = self.policy + self.check_runtime_paths() + if p.uid <= 0 or p.gid <= 0: + raise GuardError("Actor IDs must be non-root") + if not p.workspace.is_absolute() or str(p.workspace) in ("/", "/tmp", "/home"): + raise GuardError("Unsafe workspace") + ordinary(p.workspace) + os.chown(p.workspace, 0, 0) + os.chmod(p.workspace, 0o1777) + self._protect_parents(p.workspace) + for editable in p.editable_paths: + if not editable.is_relative_to(p.workspace): + raise GuardError("Editable paths must be inside the workspace") + for item in descendants(editable): + st = ordinary(item) + os.chown(item, p.uid, p.gid) + os.chmod(item, 0o700 if stat.S_ISDIR(st.st_mode) or st.st_mode & 0o111 else 0o600) + tmp = p.workspace / ".actor_tmp" + if tmp.exists(): + raise GuardError("Actor temporary directory must start absent") + tmp.mkdir(mode=0o700) + os.chown(tmp, p.uid, p.gid) + p.state_dir.mkdir(parents=True, exist_ok=True) + os.chown(p.state_dir, 0, 0) + os.chmod(p.state_dir, 0o700) + self._protect_parents(p.state_dir) + for item in p.inputs: + self._seal(item) + for item in p.private_paths: + self._seal(item, private=True) + for item in p.private_write_dirs: + item.mkdir(parents=True, exist_ok=True) + ordinary(item) + os.chown(item, 0, 0) + os.chmod(item, 0o700) + self._protect_parents(item) + self.records[str(item)] = record(item) + + for item in (*p.inputs, *p.private_paths, p.state_dir, p.workspace): + for ancestor in Path(item).parents: + self.records.setdefault(str(ancestor), record(ancestor)) + self.records[str(p.workspace)] = record(p.workspace) + (p.state_dir / "input_manifest.json").write_text(json.dumps(self.records, indent=2)) + self.phase = "actor" + self.check_integrity() + + def check_integrity(self): + for path, before in self.records.items(): + if record(path) != before: + raise GuardError(f"Protected input or parent changed: {path}") + for root, before in self.closed_trees.items(): + if sorted(str(x) for x in descendants(root)) != before: + raise GuardError(f"Protected directory membership changed: {root}") + + def stop_actor(self): + + deadline = time.monotonic() + 3 + while True: + live = [] + for entry in Path("/proc").iterdir(): + if not entry.name.isdigit(): + continue + try: + fields = dict(line.split(":", 1) for line in (entry / "status").read_text().splitlines() if ":" in line) + if self.policy.uid in map(int, fields["Uid"].split()) and not fields["State"].strip().startswith("Z"): + live.append(int(entry.name)) + except (FileNotFoundError, ProcessLookupError, PermissionError): + continue + if not live: + return + for pid in live: + try: + os.kill(pid, signal.SIGKILL) + except ProcessLookupError: + pass + if time.monotonic() > deadline: + raise GuardError("Could not stop all actor processes") + time.sleep(0.02) + + def run_actor(self, command, timeout=10, output_limit=65536): + if self.phase != "actor": + raise GuardError("Actor phase is closed") + self.check_integrity() + read_fd, write_fd = os.pipe() + launcher = Path(__file__).with_name("actor_launcher.py") + argv = [self.policy.actor_python, "-I", str(launcher), "--uid", str(self.policy.uid), + "--gid", str(self.policy.gid), "--cwd", str(self.policy.workspace), + '--memory-mb', str(self.policy.memory_mb), '--cpus', str(self.policy.cpus), + '--nproc', str(self.policy.nproc), + "--status-fd", str(write_fd), "--", "/bin/bash", "--noprofile", "--norc", "-c", command] + process = subprocess.Popen(argv, env={"PATH": "/usr/local/bin:/usr/bin:/bin"}, + stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + pass_fds=(write_fd,), start_new_session=True) + os.close(write_fd) + selector = selectors.DefaultSelector() + for stream in [process.stdout, process.stderr]: + os.set_blocking(stream.fileno(), False) + selector.register(stream, selectors.EVENT_READ) + output = {process.stdout: bytearray(), process.stderr: bytearray()} + reason = "completed" + deadline = time.monotonic() + timeout + try: + while selector.get_map(): + rss_kib = 0 + for entry in Path('/proc').iterdir(): + if not entry.name.isdigit(): + continue + try: + fields = dict(line.split(':',1) for line in (entry/'status').read_text().splitlines() if ':' in line) + if self.policy.uid in map(int,fields['Uid'].split()): + rss_kib += int(fields.get('VmRSS','0').split()[0]) + except (FileNotFoundError,ProcessLookupError,PermissionError): + continue + if rss_kib > self.policy.memory_mb * 1024: + reason = 'aggregate_rss_limit' + self.stop_actor() + process.kill() + break + if time.monotonic() > deadline: + reason = "command_timeout" + self.stop_actor() + process.kill() + break + for key, _ in selector.select(0.05): + data = os.read(key.fileobj.fileno(), 65536) + if not data: + selector.unregister(key.fileobj) + continue + remaining = output_limit - sum(len(v) for v in output.values()) + output[key.fileobj].extend(data[:max(remaining, 0)]) + if len(data) > remaining: + reason = "output_limit" + self.stop_actor() + process.kill() + break + if reason != "completed": + break + process.wait(timeout=3) + status = os.read(read_fd, 2048) + if status != b"ready": + raise GuardError("Actor isolation failed: " + status.decode(errors="replace")) + finally: + selector.close() + os.close(read_fd) + process.stdout.close() + process.stderr.close() + if process.poll() is None: + self.stop_actor() + process.kill() + process.wait() + self.check_integrity() + return {"return_code": process.returncode, "reason": reason, + "stdout": output[process.stdout].decode(errors="replace"), + "stderr": output[process.stderr].decode(errors="replace")} + + def freeze(self): + if self.phase != "actor": + raise GuardError("Can only freeze an active actor phase") + self.stop_actor() + self.check_integrity() + total = 0 + for path in self.policy.output_paths: + if not path.is_relative_to(self.policy.workspace): + raise GuardError("Output path is outside workspace") + if not os.path.lexists(path): + continue + for item in descendants(path): + st = ordinary(item) + if stat.S_ISREG(st.st_mode): + total += st.st_size + if st.st_size > 16 * 1024 * 1024 or total > 64 * 1024 * 1024: + raise GuardError("Output artifact exceeds prototype limits") + os.chown(item, 0, 0) + os.chmod(item, 0o555 if stat.S_ISDIR(st.st_mode) else 0o444) + self.phase = "frozen" + + def run_verifier(self, script, timeout=30): + if self.phase != "frozen": + raise GuardError("Freeze actor before grading") + self.check_integrity() + script = Path(script) + if str(script) not in self.records or self.records[str(script)]["uid"] != 0: + raise GuardError("Verifier was not sealed as a private trusted file") + env = {"PATH": "/usr/local/bin:/usr/bin:/bin", "HOME": "/root", "LANG": "C.UTF-8", + "LC_ALL": "C.UTF-8", "PYTHONDONTWRITEBYTECODE": "1", + "PYTHONNOUSERSITE": "1", "PYTEST_DISABLE_PLUGIN_AUTOLOAD": "1", + "PYTEST_ADDOPTS": "-p no:cacheprovider"} + result = subprocess.run(["/bin/bash", "--noprofile", "--norc", str(script)], + cwd=script.parent, env=env, stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=timeout) + self.check_integrity() + return {"return_code": result.returncode, + "stdout": result.stdout.decode(errors="replace"), + "stderr": result.stderr.decode(errors="replace")} diff --git a/components/math/runtime/native_shell/launch_service.py b/components/math/runtime/native_shell/launch_service.py new file mode 100644 index 0000000000000000000000000000000000000000..09f9fbe8804c60947c33e427c1f3e4583190157b --- /dev/null +++ b/components/math/runtime/native_shell/launch_service.py @@ -0,0 +1,51 @@ + +import argparse +import json +import os +from pathlib import Path +import subprocess +import time +import urllib.request + + +class RejectRedirects(urllib.request.HTTPRedirectHandler): + def redirect_request(self,*args,**kwargs): + raise RuntimeError('Redirects are forbidden for the local readiness probe') + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('--python',default='/opt/openenv-venv/bin/python') + parser.add_argument('--config',default='/opt/native-shell/config.json') + args=parser.parse_args() + if os.geteuid()!=0:raise PermissionError('Only the trusted supervisor may launch this service') + opener=urllib.request.build_opener(urllib.request.ProxyHandler({}),RejectRedirects()) + url='http://127.0.0.1:8000/metadata' + def ready(): + try: + with opener.open(url,timeout=2) as response: + return json.load(response).get('name')=='native_harbor' + except Exception:return False + if ready(): + print(json.dumps({'status':'already_running','base_url':'http://127.0.0.1:8000'}));return + private=Path('/opt/native-shell/private');private.mkdir(parents=True,exist_ok=True);private.chmod(0o700) + log=private/'service.log' + env={'PATH':'/usr/local/bin:/usr/bin:/bin','HOME':'/root','LANG':'C.UTF-8','LC_ALL':'C.UTF-8', + 'PYTHONPATH':'/opt/native-shell/runtime','PYTHONDONTWRITEBYTECODE':'1','PYTHONUNBUFFERED':'1', + 'NATIVE_SHELL_CONFIG':args.config,'ARENA_DEDICATED_CONTAINER':'1','ENABLE_WEB_INTERFACE':'false', + 'OPENENV_MODE':'simulation','GRADIO_ANALYTICS_ENABLED':'false','HF_HUB_OFFLINE':'1'} + with log.open('w') as stream: + process=subprocess.Popen([args.python,'-m','native_shell.server'],env=env,stdin=subprocess.DEVNULL, + stdout=stream,stderr=subprocess.STDOUT,start_new_session=True) + (private/'service.pid').write_text(str(process.pid)+'\n') + deadline=time.monotonic()+90 + while time.monotonic()2*1024*1024:raise WireProtocolError('SDK response exceeds the transport limit') + return validate_envelope(loads(raw)) + + def reset(self,**kwargs): + return self._post('/reset',kwargs) + + def step(self,action): + return self._post('/step',{'action':action}) + + def finish(self): + return validate_envelope(self.step({'op':'finish'}),require_done=True) + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('operation',choices=['reset','step','finish']) + parser.add_argument('--payload-base64') + parser.add_argument('--url',default='http://127.0.0.1:8000') + parser.add_argument('--timeout',type=float,default=330) + args=parser.parse_args() + payload={} if args.payload_base64 is None else loads(base64.b64decode(args.payload_base64,validate=True)) + if not isinstance(payload,dict):raise WireProtocolError('Payload must be a JSON object') + client=WireClient(args.url,args.timeout) + if args.operation=='reset':result=client.reset(**payload) + elif args.operation=='step':result=client.step(payload) + else: + if payload:raise WireProtocolError('Finish has no payload') + result=client.finish() + print(json.dumps(result,ensure_ascii=False,allow_nan=False,separators=(',',':'))) + + +if __name__=='__main__': + try:main() + except Exception as exc: + print(type(exc).__name__+': '+str(exc),file=sys.stderr) + raise SystemExit(1) diff --git a/components/math/upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile b/components/math/upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..06d0365485bd1fc9437a07fafe38cb8333e9ac65 --- /dev/null +++ b/components/math/upstream/construct-mc-costas-array-l3-s0/environment/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.11.16-slim +RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \ + && rm -rf /var/lib/apt/lists/* +RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \ + python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755 +WORKDIR /workdir +COPY instance.json /workdir/instance.json diff --git a/components/math/upstream/construct-mc-costas-array-l3-s0/environment/instance.json b/components/math/upstream/construct-mc-costas-array-l3-s0/environment/instance.json new file mode 100644 index 0000000000000000000000000000000000000000..7fca96f5ec81cf0dfeec2803134a197b7e1c2828 --- /dev/null +++ b/components/math/upstream/construct-mc-costas-array-l3-s0/environment/instance.json @@ -0,0 +1 @@ +{"n": 13, "fixed": [["x", 4, 3], ["x", 9, 1]], "family": "mc_costas_array", "subset": "construct"} \ No newline at end of file diff --git a/components/math/upstream/construct-mc-costas-array-l3-s0/instruction.md b/components/math/upstream/construct-mc-costas-array-l3-s0/instruction.md new file mode 100644 index 0000000000000000000000000000000000000000..87a2a979778baf8291e14e05e1849784b3072ccf --- /dev/null +++ b/components/math/upstream/construct-mc-costas-array-l3-s0/instruction.md @@ -0,0 +1,10 @@ +A Costas array of order 13 is a 13x13 grid with exactly one mark in every row and every column such that the displacement vectors between pairs of marks are all distinct. Encode it as a permutation x[0..12] of 0..12, where x[c] is the row of the mark in column c; the condition is that the vectors (j - i, x[j] - x[i]) over all column pairs i < j are pairwise distinct. + +Find a Costas array of order 13. + +Some values are fixed in advance and your answer must agree with them: +x[4] = 3, x[9] = 1 + +Answer format: {"x": [x_0, x_1, ..., x_12]} + +Write your final answer as JSON to `/workdir/answer.json`. The instance data is also in `/workdir/instance.json`. Only `/workdir/answer.json` is graded. There is no internet access. diff --git a/components/math/upstream/construct-mc-costas-array-l3-s0/task.toml b/components/math/upstream/construct-mc-costas-array-l3-s0/task.toml new file mode 100644 index 0000000000000000000000000000000000000000..caefc13f04143740a9350faa3f31dd6214558ca6 --- /dev/null +++ b/components/math/upstream/construct-mc-costas-array-l3-s0/task.toml @@ -0,0 +1,40 @@ +schema_version = "1.4" +artifacts = [] + +[task] +name = "rlmath/construct-mc-costas-array-l3-s0" +version = "0.2.0" +description = "construct/mc_costas_array" +authors = [] +keywords = ["rlmath", "construct", "mc_costas_array"] + +[metadata] +subset = "construct" +family = "mc_costas_array" +problem_key = "costas_array" +domain = "combinatorics" +tier = "competition" +level = "3" +source = "MathConstraint/costas_array" +source_license = "CC-BY-4.0" +tags = ["np_search"] + +[verifier] +timeout_sec = 300.0 + +[verifier.env] + +[agent] +timeout_sec = 900.0 + +[environment] +network_mode = "no-network" +build_timeout_sec = 600.0 +os = "linux" +cpus = 2 +memory_mb = 4096 +mcp_servers = [] + +[environment.env] + +[solution.env] diff --git a/components/math/upstream/construct-mc-costas-array-l3-s0/tests/check.py b/components/math/upstream/construct-mc-costas-array-l3-s0/tests/check.py new file mode 100644 index 0000000000000000000000000000000000000000..c86323a5b639b23787ecd4d5f358b986bbd91b6c --- /dev/null +++ b/components/math/upstream/construct-mc-costas-array-l3-s0/tests/check.py @@ -0,0 +1,22 @@ +"""Costas array of order n (MathConstraint costas_array, CC-BY-4.0). Accepts any valid array. +Adapted from pilot/grader.py check_costas; adds the optional fixed entries (upstream partial assignment).""" +import itertools + +from run import Invalid, int_list + + +def check(inst, ans): + n = inst["n"] + x = int_list(ans.get("x"), n, 0, n - 1, "x") + if sorted(x) != list(range(n)): + raise Invalid("x is not a permutation of 0..n-1") + for name, i, v in inst.get("fixed", []): + if x[i] != v: + raise Invalid(f"fixed value {name}[{i}] = {v} not respected") + vecs = set() + for i, j in itertools.combinations(range(n), 2): + d = (j - i, x[j] - x[i]) + if d in vecs: + raise Invalid(f"repeated displacement vector {d}") + vecs.add(d) + return None, {} diff --git a/components/math/upstream/construct-mc-costas-array-l3-s0/tests/instance.json b/components/math/upstream/construct-mc-costas-array-l3-s0/tests/instance.json new file mode 100644 index 0000000000000000000000000000000000000000..7fca96f5ec81cf0dfeec2803134a197b7e1c2828 --- /dev/null +++ b/components/math/upstream/construct-mc-costas-array-l3-s0/tests/instance.json @@ -0,0 +1 @@ +{"n": 13, "fixed": [["x", 4, 3], ["x", 9, 1]], "family": "mc_costas_array", "subset": "construct"} \ No newline at end of file diff --git a/components/math/upstream/construct-mc-costas-array-l3-s0/tests/run.py b/components/math/upstream/construct-mc-costas-array-l3-s0/tests/run.py new file mode 100644 index 0000000000000000000000000000000000000000..9f6db6107aa1f8132aeb1abdcf9bbf100792e48a --- /dev/null +++ b/components/math/upstream/construct-mc-costas-array-l3-s0/tests/run.py @@ -0,0 +1,127 @@ +"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py. + +Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only. + + python3 /tests/run.py /tests/instance.json /workdir/answer.json + +Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists. + +check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer. + construct : value is ignored; a returned check means the witness is valid -> reward 1.0 + optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where + progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize) + clip((baseline - s) / (baseline - best_known), 0, 1) (minimize) + inst must carry "direction", "baseline", "best_known". +""" +import json +import math +import os +import sys + +VALID_FLOOR = 0.1 + + +class Invalid(Exception): + pass + + +# ------------------------------------------------------------ input helpers + +def int_list(v, n=None, lo=None, hi=None, name="list"): + if not isinstance(v, list): + raise Invalid(f"{name} must be a list") + if n is not None and len(v) != n: + raise Invalid(f"{name} must have length {n}, got {len(v)}") + for x in v: + if isinstance(x, bool) or not isinstance(x, int): + raise Invalid(f"{name} must contain integers only") + if (lo is not None and x < lo) or (hi is not None and x > hi): + raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]") + return v + + +def as_int(x, name="value", lo=None, hi=None): + return int_list([x], 1, lo, hi, name)[0] + + +def num(x, name="value"): + if isinstance(x, bool) or not isinstance(x, (int, float)): + raise Invalid(f"{name} must be a number") + if not math.isfinite(x): + raise Invalid(f"{name} is not finite") + return float(x) + + +def float_matrix(v, rows=None, cols=None, name="matrix"): + if not isinstance(v, list) or (rows is not None and len(v) != rows): + raise Invalid(f"{name} must be a list of {rows} rows") + out = [] + for r in v: + if not isinstance(r, list) or (cols is not None and len(r) != cols): + raise Invalid(f"each row of {name} must have {cols} numbers") + out.append([num(x, name) for x in r]) + return out + + +def float_list(v, n=None, name="list"): + if not isinstance(v, list) or (n is not None and len(v) != n): + raise Invalid(f"{name} must be a list of length {n}") + return [num(x, name) for x in v] + + +# ------------------------------------------------------------------ reward + +def optimize_reward(inst, s): + b, best = inst["baseline"], inst["best_known"] + if inst.get("progress_scale") == "log": + # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0); + # progress is measured in log10(value + floor) + f = inst.get("log_floor", 1e-3) + b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s)) + if inst["direction"] == "maximize": + p = (s - b) / (best - b) + else: + p = (b - s) / (b - best) + return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p)) + + +def grade(inst, ans, check): + try: + if not isinstance(ans, dict): + raise Invalid("answer must be a JSON object") + value, extra = check(inst, ans) + if inst.get("subset") == "optimize": + s = float(value) + if not math.isfinite(s): + raise Invalid("non-finite score") + return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})} + return 1.0, {"valid": True, **(extra or {})} + except Invalid as e: + return 0.0, {"valid": False, "error": str(e)} + except Exception as e: # any malformed answer + return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"} + + +def main(): + here = os.path.dirname(os.path.abspath(__file__)) + sys.path.insert(0, here) + # import ourselves as `run` so check.py's `from run import Invalid` is the same class + import run as R # noqa: E402 + import check as family # noqa: E402 + + inst = json.load(open(sys.argv[1])) + try: + ans = json.load(open(sys.argv[2])) + except Exception as e: + reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"} + else: + reward, det = R.grade(inst, ans, family.check) + det["reward"] = reward + if os.path.isdir("/logs/verifier"): + with open("/logs/verifier/details.json", "w") as f: + json.dump(det, f) + print(reward) + + +if __name__ == "__main__": + main() diff --git a/components/math/upstream/construct-mc-costas-array-l3-s0/tests/test.sh b/components/math/upstream/construct-mc-costas-array-l3-s0/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..648521fa89684f62943a573f74ce3cb75cd3ae29 --- /dev/null +++ b/components/math/upstream/construct-mc-costas-array-l3-s0/tests/test.sh @@ -0,0 +1,9 @@ +#!/bin/bash +mkdir -p /logs/verifier +if [ ! -s /workdir/answer.json ]; then + echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json + echo 0 > /logs/verifier/reward.txt + exit 0 +fi +timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \ + > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt diff --git a/components/math/upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile b/components/math/upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..06d0365485bd1fc9437a07fafe38cb8333e9ac65 --- /dev/null +++ b/components/math/upstream/construct-mc-ramsey-l4-s0/environment/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.11.16-slim +RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \ + && rm -rf /var/lib/apt/lists/* +RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \ + python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755 +WORKDIR /workdir +COPY instance.json /workdir/instance.json diff --git a/components/math/upstream/construct-mc-ramsey-l4-s0/environment/instance.json b/components/math/upstream/construct-mc-ramsey-l4-s0/environment/instance.json new file mode 100644 index 0000000000000000000000000000000000000000..dc8ee4a92c5a25d8d578135453441672dd8b3445 --- /dev/null +++ b/components/math/upstream/construct-mc-ramsey-l4-s0/environment/instance.json @@ -0,0 +1 @@ +{"n": 21, "r": 3, "s": 7, "fixed": [], "family": "mc_ramsey", "subset": "construct"} \ No newline at end of file diff --git a/components/math/upstream/construct-mc-ramsey-l4-s0/instruction.md b/components/math/upstream/construct-mc-ramsey-l4-s0/instruction.md new file mode 100644 index 0000000000000000000000000000000000000000..e493572bd4b0e6ba8ec8b38c7966627c7c62a83f --- /dev/null +++ b/components/math/upstream/construct-mc-ramsey-l4-s0/instruction.md @@ -0,0 +1,5 @@ +Colour each of the 210 edges of the complete graph K_21 (vertices 0..20) with colour 0 or 1 so that there is no set of 3 vertices whose connecting edges all have colour 0, and no set of 7 vertices whose connecting edges all have colour 1. + +Answer format: {"colors": [c_0, ..., c_209]}, one entry (0 or 1) per edge (i, j) with 0 <= i < j < 21, in lexicographic order ((0,1), (0,2), ..., (0,20), (1,2), ..., (19,20)). + +Write your final answer as JSON to `/workdir/answer.json`. The instance data is also in `/workdir/instance.json`. Only `/workdir/answer.json` is graded. There is no internet access. diff --git a/components/math/upstream/construct-mc-ramsey-l4-s0/task.toml b/components/math/upstream/construct-mc-ramsey-l4-s0/task.toml new file mode 100644 index 0000000000000000000000000000000000000000..f5029db45b1ed5d6bf26a4b7d334d27c178c3d8a --- /dev/null +++ b/components/math/upstream/construct-mc-ramsey-l4-s0/task.toml @@ -0,0 +1,40 @@ +schema_version = "1.4" +artifacts = [] + +[task] +name = "rlmath/construct-mc-ramsey-l4-s0" +version = "0.2.0" +description = "construct/mc_ramsey" +authors = [] +keywords = ["rlmath", "construct", "mc_ramsey"] + +[metadata] +subset = "construct" +family = "mc_ramsey" +problem_key = "ramsey_two_colouring" +domain = "combinatorics" +tier = "competition" +level = "4" +source = "MathConstraint/ramsey" +source_license = "CC-BY-4.0" +tags = ["np_search"] + +[verifier] +timeout_sec = 300.0 + +[verifier.env] + +[agent] +timeout_sec = 900.0 + +[environment] +network_mode = "no-network" +build_timeout_sec = 600.0 +os = "linux" +cpus = 2 +memory_mb = 4096 +mcp_servers = [] + +[environment.env] + +[solution.env] diff --git a/components/math/upstream/construct-mc-ramsey-l4-s0/tests/check.py b/components/math/upstream/construct-mc-ramsey-l4-s0/tests/check.py new file mode 100644 index 0000000000000000000000000000000000000000..53526c0bc87af6298219d3e1eac5f95f01b57541 --- /dev/null +++ b/components/math/upstream/construct-mc-ramsey-l4-s0/tests/check.py @@ -0,0 +1,31 @@ +"""Two-colouring of the edges of K_n with no colour-0 K_r and no colour-1 K_s (MathConstraint ramsey, +CC-BY-4.0). Adapted from pilot/grader.py check_ramsey; adds the optional fixed edge colours.""" +import itertools + +from run import Invalid, int_list + + +def check(inst, ans): + n, r, s = inst["n"], inst["r"], inst["s"] + edges = list(itertools.combinations(range(n), 2)) + col = int_list(ans.get("colors"), len(edges), 0, 1, "colors") + for name, i, v in inst.get("fixed", []): + if col[i] != v: + raise Invalid(f"fixed value {name}[{i}] = {v} not respected") + c = {e: col[i] for i, e in enumerate(edges)} + for k, colour in ((r, 0), (s, 1)): + adj = {v: {u for u in range(n) if u != v and c[(min(u, v), max(u, v))] == colour} for v in range(n)} + + def grow(size, cand): + if size == k: + return True + if size + len(cand) < k: + return False + for v in sorted(cand): + if grow(size + 1, {u for u in cand if u > v} & adj[v]): + return True + return False + + if grow(0, set(range(n))): + raise Invalid(f"monochromatic K_{k} in colour {colour}") + return None, {} diff --git a/components/math/upstream/construct-mc-ramsey-l4-s0/tests/instance.json b/components/math/upstream/construct-mc-ramsey-l4-s0/tests/instance.json new file mode 100644 index 0000000000000000000000000000000000000000..dc8ee4a92c5a25d8d578135453441672dd8b3445 --- /dev/null +++ b/components/math/upstream/construct-mc-ramsey-l4-s0/tests/instance.json @@ -0,0 +1 @@ +{"n": 21, "r": 3, "s": 7, "fixed": [], "family": "mc_ramsey", "subset": "construct"} \ No newline at end of file diff --git a/components/math/upstream/construct-mc-ramsey-l4-s0/tests/run.py b/components/math/upstream/construct-mc-ramsey-l4-s0/tests/run.py new file mode 100644 index 0000000000000000000000000000000000000000..9f6db6107aa1f8132aeb1abdcf9bbf100792e48a --- /dev/null +++ b/components/math/upstream/construct-mc-ramsey-l4-s0/tests/run.py @@ -0,0 +1,127 @@ +"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py. + +Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only. + + python3 /tests/run.py /tests/instance.json /workdir/answer.json + +Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists. + +check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer. + construct : value is ignored; a returned check means the witness is valid -> reward 1.0 + optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where + progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize) + clip((baseline - s) / (baseline - best_known), 0, 1) (minimize) + inst must carry "direction", "baseline", "best_known". +""" +import json +import math +import os +import sys + +VALID_FLOOR = 0.1 + + +class Invalid(Exception): + pass + + +# ------------------------------------------------------------ input helpers + +def int_list(v, n=None, lo=None, hi=None, name="list"): + if not isinstance(v, list): + raise Invalid(f"{name} must be a list") + if n is not None and len(v) != n: + raise Invalid(f"{name} must have length {n}, got {len(v)}") + for x in v: + if isinstance(x, bool) or not isinstance(x, int): + raise Invalid(f"{name} must contain integers only") + if (lo is not None and x < lo) or (hi is not None and x > hi): + raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]") + return v + + +def as_int(x, name="value", lo=None, hi=None): + return int_list([x], 1, lo, hi, name)[0] + + +def num(x, name="value"): + if isinstance(x, bool) or not isinstance(x, (int, float)): + raise Invalid(f"{name} must be a number") + if not math.isfinite(x): + raise Invalid(f"{name} is not finite") + return float(x) + + +def float_matrix(v, rows=None, cols=None, name="matrix"): + if not isinstance(v, list) or (rows is not None and len(v) != rows): + raise Invalid(f"{name} must be a list of {rows} rows") + out = [] + for r in v: + if not isinstance(r, list) or (cols is not None and len(r) != cols): + raise Invalid(f"each row of {name} must have {cols} numbers") + out.append([num(x, name) for x in r]) + return out + + +def float_list(v, n=None, name="list"): + if not isinstance(v, list) or (n is not None and len(v) != n): + raise Invalid(f"{name} must be a list of length {n}") + return [num(x, name) for x in v] + + +# ------------------------------------------------------------------ reward + +def optimize_reward(inst, s): + b, best = inst["baseline"], inst["best_known"] + if inst.get("progress_scale") == "log": + # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0); + # progress is measured in log10(value + floor) + f = inst.get("log_floor", 1e-3) + b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s)) + if inst["direction"] == "maximize": + p = (s - b) / (best - b) + else: + p = (b - s) / (b - best) + return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p)) + + +def grade(inst, ans, check): + try: + if not isinstance(ans, dict): + raise Invalid("answer must be a JSON object") + value, extra = check(inst, ans) + if inst.get("subset") == "optimize": + s = float(value) + if not math.isfinite(s): + raise Invalid("non-finite score") + return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})} + return 1.0, {"valid": True, **(extra or {})} + except Invalid as e: + return 0.0, {"valid": False, "error": str(e)} + except Exception as e: # any malformed answer + return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"} + + +def main(): + here = os.path.dirname(os.path.abspath(__file__)) + sys.path.insert(0, here) + # import ourselves as `run` so check.py's `from run import Invalid` is the same class + import run as R # noqa: E402 + import check as family # noqa: E402 + + inst = json.load(open(sys.argv[1])) + try: + ans = json.load(open(sys.argv[2])) + except Exception as e: + reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"} + else: + reward, det = R.grade(inst, ans, family.check) + det["reward"] = reward + if os.path.isdir("/logs/verifier"): + with open("/logs/verifier/details.json", "w") as f: + json.dump(det, f) + print(reward) + + +if __name__ == "__main__": + main() diff --git a/components/math/upstream/construct-mc-ramsey-l4-s0/tests/test.sh b/components/math/upstream/construct-mc-ramsey-l4-s0/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..648521fa89684f62943a573f74ce3cb75cd3ae29 --- /dev/null +++ b/components/math/upstream/construct-mc-ramsey-l4-s0/tests/test.sh @@ -0,0 +1,9 @@ +#!/bin/bash +mkdir -p /logs/verifier +if [ ! -s /workdir/answer.json ]; then + echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json + echo 0 > /logs/verifier/reward.txt + exit 0 +fi +timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \ + > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt diff --git a/components/math/upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile b/components/math/upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..06d0365485bd1fc9437a07fafe38cb8333e9ac65 --- /dev/null +++ b/components/math/upstream/construct-mc-social-golfers-l4-s0/environment/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.11.16-slim +RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \ + && rm -rf /var/lib/apt/lists/* +RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \ + python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755 +WORKDIR /workdir +COPY instance.json /workdir/instance.json diff --git a/components/math/upstream/construct-mc-social-golfers-l4-s0/environment/instance.json b/components/math/upstream/construct-mc-social-golfers-l4-s0/environment/instance.json new file mode 100644 index 0000000000000000000000000000000000000000..b5bb15ce6f0e59ce258b2adcc5ebf820a6d8297e --- /dev/null +++ b/components/math/upstream/construct-mc-social-golfers-l4-s0/environment/instance.json @@ -0,0 +1 @@ +{"n_groups": 8, "group_size": 3, "n_weeks": 8, "family": "mc_social_golfers", "subset": "construct"} \ No newline at end of file diff --git a/components/math/upstream/construct-mc-social-golfers-l4-s0/instruction.md b/components/math/upstream/construct-mc-social-golfers-l4-s0/instruction.md new file mode 100644 index 0000000000000000000000000000000000000000..d5108fc957e694c72086c17ecb8204c638261e41 --- /dev/null +++ b/components/math/upstream/construct-mc-social-golfers-l4-s0/instruction.md @@ -0,0 +1,7 @@ +Schedule 24 golfers (numbered 0..23) for 8 weeks. Every week the golfers are split into 8 groups (numbered 0..7) of exactly 3 golfers each. No two golfers may play in the same group in more than one week. + +Find such a schedule. + +Answer format: {"schedule": [week_0, ..., week_7]} where week_t is a list of 24 integers and week_t[p] (in 0..7) is the group of golfer p in week t + +Write your final answer as JSON to `/workdir/answer.json`. The instance data is also in `/workdir/instance.json`. Only `/workdir/answer.json` is graded. There is no internet access. diff --git a/components/math/upstream/construct-mc-social-golfers-l4-s0/task.toml b/components/math/upstream/construct-mc-social-golfers-l4-s0/task.toml new file mode 100644 index 0000000000000000000000000000000000000000..c648720e4fd3644fc2ebc88337e4a03cfb03cd91 --- /dev/null +++ b/components/math/upstream/construct-mc-social-golfers-l4-s0/task.toml @@ -0,0 +1,40 @@ +schema_version = "1.4" +artifacts = [] + +[task] +name = "rlmath/construct-mc-social-golfers-l4-s0" +version = "0.2.0" +description = "construct/mc_social_golfers" +authors = [] +keywords = ["rlmath", "construct", "mc_social_golfers"] + +[metadata] +subset = "construct" +family = "mc_social_golfers" +problem_key = "social_golfer" +domain = "combinatorics" +tier = "competition" +level = "4" +source = "MathConstraint/social_golfers" +source_license = "CC-BY-4.0" +tags = ["np_search"] + +[verifier] +timeout_sec = 300.0 + +[verifier.env] + +[agent] +timeout_sec = 900.0 + +[environment] +network_mode = "no-network" +build_timeout_sec = 600.0 +os = "linux" +cpus = 2 +memory_mb = 4096 +mcp_servers = [] + +[environment.env] + +[solution.env] diff --git a/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/check.py b/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/check.py new file mode 100644 index 0000000000000000000000000000000000000000..73977815b7b6094a8491075b6dc2ae1293e44930 --- /dev/null +++ b/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/check.py @@ -0,0 +1,25 @@ +"""Social golfer problem (MathConstraint social_golfers, CSPLib prob010, CC-BY-4.0): each week partition +the g*s players into g groups of size s; no two players share a group in more than one week.""" +from run import Invalid, int_list + + +def check(inst, ans): + g, s, w = inst["n_groups"], inst["group_size"], inst["n_weeks"] + P = g * s + sched = ans.get("schedule") + if not isinstance(sched, list) or len(sched) != w: + raise Invalid(f"schedule must be a list of {w} weeks") + met = set() + for wk, row in enumerate(sched): + row = int_list(row, P, 0, g - 1, f"week {wk}") + groups = [[p for p in range(P) if row[p] == grp] for grp in range(g)] + for grp, mem in enumerate(groups): + if len(mem) != s: + raise Invalid(f"week {wk}: group {grp} has {len(mem)} players, need {s}") + for i in range(s): + for j in range(i + 1, s): + pr = (mem[i], mem[j]) + if pr in met: + raise Invalid(f"players {pr} play together in more than one week") + met.add(pr) + return None, {} diff --git a/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/instance.json b/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/instance.json new file mode 100644 index 0000000000000000000000000000000000000000..b5bb15ce6f0e59ce258b2adcc5ebf820a6d8297e --- /dev/null +++ b/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/instance.json @@ -0,0 +1 @@ +{"n_groups": 8, "group_size": 3, "n_weeks": 8, "family": "mc_social_golfers", "subset": "construct"} \ No newline at end of file diff --git a/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/run.py b/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/run.py new file mode 100644 index 0000000000000000000000000000000000000000..9f6db6107aa1f8132aeb1abdcf9bbf100792e48a --- /dev/null +++ b/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/run.py @@ -0,0 +1,127 @@ +"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py. + +Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only. + + python3 /tests/run.py /tests/instance.json /workdir/answer.json + +Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists. + +check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer. + construct : value is ignored; a returned check means the witness is valid -> reward 1.0 + optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where + progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize) + clip((baseline - s) / (baseline - best_known), 0, 1) (minimize) + inst must carry "direction", "baseline", "best_known". +""" +import json +import math +import os +import sys + +VALID_FLOOR = 0.1 + + +class Invalid(Exception): + pass + + +# ------------------------------------------------------------ input helpers + +def int_list(v, n=None, lo=None, hi=None, name="list"): + if not isinstance(v, list): + raise Invalid(f"{name} must be a list") + if n is not None and len(v) != n: + raise Invalid(f"{name} must have length {n}, got {len(v)}") + for x in v: + if isinstance(x, bool) or not isinstance(x, int): + raise Invalid(f"{name} must contain integers only") + if (lo is not None and x < lo) or (hi is not None and x > hi): + raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]") + return v + + +def as_int(x, name="value", lo=None, hi=None): + return int_list([x], 1, lo, hi, name)[0] + + +def num(x, name="value"): + if isinstance(x, bool) or not isinstance(x, (int, float)): + raise Invalid(f"{name} must be a number") + if not math.isfinite(x): + raise Invalid(f"{name} is not finite") + return float(x) + + +def float_matrix(v, rows=None, cols=None, name="matrix"): + if not isinstance(v, list) or (rows is not None and len(v) != rows): + raise Invalid(f"{name} must be a list of {rows} rows") + out = [] + for r in v: + if not isinstance(r, list) or (cols is not None and len(r) != cols): + raise Invalid(f"each row of {name} must have {cols} numbers") + out.append([num(x, name) for x in r]) + return out + + +def float_list(v, n=None, name="list"): + if not isinstance(v, list) or (n is not None and len(v) != n): + raise Invalid(f"{name} must be a list of length {n}") + return [num(x, name) for x in v] + + +# ------------------------------------------------------------------ reward + +def optimize_reward(inst, s): + b, best = inst["baseline"], inst["best_known"] + if inst.get("progress_scale") == "log": + # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0); + # progress is measured in log10(value + floor) + f = inst.get("log_floor", 1e-3) + b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s)) + if inst["direction"] == "maximize": + p = (s - b) / (best - b) + else: + p = (b - s) / (b - best) + return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p)) + + +def grade(inst, ans, check): + try: + if not isinstance(ans, dict): + raise Invalid("answer must be a JSON object") + value, extra = check(inst, ans) + if inst.get("subset") == "optimize": + s = float(value) + if not math.isfinite(s): + raise Invalid("non-finite score") + return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})} + return 1.0, {"valid": True, **(extra or {})} + except Invalid as e: + return 0.0, {"valid": False, "error": str(e)} + except Exception as e: # any malformed answer + return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"} + + +def main(): + here = os.path.dirname(os.path.abspath(__file__)) + sys.path.insert(0, here) + # import ourselves as `run` so check.py's `from run import Invalid` is the same class + import run as R # noqa: E402 + import check as family # noqa: E402 + + inst = json.load(open(sys.argv[1])) + try: + ans = json.load(open(sys.argv[2])) + except Exception as e: + reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"} + else: + reward, det = R.grade(inst, ans, family.check) + det["reward"] = reward + if os.path.isdir("/logs/verifier"): + with open("/logs/verifier/details.json", "w") as f: + json.dump(det, f) + print(reward) + + +if __name__ == "__main__": + main() diff --git a/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/test.sh b/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..648521fa89684f62943a573f74ce3cb75cd3ae29 --- /dev/null +++ b/components/math/upstream/construct-mc-social-golfers-l4-s0/tests/test.sh @@ -0,0 +1,9 @@ +#!/bin/bash +mkdir -p /logs/verifier +if [ ! -s /workdir/answer.json ]; then + echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json + echo 0 > /logs/verifier/reward.txt + exit 0 +fi +timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \ + > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt diff --git a/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..06d0365485bd1fc9437a07fafe38cb8333e9ac65 --- /dev/null +++ b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.11.16-slim +RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \ + && rm -rf /var/lib/apt/lists/* +RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \ + python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755 +WORKDIR /workdir +COPY instance.json /workdir/instance.json diff --git a/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json new file mode 100644 index 0000000000000000000000000000000000000000..f321e6f632e6d127a1b57dd0b17f229e15d5bb65 --- /dev/null +++ b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/environment/instance.json @@ -0,0 +1 @@ +{"W": [9, 12, 15, 6, 12, 3, 9, 17, 16], "family": "rlve_round_robin_scores", "subset": "construct"} \ No newline at end of file diff --git a/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md new file mode 100644 index 0000000000000000000000000000000000000000..c9362de338fb683bdbbb64b101e587c3d3d77459 --- /dev/null +++ b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/instruction.md @@ -0,0 +1,10 @@ +Construct an 9 x 9 matrix A (0-indexed) with entries in {0, 1, 2} such that +1. A[i][i] = 0 for all i; +2. A[i][j] + A[j][i] = 2 for all i != j; +3. W[i] = 3 * #{j : A[i][j] = 2} + 1 * #{j : A[i][j] = 1} equals the target below for every i. + +Target W = [9, 12, 15, 6, 12, 3, 9, 17, 16] (W[0], ..., W[8]) + +Answer format: {"A": [row_0, ..., row_8]} where each row is a string of 9 digits from 0/1/2 + +Write your final answer as JSON to `/workdir/answer.json`. The instance data is also in `/workdir/instance.json`. Only `/workdir/answer.json` is graded. There is no internet access. diff --git a/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/task.toml b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/task.toml new file mode 100644 index 0000000000000000000000000000000000000000..526ac09d25ad13b1d6421b80f643b331e635bf17 --- /dev/null +++ b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/task.toml @@ -0,0 +1,40 @@ +schema_version = "1.4" +artifacts = [] + +[task] +name = "rlmath/construct-rlve-round-robin-scores-l3-s0" +version = "0.2.0" +description = "construct/rlve_round_robin_scores" +authors = [] +keywords = ["rlmath", "construct", "rlve_round_robin_scores"] + +[metadata] +subset = "construct" +family = "rlve_round_robin_scores" +problem_key = "tournament_score_realisation_3_1_0" +domain = "combinatorics" +tier = "competition" +level = "3" +source = "RLVE-Gym/round_robin" +source_license = "MIT" +tags = ["agentic_trivial"] + +[verifier] +timeout_sec = 300.0 + +[verifier.env] + +[agent] +timeout_sec = 900.0 + +[environment] +network_mode = "no-network" +build_timeout_sec = 600.0 +os = "linux" +cpus = 2 +memory_mb = 4096 +mcp_servers = [] + +[environment.env] + +[solution.env] diff --git a/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py new file mode 100644 index 0000000000000000000000000000000000000000..214446acaa90ce170daad3989b42317353060f9d --- /dev/null +++ b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/check.py @@ -0,0 +1,24 @@ +from run import Invalid + + +def check(inst, ans): + W = inst["W"] + n = len(W) + A = ans.get("A") + if not isinstance(A, list) or len(A) != n: + raise Invalid(f"A must be a list of {n} strings") + for r in A: + if not isinstance(r, str) or len(r) != n or set(r) - {"0", "1", "2"}: + raise Invalid(f"each row must be a string of {n} digits 0/1/2") + for i in range(n): + if A[i][i] != "0": + raise Invalid("diagonal must be 0") + w = 0 + for j in range(n): + if i != j: + if int(A[i][j]) + int(A[j][i]) != 2: + raise Invalid(f"A[{i}][{j}] + A[{j}][{i}] != 2") + w += 3 * (A[i][j] == "2") + (A[i][j] == "1") + if w != W[i]: + raise Invalid(f"W[{i}] = {w}, need {W[i]}") + return None, {} diff --git a/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json new file mode 100644 index 0000000000000000000000000000000000000000..f321e6f632e6d127a1b57dd0b17f229e15d5bb65 --- /dev/null +++ b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/instance.json @@ -0,0 +1 @@ +{"W": [9, 12, 15, 6, 12, 3, 9, 17, 16], "family": "rlve_round_robin_scores", "subset": "construct"} \ No newline at end of file diff --git a/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py new file mode 100644 index 0000000000000000000000000000000000000000..9f6db6107aa1f8132aeb1abdcf9bbf100792e48a --- /dev/null +++ b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/run.py @@ -0,0 +1,127 @@ +"""rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py. + +Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only. + + python3 /tests/run.py /tests/instance.json /workdir/answer.json + +Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists. + +check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer. + construct : value is ignored; a returned check means the witness is valid -> reward 1.0 + optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where + progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize) + clip((baseline - s) / (baseline - best_known), 0, 1) (minimize) + inst must carry "direction", "baseline", "best_known". +""" +import json +import math +import os +import sys + +VALID_FLOOR = 0.1 + + +class Invalid(Exception): + pass + + +# ------------------------------------------------------------ input helpers + +def int_list(v, n=None, lo=None, hi=None, name="list"): + if not isinstance(v, list): + raise Invalid(f"{name} must be a list") + if n is not None and len(v) != n: + raise Invalid(f"{name} must have length {n}, got {len(v)}") + for x in v: + if isinstance(x, bool) or not isinstance(x, int): + raise Invalid(f"{name} must contain integers only") + if (lo is not None and x < lo) or (hi is not None and x > hi): + raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]") + return v + + +def as_int(x, name="value", lo=None, hi=None): + return int_list([x], 1, lo, hi, name)[0] + + +def num(x, name="value"): + if isinstance(x, bool) or not isinstance(x, (int, float)): + raise Invalid(f"{name} must be a number") + if not math.isfinite(x): + raise Invalid(f"{name} is not finite") + return float(x) + + +def float_matrix(v, rows=None, cols=None, name="matrix"): + if not isinstance(v, list) or (rows is not None and len(v) != rows): + raise Invalid(f"{name} must be a list of {rows} rows") + out = [] + for r in v: + if not isinstance(r, list) or (cols is not None and len(r) != cols): + raise Invalid(f"each row of {name} must have {cols} numbers") + out.append([num(x, name) for x in r]) + return out + + +def float_list(v, n=None, name="list"): + if not isinstance(v, list) or (n is not None and len(v) != n): + raise Invalid(f"{name} must be a list of length {n}") + return [num(x, name) for x in v] + + +# ------------------------------------------------------------------ reward + +def optimize_reward(inst, s): + b, best = inst["baseline"], inst["best_known"] + if inst.get("progress_scale") == "log": + # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0); + # progress is measured in log10(value + floor) + f = inst.get("log_floor", 1e-3) + b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s)) + if inst["direction"] == "maximize": + p = (s - b) / (best - b) + else: + p = (b - s) / (b - best) + return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p)) + + +def grade(inst, ans, check): + try: + if not isinstance(ans, dict): + raise Invalid("answer must be a JSON object") + value, extra = check(inst, ans) + if inst.get("subset") == "optimize": + s = float(value) + if not math.isfinite(s): + raise Invalid("non-finite score") + return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})} + return 1.0, {"valid": True, **(extra or {})} + except Invalid as e: + return 0.0, {"valid": False, "error": str(e)} + except Exception as e: # any malformed answer + return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"} + + +def main(): + here = os.path.dirname(os.path.abspath(__file__)) + sys.path.insert(0, here) + # import ourselves as `run` so check.py's `from run import Invalid` is the same class + import run as R # noqa: E402 + import check as family # noqa: E402 + + inst = json.load(open(sys.argv[1])) + try: + ans = json.load(open(sys.argv[2])) + except Exception as e: + reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"} + else: + reward, det = R.grade(inst, ans, family.check) + det["reward"] = reward + if os.path.isdir("/logs/verifier"): + with open("/logs/verifier/details.json", "w") as f: + json.dump(det, f) + print(reward) + + +if __name__ == "__main__": + main() diff --git a/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..648521fa89684f62943a573f74ce3cb75cd3ae29 --- /dev/null +++ b/components/math/upstream/construct-rlve-round-robin-scores-l3-s0/tests/test.sh @@ -0,0 +1,9 @@ +#!/bin/bash +mkdir -p /logs/verifier +if [ ! -s /workdir/answer.json ]; then + echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json + echo 0 > /logs/verifier/reward.txt + exit 0 +fi +timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \ + > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt diff --git a/components/mimo-code/README.txt b/components/mimo-code/README.txt new file mode 100644 index 0000000000000000000000000000000000000000..78a371d3d3490300862b7ecd29a22f930d82d8cf --- /dev/null +++ b/components/mimo-code/README.txt @@ -0,0 +1,5 @@ +MiMo software repair tasks. +candidate-1005-software-systems: Requests file-object and request behavior repair. +candidate-1001-security-forensics: Plaso registry value decoding and error recovery. +Interface: exec and finish. Per task: 1 CPU, 2 GiB RAM, 900 seconds for the rollout, and 240 seconds for verification. +source_bundle/source and source-other contain instructions and tests; pristine and pristine-other contain initial code; runtime contains the OpenEnv adapters. Dependency versions are recorded in SDK_DEPENDENCIES.json. diff --git a/components/mimo-code/SDK_DEPENDENCIES.json b/components/mimo-code/SDK_DEPENDENCIES.json new file mode 100644 index 0000000000000000000000000000000000000000..b57732bb502e33b63bea9ff612f4123077d80330 --- /dev/null +++ b/components/mimo-code/SDK_DEPENDENCIES.json @@ -0,0 +1,667 @@ +{ + "openenv_revision": "86a180ede21e044f7929b9a7783ad83aa67d83a3", + "openenv_wheel_sha256": "93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a", + "python": "3.11", + "wheels": { + "pycparser": { + "version": "3.11", + "sha256": "51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", + "filename": "pycparser-3.11-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "keyring": { + "version": "25.7.0", + "sha256": "be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", + "filename": "keyring-25.7.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "huggingface-hub": { + "version": "2.2.0", + "sha256": "1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3", + "filename": "huggingface_hub-2.2.0-py3-none-any.whl", + "requires_python": ">=3.10.0" + }, + "safehttpx": { + "version": "0.1.7", + "sha256": "c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde", + "filename": "safehttpx-0.1.7-py3-none-any.whl", + "requires_python": ">3.9" + }, + "truststore": { + "version": "0.10.4", + "sha256": "adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981", + "filename": "truststore-0.10.4-py3-none-any.whl", + "requires_python": ">= 3.10" + }, + "urllib3": { + "version": "2.8.0", + "sha256": "0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", + "filename": "urllib3-2.8.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "python-dotenv": { + "version": "1.2.4", + "sha256": "42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", + "filename": "python_dotenv-1.2.4-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "more-itertools": { + "version": "11.1.0", + "sha256": "4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192", + "filename": "more_itertools-11.1.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "idna": { + "version": "3.20", + "sha256": "ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", + "filename": "idna-3.20-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "cryptography": { + "version": "50.0.2", + "sha256": "4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856", + "filename": "cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", + "requires_python": ">=3.9, !=3.9.0, !=3.9.1" + }, + "httpx-sse": { + "version": "0.4.3", + "sha256": "0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc", + "filename": "httpx_sse-0.4.3-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "packaging": { + "version": "26.3", + "sha256": "d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", + "filename": "packaging-26.3-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "jaraco.classes": { + "version": "3.4.0", + "sha256": "f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790", + "filename": "jaraco.classes-3.4.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "tomli-w": { + "version": "1.2.0", + "sha256": "188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", + "filename": "tomli_w-1.2.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "uncalled-for": { + "version": "0.4.1", + "sha256": "b611b38879d9fe5088297e7bb28f2ddd12d2d73dad933d93da107fb63eb4058e", + "filename": "uncalled_for-0.4.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "beartype": { + "version": "0.23.0", + "sha256": "a88b85be516c064d4de2b42045a258a43be97bce5cbc18b777f332027c0979f7", + "filename": "beartype-0.23.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "openai": { + "version": "3.28.0", + "sha256": "1ea40a084ffe2f9f16fd3bea6e870f757853b536b18d8e737c518ef849a2920c", + "filename": "openai-3.28.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "pydantic-settings": { + "version": "2.15.0", + "sha256": "0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42", + "filename": "pydantic_settings-2.15.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "openapi-pydantic": { + "version": "0.6.0", + "sha256": "8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3", + "filename": "openapi_pydantic-0.6.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "httpcore": { + "version": "1.0.9", + "sha256": "2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", + "filename": "httpcore-1.0.9-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "exceptiongroup": { + "version": "1.3.1", + "sha256": "a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", + "filename": "exceptiongroup-1.3.1-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "rich-rst": { + "version": "2.2.0", + "sha256": "1ea1c43813dc4a8d86475fce27ffb74e0ada3d4656c9f8130ba2a59868055fe9", + "filename": "rich_rst-2.2.0-py3-none-any.whl", + "requires_python": null + }, + "starlette": { + "version": "1.7.0", + "sha256": "67f8e99895493dd2911a03f11314af6ceebeae4e704bb9f43dfc6a9db151c93e", + "filename": "starlette-1.7.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "secretstorage": { + "version": "3.5.0", + "sha256": "0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", + "filename": "secretstorage-3.5.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "annotated-doc": { + "version": "0.0.5", + "sha256": "117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101", + "filename": "annotated_doc-0.0.5-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "rpds-py": { + "version": "2026.9.1", + "sha256": "136a1c3fe4402b7008bc81cb62ee538481795b61a7e83df88dff3b3f02b726ff", + "filename": "rpds_py-2026.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.11" + }, + "markdown-it-py": { + "version": "4.2.0", + "sha256": "9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a", + "filename": "markdown_it_py-4.2.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "mdurl": { + "version": "0.1.2", + "sha256": "84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", + "filename": "mdurl-0.1.2-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "pandas": { + "version": "3.0.6", + "sha256": "47121f9571503f724c9b93e297ab6254ac99c77adf5e9ed085ea419fd585c258", + "filename": "pandas-3.0.6-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.11" + }, + "jsonschema-specifications": { + "version": "2025.9.1", + "sha256": "98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", + "filename": "jsonschema_specifications-2025.9.1-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "griffelib": { + "version": "2.3.2", + "sha256": "8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274", + "filename": "griffelib-2.3.2-py3-none-any.whl", + "requires_python": ">=3.11" + }, + "tomlkit": { + "version": "0.14.0", + "sha256": "592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680", + "filename": "tomlkit-0.14.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "gradio": { + "version": "6.30.0", + "sha256": "aae3aa81ec9f44e55781b498ad2ba12b117aa512e8d2bb0ef3e52af7f2ee6305", + "filename": "gradio-6.30.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "zipp": { + "version": "4.1.1", + "sha256": "8979f52d874162f485ff2981e3891f3a3317b7a3dd43ff1e1775b9304f307a9c", + "filename": "zipp-4.1.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "docstring-parser": { + "version": "0.18.0", + "sha256": "b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b", + "filename": "docstring_parser-0.18.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "semantic-version": { + "version": "2.10.0", + "sha256": "de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177", + "filename": "semantic_version-2.10.0-py2.py3-none-any.whl", + "requires_python": ">=2.7" + }, + "jsonschema-path": { + "version": "0.5.0", + "sha256": "2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2", + "filename": "jsonschema_path-0.5.0-py3-none-any.whl", + "requires_python": ">=3.10,<4.0.0" + }, + "brotli": { + "version": "1.2.0", + "sha256": "40d918bce2b427a0c4ba189df7a006ac0c7277c180aee4617d99e9ccaaf59e6a", + "filename": "brotli-1.2.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "requires_python": null + }, + "markupsafe": { + "version": "3.0.4", + "sha256": "6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808", + "filename": "markupsafe-3.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.9" + }, + "orjson": { + "version": "3.13.0", + "sha256": "89bcf2d4bc6c9a7e1763c8cf534f38712e66b76a0fefda7fb7785462f0d635e4", + "filename": "orjson-3.13.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.10" + }, + "importlib-metadata": { + "version": "9.0.1", + "sha256": "bba5600596a7e21f3eef53281cf28d6a5195634d2f2b78ff9501a3272c6eaab0", + "filename": "importlib_metadata-9.0.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "py-key-value-aio": { + "version": "0.4.6", + "sha256": "820b30c7959fc738ea3d00160cdb10cd258f51e38737b2add530defeea1ded77", + "filename": "py_key_value_aio-0.4.6-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "joserfc": { + "version": "1.7.5", + "sha256": "add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159", + "filename": "joserfc-1.7.5-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "dnspython": { + "version": "2.9.0", + "sha256": "9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9", + "filename": "dnspython-2.9.0-py3-none-any.whl", + "requires_python": ">=3.11" + }, + "tomli": { + "version": "2.5.0", + "sha256": "d7e369fd63331746182360977b1892bfc215476a30d61612d732425311639f56", + "filename": "tomli-2.5.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.8" + }, + "pydub": { + "version": "0.25.1", + "sha256": "65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6", + "filename": "pydub-0.25.1-py2.py3-none-any.whl", + "requires_python": null + }, + "pillow": { + "version": "12.3.0", + "sha256": "23d27a3e0307ec2244cc51e7287b919aa68d097504ebe19df4e76a98a3eea5bd", + "filename": "pillow-12.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.10" + }, + "pathable": { + "version": "0.6.0", + "sha256": "82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566", + "filename": "pathable-0.6.0-py3-none-any.whl", + "requires_python": ">=3.10,<4.0" + }, + "pydantic": { + "version": "2.14.0", + "sha256": "15fab1bea6f1dc5003b54fc2ecab230c1fd1dbade2acd4addc52d81e32416d4b", + "filename": "pydantic-2.14.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "six": { + "version": "1.17.0", + "sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", + "filename": "six-1.17.0-py2.py3-none-any.whl", + "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" + }, + "cffi": { + "version": "2.1.1", + "sha256": "34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632", + "filename": "cffi-2.1.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "requires_python": ">=3.10" + }, + "attrs": { + "version": "26.1.0", + "sha256": "c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", + "filename": "attrs-26.1.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "jeepney": { + "version": "0.9.0", + "sha256": "97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683", + "filename": "jeepney-0.9.0-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "charset-normalizer": { + "version": "3.5.2", + "sha256": "211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f", + "filename": "charset_normalizer-3.5.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.7" + }, + "pytz": { + "version": "2026.5", + "sha256": "e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", + "filename": "pytz-2026.5-py2.py3-none-any.whl", + "requires_python": null + }, + "python-dateutil": { + "version": "2.9.0.post0", + "sha256": "a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", + "filename": "python_dateutil-2.9.0.post0-py2.py3-none-any.whl", + "requires_python": "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" + }, + "fastmcp": { + "version": "3.4.8", + "sha256": "ab4e8abe6c9d50b110f367e8c29f82b90c1478ac9180be61af10354f84f0ad8c", + "filename": "fastmcp-3.4.8-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "pygments": { + "version": "2.21.0", + "sha256": "2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", + "filename": "pygments-2.21.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "httpcore2": { + "version": "2.13.1", + "sha256": "e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a", + "filename": "httpcore2-2.13.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "openenv": { + "version": "0.6.1.dev0", + "sha256": "93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a", + "filename": "openenv-0.6.1.dev0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "typer": { + "version": "0.27.3", + "sha256": "e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff", + "filename": "typer-0.27.3-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "jsonref": { + "version": "1.1.0", + "sha256": "590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9", + "filename": "jsonref-1.1.0-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "referencing": { + "version": "0.37.0", + "sha256": "381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", + "filename": "referencing-0.37.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "rich": { + "version": "15.0.0", + "sha256": "33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", + "filename": "rich-15.0.0-py3-none-any.whl", + "requires_python": ">=3.9.0" + }, + "annotated-types": { + "version": "0.8.0", + "sha256": "f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", + "filename": "annotated_types-0.8.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "jsonschema": { + "version": "4.26.0", + "sha256": "d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", + "filename": "jsonschema-4.26.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "numpy": { + "version": "2.4.6", + "sha256": "89cd468399cfd2504718f0ba50e410dca55a170b61a02ad92bb18c8a65186e93", + "filename": "numpy-2.4.6-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.11" + }, + "shellingham": { + "version": "1.5.4", + "sha256": "7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", + "filename": "shellingham-1.5.4-py2.py3-none-any.whl", + "requires_python": ">=3.7" + }, + "jinja2": { + "version": "3.1.6", + "sha256": "85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", + "filename": "jinja2-3.1.6-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "caio": { + "version": "0.12.9", + "sha256": "bf12d4f014b2a33e642ed7905b5787656ede2fc24be21f7c086826ff0d32cec3", + "filename": "caio-0.12.9-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "watchfiles": { + "version": "1.3.0", + "sha256": "b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1", + "filename": "watchfiles-1.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.10" + }, + "fsspec": { + "version": "2026.9.0", + "sha256": "8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", + "filename": "fsspec-2026.9.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "aiofile": { + "version": "3.12.3", + "sha256": "5c1bcc9e929c50834608e8cc1a4cc1d7503eb60c15a535b779fd39e2f372c017", + "filename": "aiofile-3.12.3-py3-none-any.whl", + "requires_python": ">=3.11" + }, + "pydantic-core": { + "version": "2.50.0", + "sha256": "ac223ea031905319a64d0df116979ae438b42d6265862a3d63c9f9808c2905a7", + "filename": "pydantic_core-2.50.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.10" + }, + "typing-inspection": { + "version": "0.4.4", + "sha256": "65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", + "filename": "typing_inspection-0.4.4-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "typing-extensions": { + "version": "4.16.0", + "sha256": "481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", + "filename": "typing_extensions-4.16.0-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "gradio-client": { + "version": "2.7.2", + "sha256": "12c9d2d940df28eb8dce58eef61f5e808265ad87bbbca53704d1330aa701e5e2", + "filename": "gradio_client-2.7.2-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "authlib": { + "version": "1.8.0", + "sha256": "88aebbd9af6757e14e912d5dc007ae1dc1f3e27e3b2152ce7c552ee2c3b3c121", + "filename": "authlib-1.8.0-py2.py3-none-any.whl", + "requires_python": ">=3.10" + }, + "jaraco.functools": { + "version": "4.6.0", + "sha256": "99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30", + "filename": "jaraco_functools-4.6.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "jiter": { + "version": "0.17.0", + "sha256": "5888fe5abc1ca2fa834a3e1b4c7ef0dcece286a7d7e95a609ef0934b777b9fc9", + "filename": "jiter-0.17.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "requires_python": ">=3.10" + }, + "httpx2": { + "version": "2.13.1", + "sha256": "6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4", + "filename": "httpx2-2.13.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "sse-starlette": { + "version": "3.5.0", + "sha256": "3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997", + "filename": "sse_starlette-3.5.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "platformdirs": { + "version": "4.12.4", + "sha256": "78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7", + "filename": "platformdirs-4.12.4-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "cyclopts": { + "version": "5.2.0", + "sha256": "5da2a5d65164e03008621fc4795946b88a722b881398b5dfa58afa6218342cff", + "filename": "cyclopts-5.2.0-py3-none-any.whl", + "requires_python": ">=3.11" + }, + "pyyaml": { + "version": "6.0.3", + "sha256": "b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", + "filename": "pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "requires_python": ">=3.8" + }, + "pyperclip": { + "version": "1.11.0", + "sha256": "299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273", + "filename": "pyperclip-1.11.0-py3-none-any.whl", + "requires_python": null + }, + "cachetools": { + "version": "7.2.1", + "sha256": "63aa53dfe7473c10cccdd5a01dedf76ef2c4b73a58840d9396e7d0752cbdac3b", + "filename": "cachetools-7.2.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "groovy": { + "version": "0.1.2", + "sha256": "7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64", + "filename": "groovy-0.1.2-py3-none-any.whl", + "requires_python": ">3.9" + }, + "websockets": { + "version": "17.2", + "sha256": "376a693697ddb695ea282ead76060f4847f90e564b12b4389f2c7589e6fadb9e", + "filename": "websockets-17.2-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", + "requires_python": ">=3.11" + }, + "httpx": { + "version": "0.28.1", + "sha256": "d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", + "filename": "httpx-0.28.1-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "jaraco.context": { + "version": "6.1.2", + "sha256": "bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535", + "filename": "jaraco_context-6.1.2-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "python-multipart": { + "version": "0.0.32", + "sha256": "ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23", + "filename": "python_multipart-0.0.32-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "requests": { + "version": "2.34.2", + "sha256": "2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", + "filename": "requests-2.34.2-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "pyjwt": { + "version": "2.15.1", + "sha256": "42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193", + "filename": "pyjwt-2.15.1-py3-none-any.whl", + "requires_python": ">=3.9" + }, + "anyio": { + "version": "4.15.1", + "sha256": "6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101", + "filename": "anyio-4.15.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "uvicorn": { + "version": "0.54.0", + "sha256": "505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf", + "filename": "uvicorn-0.54.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "tqdm": { + "version": "4.70.1", + "sha256": "c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", + "filename": "tqdm-4.70.1-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "fastmcp-slim": { + "version": "3.4.8", + "sha256": "e72c6b74e90c5dcdc8f58087fbdf213636d8b5d339384a498de1c5df6fc037a7", + "filename": "fastmcp_slim-3.4.8-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "backports.tarfile": { + "version": "1.2.0", + "sha256": "77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34", + "filename": "backports.tarfile-1.2.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "opentelemetry-api": { + "version": "1.45.1", + "sha256": "b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb", + "filename": "opentelemetry_api-1.45.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "sniffio": { + "version": "1.3.1", + "sha256": "2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "filename": "sniffio-1.3.1-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "filelock": { + "version": "4.1.0", + "sha256": "2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1", + "filename": "filelock-4.1.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "hf-gradio": { + "version": "0.4.1", + "sha256": "76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3", + "filename": "hf_gradio-0.4.1-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "mcp": { + "version": "1.30.0", + "sha256": "666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0", + "filename": "mcp-1.30.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "email-validator": { + "version": "2.3.0", + "sha256": "80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4", + "filename": "email_validator-2.3.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "hf-xet": { + "version": "1.7.0", + "sha256": "2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8", + "filename": "hf_xet-1.7.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "requires_python": ">=3.8" + }, + "certifi": { + "version": "2026.7.22", + "sha256": "62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", + "filename": "certifi-2026.7.22-py3-none-any.whl", + "requires_python": ">=3.7" + }, + "fastapi": { + "version": "0.143.0", + "sha256": "3e9395fd35276425b61b516a31fdd7c77fe2af83e41b4da22e30696fb1304c5d", + "filename": "fastapi-0.143.0-py3-none-any.whl", + "requires_python": ">=3.10" + }, + "h11": { + "version": "0.16.0", + "sha256": "63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", + "filename": "h11-0.16.0-py3-none-any.whl", + "requires_python": ">=3.8" + }, + "click": { + "version": "8.5.0", + "sha256": "255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", + "filename": "click-8.5.0-py3-none-any.whl", + "requires_python": ">=3.10" + } + } +} diff --git a/components/mimo-code/SDK_RUNTIME.json b/components/mimo-code/SDK_RUNTIME.json new file mode 100644 index 0000000000000000000000000000000000000000..4518b91c77be3c5b3653aba8d9cb37fc935e5c35 --- /dev/null +++ b/components/mimo-code/SDK_RUNTIME.json @@ -0,0 +1,10 @@ +{ + "python": "3.11.16", + "container_prefix": "/opt/openenv-python", + "release_source": "https://releases.astral.sh/github/python-build-standalone/releases/download/20260929/cpython-3.11.16%2B20260929-x86_64-unknown-linux-gnu-install_only_stripped.tar.gz", + "sysconfig_sha256": "91519ae036c22aefa119bdb52c1a747526a583c81c63cf862572b47c7dd36be3", + "configuration_relocated_to_container_prefix": true, + "runtime_dependencies_are_preinstalled_in_image": true, + "original_task_python": "3.12.14", + "original_task_interpreter_retained": true +} diff --git a/components/mimo-code/SOURCE.json b/components/mimo-code/SOURCE.json new file mode 100644 index 0000000000000000000000000000000000000000..6d2951438b85eac41015f713c335387574d151b0 --- /dev/null +++ b/components/mimo-code/SOURCE.json @@ -0,0 +1,26 @@ +{ + "upstream_repository": "FineEnvs/MiMo-V2.6-RL-harbor-terminal", + "upstream_revision": "b74a53f26a1c7a4070a32a2c96b0dc301dce9472", + "original_repository": "XiaomiMiMo/MiMo-V2.6-RL-oss", + "original_revision": "639865fd3374018d6cb29b9fb82dd531406fcf5f", + "task_ids": [ + "candidate-1005-software-systems", + "candidate-1001-security-forensics" + ], + "original_images": { + "candidate-1005-software-systems": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0", + "candidate-1001-security-forensics": "registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" + }, + "source_license": "Apache-2.0; original Requests and Plaso license files retained", + "fixed_original_tasks": true, + "original_instruction_checker_and_workspace_bytes_preserved": true, + "adaptations": [ + "Shared OpenEnv exec/finish protocol", + "Reset selects one of two original fixed task IDs", + "Separate actor UID 2000 and verifier child UID 2001", + "Trusted parent runs original guard and unchanged original assertions; reviewed child subprocesses run with reduced privileges", + "Original task Python and dependencies retained; separate pinned SDK interpreter", + "Explicit removal of unused image-build metadata during offline export" + ], + "dependency_notes": "SDK versions: SDK_DEPENDENCIES.json. Original Python environment is included in the image." +} diff --git a/components/mimo-code/licenses/plaso-Apache-2.0.txt b/components/mimo-code/licenses/plaso-Apache-2.0.txt new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/components/mimo-code/licenses/plaso-Apache-2.0.txt @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/components/mimo-code/licenses/requests-Apache-2.0.txt b/components/mimo-code/licenses/requests-Apache-2.0.txt new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/components/mimo-code/licenses/requests-Apache-2.0.txt @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/components/mimo-code/source_bundle/Dockerfile b/components/mimo-code/source_bundle/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..878cc2aee04ff3923cfb21e8372c500cef941312 --- /dev/null +++ b/components/mimo-code/source_bundle/Dockerfile @@ -0,0 +1,20 @@ +FROM registry-1.docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0 +USER root +COPY sdk-python /opt/openenv-python +COPY wheels /tmp/openenv-wheels +COPY openenv-requirements.lock /opt/openenv-requirements.lock +RUN /opt/openenv-python/bin/python3.11 -m venv /opt/openenv-venv && /opt/openenv-venv/bin/pip install --no-index --find-links=/tmp/openenv-wheels --require-hashes -r /opt/openenv-requirements.lock && /opt/openenv-venv/bin/pip check && rm -rf /tmp/openenv-wheels +RUN python3 -c "import ctypes;ctypes.CDLL('libseccomp.so.2')" +COPY runtime /opt/native-shell/runtime +COPY source /opt/native-shell/source +COPY source-other /opt/native-shell/source-other +COPY pristine /opt/native-shell/pristine +COPY pristine-other /opt/native-shell/pristine-other +COPY config.json /opt/native-shell/config.json +RUN chmod -R go-rwx /opt/native-shell && mkdir -p /logs/verifier && chmod 700 /logs/verifier && rm -rf /tests && rm -f /tmp/requirements-shared.txt /root/.wget-hsts +ENV PYTHONPATH=/opt/native-shell/runtime PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 ENABLE_WEB_INTERFACE=false OPENENV_MODE=simulation ARENA_DEDICATED_CONTAINER=1 GRADIO_ANALYTICS_ENABLED=false +WORKDIR /opt/native-shell +EXPOSE 8000 +ENTRYPOINT ["/opt/openenv-venv/bin/python", "-m", "code_runtime.server"] +CMD [] +HEALTHCHECK --interval=15s --timeout=10s --start-period=15s --retries=3 CMD ["/opt/openenv-venv/bin/python", "-c", "import urllib.request; o=urllib.request.build_opener(urllib.request.ProxyHandler({})); r=o.open('http://127.0.0.1:8000/health',timeout=2); assert r.status==200"] diff --git a/components/mimo-code/source_bundle/config.json b/components/mimo-code/source_bundle/config.json new file mode 100644 index 0000000000000000000000000000000000000000..f4f94b54672b9040ccb2d832eeb16dbe1538e1a8 --- /dev/null +++ b/components/mimo-code/source_bundle/config.json @@ -0,0 +1,195 @@ +{ + "tasks": [ + { + "id": "candidate-1005-software-systems", + "source": "/opt/native-shell/source", + "pristine_workspace": "/opt/native-shell/pristine", + "workspace": "/app", + "inputs": [ + "/app/Dockerfile", + "/app/requirements-shared.txt", + "/app/tools/run_regression.py", + "/app/vendor/requests/pyproject.toml", + "/app/vendor/requests/LICENSE", + "/app/vendor/requests/tests/__init__.py", + "/app/vendor/requests/tests/test_requests.py", + "/app/vendor/requests/tests/conftest.py", + "/app/vendor/requests/src/requests/status_codes.py", + "/app/vendor/requests/src/requests/py.typed", + "/app/vendor/requests/src/requests/__init__.py", + "/app/vendor/requests/src/requests/__version__.py", + "/app/vendor/requests/src/requests/_internal_utils.py", + "/app/vendor/requests/src/requests/structures.py", + "/app/vendor/requests/src/requests/auth.py", + "/app/vendor/requests/src/requests/compat.py", + "/app/vendor/requests/src/requests/utils.py", + "/app/vendor/requests/src/requests/hooks.py", + "/app/vendor/requests/src/requests/certs.py", + "/app/vendor/requests/src/requests/packages.py", + "/app/vendor/requests/src/requests/exceptions.py", + "/app/vendor/requests/src/requests/help.py", + "/app/vendor/requests/src/requests/cookies.py", + "/app/vendor/requests/src/requests/adapters.py", + "/app/vendor/requests/src/requests/sessions.py", + "/app/vendor/requests/src/requests/api.py" + ], + "outputs": [ + "/app/repair_report.json", + "/app/vendor/requests/src/requests/_types.py", + "/app/vendor/requests/src/requests/models.py" + ], + "editable": [ + "/app/vendor/requests/src/requests/_types.py", + "/app/vendor/requests/src/requests/models.py" + ], + "grading_mode": "subprocess-code", + "grader": { + "kind": "original-subprocess-pytest", + "executes_learner_code": "child-only-reviewed" + }, + "python": "/usr/local/bin/python3", + "cpus": 1, + "memory_mb": 2048, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 240.0, + "source_sha256": { + "task.toml": "5cc7f78314cff7486514a872696334ea7add1614ab4d0e0c575f281a89f7425d", + "instruction.md": "44d9729328960cc04484e8ff23d492ac54edfc83f5910c24301742c895b96920", + "tests/test.sh": "5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35", + "tests/test_outputs.py": "ae66085efc08ce1ac14b78e4aa9635452528c4ace0c2eddb79aeb3c023487a0c", + "tests/anti_hack_guard.py": "336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a", + "tests/task_test.sh": "786d65d844825a6cc7827d64dd9b34f388ef1f2be78c609e3a84ede8ed363bf1", + "tests/fixtures/pristine_env_manifest.json": "544b5385c6ded480cc93e3c39938fce50b1ec7185d6e6052c5d53b9514968921", + "tests/fixtures/regression_cases.json": "24593e6c78d47ddcb3e95e62464ca66169005ef390b5bef717a1bc3952f1fb38" + }, + "pristine_sha256": { + "Dockerfile": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "requirements-shared.txt": "34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526", + "tools/run_regression.py": "8d76dedce7d7a38ea383d8db3784f3ab808648a3bb19d613efa6e01088daea49", + "vendor/requests/pyproject.toml": "345f26b9f691435e39d0eb6f7f4150a390f43175b22f8d61ac95e7f2827f0a77", + "vendor/requests/LICENSE": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "vendor/requests/tests/__init__.py": "ac7f253daae0905f9b3dec647cae736bb3c090185aa373b30b3e851599e5342c", + "vendor/requests/tests/test_requests.py": "91ee3b9532c67d6fd533f9f8a7e910a63eb5a0558e569cc2ac20d2c047a5369d", + "vendor/requests/tests/conftest.py": "6d65ffb582519f80a66c5d1ef571e3c33395a199f9e67fcb500c6ad2d7800e0a", + "vendor/requests/src/requests/status_codes.py": "1950f47c89cf18019787e07d8ce48f66d6b38e622f7d94d70a90247fee6c040e", + "vendor/requests/src/requests/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "vendor/requests/src/requests/models.py": "557962f283e48bb20604129509979803687c9bf8b43e5d0f38e8d5037a5c2131", + "vendor/requests/src/requests/__init__.py": "80534322a1a3167d8775829ee220a6acf4fe455f3f778c4b8e94bcf7fadfa0b5", + "vendor/requests/src/requests/__version__.py": "abba90670b0370a3dc40d97c2dea46a35d4bec941ff10d7c3cf3098ef04a17f9", + "vendor/requests/src/requests/_types.py": "d06df79f54a279c0cc3faec596c446246d5ad14edfd529eb328defbd62a44a89", + "vendor/requests/src/requests/_internal_utils.py": "4c7d8d132c9898fc7d715e473f3ac74785ddc4ab96d2c9240f87835dc6d981ff", + "vendor/requests/src/requests/structures.py": "ba9460c39078f25e6f1d2a24ac941ac6f8d2ee97197fa8c8d0c262d8a1e67a02", + "vendor/requests/src/requests/auth.py": "fdc8bb34a8a5a088b169ca13277d107b0bc94ee63ed5e89dd4f5569d9b2bb04c", + "vendor/requests/src/requests/compat.py": "4a51c5ab07b015c298d6ea69d71502979cd3ed6b935d88e4433ce5341dacf584", + "vendor/requests/src/requests/utils.py": "b879cb3f671cf1c28e8ff9b2b02151bcdb8974b4820a514cfdd1f5a038443cd2", + "vendor/requests/src/requests/hooks.py": "ebd8a02475d31a0e473a8f553e9501ff43645b9563885ad52844e7a63f0d76ab", + "vendor/requests/src/requests/certs.py": "fd9c6b83359cef90ff6c4eeeab8dcc2388da382ebca7d00a499b3c0b434a87e4", + "vendor/requests/src/requests/packages.py": "fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287", + "vendor/requests/src/requests/exceptions.py": "c5e18f3352454968e337bb3056f0867df2f37c0a0d2c1a77dc05e7e0b3c0411b", + "vendor/requests/src/requests/help.py": "e5845e93980b2e25be418fb7fe0b8e6e999fef8f84afc5a43f4546efdc24691f", + "vendor/requests/src/requests/cookies.py": "05d12b965c76f229803e17aef1c9969d712e4f4d0f6a06c05e0a47212fd5b417", + "vendor/requests/src/requests/adapters.py": "cc9b1b02694fee0353481fbad84fe3ddbedec4441dba54df7914c63f2aa85937", + "vendor/requests/src/requests/sessions.py": "3d2089736ced93b2b405624a943f866d22652b17df06a85eb010f86272fc3e7d", + "vendor/requests/src/requests/api.py": "4d15480ac046f089209798e8650476ef4a28ebe6f81b400758f8ef42ec6b5509" + } + }, + { + "id": "candidate-1001-security-forensics", + "source": "/opt/native-shell/source-other", + "pristine_workspace": "/opt/native-shell/pristine-other", + "workspace": "/app", + "inputs": [ + "/app/Dockerfile", + "/app/requirements-shared.txt", + "/app/vendor/plaso/setup.py", + "/app/vendor/plaso/requirements.txt", + "/app/vendor/plaso/LICENSE", + "/app/vendor/plaso/dfwinreg/__init__.py", + "/app/vendor/plaso/dfwinreg/errors.py", + "/app/vendor/plaso/pytz/__init__.py", + "/app/vendor/plaso/tools/__init__.py", + "/app/vendor/plaso/tools/run_case.py", + "/app/vendor/plaso/tests/parsers/winreg_plugins/interface.py", + "/app/vendor/plaso/test_data/regf/100_sub_keys.hiv", + "/app/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv", + "/app/vendor/plaso/plaso/lib/definitions.py", + "/app/vendor/plaso/plaso/containers/interface.py", + "/app/vendor/plaso/plaso/containers/manager.py", + "/app/vendor/plaso/plaso/containers/time_events.py", + "/app/vendor/plaso/plaso/containers/events.py", + "/app/vendor/plaso/plaso/containers/windows_events.py", + "/app/vendor/plaso/plaso/parsers/winreg_parser.py", + "/app/vendor/plaso/plaso/parsers/interface.py", + "/app/vendor/plaso/plaso/parsers/mediator.py", + "/app/vendor/plaso/plaso/parsers/plugins.py", + "/app/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py", + "/app/vendor/plaso/plaso/parsers/winreg_plugins/default.py", + "/app/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py" + ], + "outputs": [ + "/app/output.json", + "/app/vendor/plaso/plaso/parsers/winreg_plugins/interface.py", + "/app/vendor/plaso/plaso/parsers/winreg_plugins/services.py" + ], + "editable": [ + "/app/vendor/plaso/plaso/parsers/winreg_plugins/interface.py", + "/app/vendor/plaso/plaso/parsers/winreg_plugins/services.py" + ], + "grading_mode": "subprocess-code", + "grader": { + "kind": "original-subprocess-pytest", + "executes_learner_code": "child-only-reviewed" + }, + "python": "/usr/local/bin/python3", + "cpus": 1, + "memory_mb": 2048, + "agent_timeout_sec": 900.0, + "verifier_timeout_sec": 240.0, + "source_sha256": { + "task.toml": "88538e9f67364bbdea3a753ba3a6cb3cc66ca998e2e6ffe2e92190e36125f1bd", + "instruction.md": "6d55a1b1cb882a951518a74f06dbd70bdb845a3669b4ad0210e4aff0c56d82a3", + "tests/test.sh": "5034fb5c341b758a915ae4e59abbc5c27fb39894ff37b0e8b02233b3156a1c35", + "tests/test_outputs.py": "266d7ff9688685eef6ee0fbe7a35935dfe1fed615604843d175a9369adb6a279", + "tests/anti_hack_guard.py": "336149b10b45d03b7774ba589d984e9663135cfc660f3a133fc482a8716d0e3a", + "tests/task_test.sh": "8152f7541a6105f16a8da923f375093607fddf1adba35c816eab455080af061e", + "tests/fixtures/pristine_env_manifest.json": "dcd500a72c68f04bd5d7b9faadde661274cb2648fb1d064b79b868908463b756", + "tests/fixtures/expected.json": "5ceff9d56caaa93b84f9d8bdc55009efca27f7e3e0fe9f6e7fc18e2f6aca9b1b" + }, + "pristine_sha256": { + "Dockerfile": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "requirements-shared.txt": "34adb79a4013c52a9e46791281763841a36fe1f500beb8a2be547e5975af0526", + "vendor/plaso/setup.py": "9c3a29f59a514add92378b7885a35b73a9695631fcc27849ed198fe481f33fc6", + "vendor/plaso/requirements.txt": "ad2fab71ce6887529d53aaedaf50b793a769e8ac34c596342e00491434a6ebd3", + "vendor/plaso/LICENSE": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "vendor/plaso/dfwinreg/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "vendor/plaso/dfwinreg/errors.py": "082bb8b1c061c3ce920949abc37528ec77e292758ce68423657cd5d2d87897a0", + "vendor/plaso/pytz/__init__.py": "84d16f933ae230cb9c53ec4d0addc397380705017079ee8c5430465b1035a6fb", + "vendor/plaso/tools/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "vendor/plaso/tools/run_case.py": "5906eb2e26a100d1b993cc982ebdc7cbb18d74788a70f3446e8e7a50c04b111d", + "vendor/plaso/tests/parsers/winreg_plugins/interface.py": "4e7e2bb2ff10353a6b8ec54b11ed0420b8ab6c45483c7e77e761accb310acd75", + "vendor/plaso/test_data/regf/100_sub_keys.hiv": "67aa9abe820736c53b272f93e86569d3aa7ef113fcff02696ebcd34185d991c5", + "vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv": "370cdc7037cd01aeeae15dd0e86a44239138425372efd2cf35f066c1fbb36f50", + "vendor/plaso/plaso/lib/definitions.py": "a11900d7bc98b80e318e0967f0218aca2e304d328954da20139fc342bb2fb697", + "vendor/plaso/plaso/containers/interface.py": "22061b1f10090bbecda41391007c7e2295baaf4f1f4797b5babff82bd43a5387", + "vendor/plaso/plaso/containers/manager.py": "0d84bc47cd82f1d57e884c918b5dd75d81bbc1a80380890b3a54edd420e0f22c", + "vendor/plaso/plaso/containers/time_events.py": "69aa7937cb245410683d37f42ceebaff039d2b5796065f4c0c4618290ffb4a5e", + "vendor/plaso/plaso/containers/events.py": "b92752fa2da3ff17c53e164eccf8a91905ed6fb71551c531d7927ff0a9dab271", + "vendor/plaso/plaso/containers/windows_events.py": "1be04adf9ae090fa68333eb26f087e4d09edecb843340404e9b51bedf32a94aa", + "vendor/plaso/plaso/parsers/winreg_parser.py": "f5f747e98a017ebd019ddba45c36ea73c5de1f3b48d3238cec8cb44b39919793", + "vendor/plaso/plaso/parsers/interface.py": "e18590112b9db1dfcc0c4df44750678cc886134452e1619248a2ef07544d7143", + "vendor/plaso/plaso/parsers/mediator.py": "ff2e0bed3543e230ff9d98b044356199e9419b99cef7faa997d21811d598ab4a", + "vendor/plaso/plaso/parsers/plugins.py": "88a70819243e00cf6557c40c1ebe21eb87ee06272e69c18d7c93ea6c5baac0b4", + "vendor/plaso/plaso/parsers/winreg_plugins/timezone.py": "956ba2a62fdb6860f71a345b4bdeffdda1b90de618f2fc51a29a7ebea829641a", + "vendor/plaso/plaso/parsers/winreg_plugins/interface.py": "2ef4e78f16ef5a1c9850aa08615737d01e2953d837dbf4692d9be18f205439e2", + "vendor/plaso/plaso/parsers/winreg_plugins/default.py": "e026e975023b44b9c99dfb22b1d4d4b99d396019aed592d08bf2adc636ccc069", + "vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py": "4711ac18d81ff23cf782b870861ef5f841a14cbfccc23fcaa7d995d6df04ee7e", + "vendor/plaso/plaso/parsers/winreg_plugins/services.py": "b33bf0efb841b2d19941aa2dc1b517fac09b60dc50f2c01841231cd04195ad27" + } + } + ], + "private_root": "/opt/native-shell/private", + "max_actions": 64, + "command_timeout_sec": 120, + "output_limit_bytes": 65536, + "runtime_stage": "research" +} diff --git a/components/mimo-code/source_bundle/openenv-requirements.lock b/components/mimo-code/source_bundle/openenv-requirements.lock new file mode 100644 index 0000000000000000000000000000000000000000..6189c5eb255896cb59d46277f7acbd81419398ef --- /dev/null +++ b/components/mimo-code/source_bundle/openenv-requirements.lock @@ -0,0 +1,110 @@ +aiofile==3.12.3 --hash=sha256:5c1bcc9e929c50834608e8cc1a4cc1d7503eb60c15a535b779fd39e2f372c017 +annotated-doc==0.0.5 --hash=sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101 +annotated-types==0.8.0 --hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0 +anyio==4.15.1 --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 +attrs==26.1.0 --hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 +authlib==1.8.0 --hash=sha256:88aebbd9af6757e14e912d5dc007ae1dc1f3e27e3b2152ce7c552ee2c3b3c121 +backports.tarfile==1.2.0 --hash=sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34 +beartype==0.23.0 --hash=sha256:a88b85be516c064d4de2b42045a258a43be97bce5cbc18b777f332027c0979f7 +brotli==1.2.0 --hash=sha256:40d918bce2b427a0c4ba189df7a006ac0c7277c180aee4617d99e9ccaaf59e6a +cachetools==7.2.1 --hash=sha256:63aa53dfe7473c10cccdd5a01dedf76ef2c4b73a58840d9396e7d0752cbdac3b +caio==0.12.9 --hash=sha256:bf12d4f014b2a33e642ed7905b5787656ede2fc24be21f7c086826ff0d32cec3 +certifi==2026.7.22 --hash=sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 +cffi==2.1.1 --hash=sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632 +charset-normalizer==3.5.2 --hash=sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f +click==8.5.0 --hash=sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360 +cryptography==50.0.2 --hash=sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856 +cyclopts==5.2.0 --hash=sha256:5da2a5d65164e03008621fc4795946b88a722b881398b5dfa58afa6218342cff +dnspython==2.9.0 --hash=sha256:9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9 +docstring-parser==0.18.0 --hash=sha256:b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b +email-validator==2.3.0 --hash=sha256:80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4 +exceptiongroup==1.3.1 --hash=sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598 +fastapi==0.143.0 --hash=sha256:3e9395fd35276425b61b516a31fdd7c77fe2af83e41b4da22e30696fb1304c5d +fastmcp==3.4.8 --hash=sha256:ab4e8abe6c9d50b110f367e8c29f82b90c1478ac9180be61af10354f84f0ad8c +fastmcp-slim==3.4.8 --hash=sha256:e72c6b74e90c5dcdc8f58087fbdf213636d8b5d339384a498de1c5df6fc037a7 +filelock==4.1.0 --hash=sha256:2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1 +fsspec==2026.9.0 --hash=sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f +gradio==6.30.0 --hash=sha256:aae3aa81ec9f44e55781b498ad2ba12b117aa512e8d2bb0ef3e52af7f2ee6305 +gradio-client==2.7.2 --hash=sha256:12c9d2d940df28eb8dce58eef61f5e808265ad87bbbca53704d1330aa701e5e2 +griffelib==2.3.2 --hash=sha256:8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274 +groovy==0.1.2 --hash=sha256:7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64 +h11==0.16.0 --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 +hf-gradio==0.4.1 --hash=sha256:76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3 +hf-xet==1.7.0 --hash=sha256:2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8 +httpcore==1.0.9 --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 +httpcore2==2.13.1 --hash=sha256:e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a +httpx==0.28.1 --hash=sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad +httpx-sse==0.4.3 --hash=sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc +httpx2==2.13.1 --hash=sha256:6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4 +huggingface-hub==2.2.0 --hash=sha256:1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3 +idna==3.20 --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c +importlib-metadata==9.0.1 --hash=sha256:bba5600596a7e21f3eef53281cf28d6a5195634d2f2b78ff9501a3272c6eaab0 +jaraco.classes==3.4.0 --hash=sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790 +jaraco.context==6.1.2 --hash=sha256:bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535 +jaraco.functools==4.6.0 --hash=sha256:99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30 +jeepney==0.9.0 --hash=sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683 +jinja2==3.1.6 --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 +jiter==0.17.0 --hash=sha256:5888fe5abc1ca2fa834a3e1b4c7ef0dcece286a7d7e95a609ef0934b777b9fc9 +joserfc==1.7.5 --hash=sha256:add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159 +jsonref==1.1.0 --hash=sha256:590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9 +jsonschema==4.26.0 --hash=sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce +jsonschema-path==0.5.0 --hash=sha256:2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2 +jsonschema-specifications==2025.9.1 --hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe +keyring==25.7.0 --hash=sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f +markdown-it-py==4.2.0 --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a +markupsafe==3.0.4 --hash=sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808 +mcp==1.30.0 --hash=sha256:666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0 +mdurl==0.1.2 --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 +more-itertools==11.1.0 --hash=sha256:4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192 +numpy==2.4.6 --hash=sha256:89cd468399cfd2504718f0ba50e410dca55a170b61a02ad92bb18c8a65186e93 +openai==3.28.0 --hash=sha256:1ea40a084ffe2f9f16fd3bea6e870f757853b536b18d8e737c518ef849a2920c +openapi-pydantic==0.6.0 --hash=sha256:8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3 +openenv==0.6.1.dev0 --hash=sha256:93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a +opentelemetry-api==1.45.1 --hash=sha256:b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb +orjson==3.13.0 --hash=sha256:89bcf2d4bc6c9a7e1763c8cf534f38712e66b76a0fefda7fb7785462f0d635e4 +packaging==26.3 --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c +pandas==3.0.6 --hash=sha256:47121f9571503f724c9b93e297ab6254ac99c77adf5e9ed085ea419fd585c258 +pathable==0.6.0 --hash=sha256:82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566 +pillow==12.3.0 --hash=sha256:23d27a3e0307ec2244cc51e7287b919aa68d097504ebe19df4e76a98a3eea5bd +platformdirs==4.12.4 --hash=sha256:78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7 +py-key-value-aio==0.4.6 --hash=sha256:820b30c7959fc738ea3d00160cdb10cd258f51e38737b2add530defeea1ded77 +pycparser==3.11 --hash=sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80 +pydantic==2.14.0 --hash=sha256:15fab1bea6f1dc5003b54fc2ecab230c1fd1dbade2acd4addc52d81e32416d4b +pydantic-core==2.50.0 --hash=sha256:ac223ea031905319a64d0df116979ae438b42d6265862a3d63c9f9808c2905a7 +pydantic-settings==2.15.0 --hash=sha256:0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42 +pydub==0.25.1 --hash=sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6 +pygments==2.21.0 --hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 +pyjwt==2.15.1 --hash=sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193 +pyperclip==1.11.0 --hash=sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273 +python-dateutil==2.9.0.post0 --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 +python-dotenv==1.2.4 --hash=sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc +python-multipart==0.0.32 --hash=sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23 +pytz==2026.5 --hash=sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03 +pyyaml==6.0.3 --hash=sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d +referencing==0.37.0 --hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231 +requests==2.34.2 --hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 +rich==15.0.0 --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb +rich-rst==2.2.0 --hash=sha256:1ea1c43813dc4a8d86475fce27ffb74e0ada3d4656c9f8130ba2a59868055fe9 +rpds-py==2026.9.1 --hash=sha256:136a1c3fe4402b7008bc81cb62ee538481795b61a7e83df88dff3b3f02b726ff +safehttpx==0.1.7 --hash=sha256:c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde +secretstorage==3.5.0 --hash=sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137 +semantic-version==2.10.0 --hash=sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177 +shellingham==1.5.4 --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 +six==1.17.0 --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 +sniffio==1.3.1 --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 +sse-starlette==3.5.0 --hash=sha256:3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997 +starlette==1.7.0 --hash=sha256:67f8e99895493dd2911a03f11314af6ceebeae4e704bb9f43dfc6a9db151c93e +tomli==2.5.0 --hash=sha256:d7e369fd63331746182360977b1892bfc215476a30d61612d732425311639f56 +tomli-w==1.2.0 --hash=sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90 +tomlkit==0.14.0 --hash=sha256:592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680 +tqdm==4.70.1 --hash=sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73 +truststore==0.10.4 --hash=sha256:adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981 +typer==0.27.3 --hash=sha256:e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff +typing-extensions==4.16.0 --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 +typing-inspection==0.4.4 --hash=sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147 +uncalled-for==0.4.1 --hash=sha256:b611b38879d9fe5088297e7bb28f2ddd12d2d73dad933d93da107fb63eb4058e +urllib3==2.8.0 --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 +uvicorn==0.54.0 --hash=sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf +watchfiles==1.3.0 --hash=sha256:b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1 +websockets==17.2 --hash=sha256:376a693697ddb695ea282ead76060f4847f90e564b12b4389f2c7589e6fadb9e +zipp==4.1.1 --hash=sha256:8979f52d874162f485ff2981e3891f3a3317b7a3dd43ff1e1775b9304f307a9c diff --git a/components/mimo-code/source_bundle/pristine-other/Dockerfile b/components/mimo-code/source_bundle/pristine-other/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..73b9ed6d2d4a98f9982673b64d6c5691b0f5e39d --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/Dockerfile @@ -0,0 +1,18 @@ +# 自包含的 terminal_bench 候选镜像,build context 就是本目录。 + +FROM python:3.12-slim-bookworm + +ARG PIP_INDEX_URL=https://pypi.org/simple + +ENV DEBIAN_FRONTEND=noninteractive \ + PIP_DISABLE_PIP_VERSION_CHECK=1 \ + PYTHONDONTWRITEBYTECODE=1 \ + PIP_INDEX_URL=${PIP_INDEX_URL} + +# 先装 pip 依赖 —— 单独一层,candidate 代码变更时不用重跑 +COPY requirements-shared.txt /tmp/requirements-shared.txt +RUN python -m pip install --no-cache-dir -r /tmp/requirements-shared.txt + +# 再拷任务本体(含仓库自带 tests / vendor / probe 脚本) +WORKDIR /app +COPY . /app diff --git a/components/mimo-code/source_bundle/pristine-other/requirements-shared.txt b/components/mimo-code/source_bundle/pristine-other/requirements-shared.txt new file mode 100644 index 0000000000000000000000000000000000000000..8e246544a95f38a208a39fe85c212adcb63fa407 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/requirements-shared.txt @@ -0,0 +1,31 @@ +# 65 个 terminal_bench candidate 镜像共用的 pip 依赖。 +pytest==9.1.1 +pytest-json-ctrf==0.5.2 +numpy==2.2.6 +scipy +pandas +lxml +requests +attrs +pyyaml +pillow +networkx +shapely +patsy +statsmodels +lazy-loader +numpydoc +mido +miditoolkit +music21 +xmlschema +csvw +clldutils +termcolor +pybtex +frictionless +scikit-image +scikit-learn +fast-simplification +manifold3d +colorlog diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/LICENSE b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/__init__.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/errors.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/errors.py new file mode 100644 index 0000000000000000000000000000000000000000..9488271a8df777524a5ac4beae64dfcf995402b6 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/dfwinreg/errors.py @@ -0,0 +1,2 @@ +class WinRegistryValueError(Exception): + pass diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/events.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/events.py new file mode 100644 index 0000000000000000000000000000000000000000..999709dca761e75209cfc2cf3b143e872e3a7116 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/events.py @@ -0,0 +1,303 @@ +# -*- coding: utf-8 -*- +"""Event attribute containers.""" + +import re + +from plaso.containers import interface +from plaso.containers import manager + + +class EventData(interface.AttributeContainer): + """Event data attribute container. + + The event data attribute container represents the attributes of an entity, + such as a database record or log line. + + Attributes: + data_type (str): event data type indicator. + offset (int): offset relative to the start of the data stream where + the event data is stored. + parser (str): string identifying the parser that produced the event data. + query (str): query that was used to obtain the event data. + """ + CONTAINER_TYPE = 'event_data' + + _SERIALIZABLE_PROTECTED_ATTRIBUTES = ['_event_data_stream_row_identifier'] + + def __init__(self, data_type=None): + """Initializes an event data attribute container. + + Args: + data_type (Optional[str]): event data type indicator. + """ + super(EventData, self).__init__() + self._event_data_stream_identifier = None + self._event_data_stream_row_identifier = None + self.data_type = data_type + self.offset = None + self.parser = None + self.query = None + + def GetAttributeValuesString(self): + """Retrieves a comparable string of the attribute values. + + Returns: + str: comparable string of the attribute values. + + Raises: + TypeError: if the attribute value type is not supported. + """ + attributes = [] + for attribute_name, attribute_value in sorted(self.__dict__.items()): + # Not using startswith to improve performance. + if attribute_name[0] == '_' or attribute_value is None: + continue + + if isinstance(attribute_value, bytes): + raise TypeError( + 'Attribute: {0:s} value of type bytes not supported.'.format( + attribute_name)) + + if isinstance(attribute_value, dict): + raise TypeError( + 'Attribute: {0:s} value of type dict not supported.'.format( + attribute_name)) + + attribute_string = '{0:s}: {1!s}'.format(attribute_name, attribute_value) + attributes.append(attribute_string) + + return ', '.join(attributes) + + def GetEventDataStreamIdentifier(self): + """Retrieves the identifier of the associated event data stream. + + The event data stream identifier is a storage specific value that should not + be serialized. + + Returns: + AttributeContainerIdentifier: event data stream or None when not set. + """ + return self._event_data_stream_identifier + + def SetEventDataStreamIdentifier(self, event_data_stream_identifier): + """Sets the identifier of the associated event data stream. + + The event data stream identifier is a storage specific value that should not + be serialized. + + Args: + event_data_stream_identifier (AttributeContainerIdentifier): event data + stream identifier. + """ + self._event_data_stream_identifier = event_data_stream_identifier + + +class EventDataStream(interface.AttributeContainer): + """Event data stream attribute container. + + The event data stream attribute container represents the attributes of + a data stream, such as the content of a file or extended attribute. + + Attributes: + file_entropy (str): byte entropy value of the data stream. + md5_hash (str): MD5 digest hash of the data stream. + path_spec (dfvfs.PathSpec): path specification of the data stream. + sha1_hash (str): SHA-1 digest hash of the data stream. + sha256_hash (str): SHA-256 digest hash of the data stream. + yara_match (list[str]): names of the Yara rules that matched the data + stream. + """ + CONTAINER_TYPE = 'event_data_stream' + + def __init__(self): + """Initializes an event data attribute container.""" + super(EventDataStream, self).__init__() + self.file_entropy = None + self.md5_hash = None + self.path_spec = None + self.sha1_hash = None + self.sha256_hash = None + self.yara_match = None + + +class EventObject(interface.AttributeContainer): + """Event attribute container. + + The framework is designed to parse files and create events + from individual records, log lines or keys extracted from files. + The event object provides an extensible data store for event + attributes. + + Attributes: + date_time (dfdatetime.DateTimeValues): date and time values. + parser (str): string identifying the parser that produced the event. + timestamp (int): timestamp, which contains the number of microseconds + since January 1, 1970, 00:00:00 UTC. + timestamp_desc (str): description of the meaning of the timestamp. + """ + CONTAINER_TYPE = 'event' + + _SERIALIZABLE_PROTECTED_ATTRIBUTES = ['_event_data_row_identifier'] + + def __init__(self): + """Initializes an event attribute container.""" + super(EventObject, self).__init__() + self._event_data_identifier = None + self._event_data_row_identifier = None + self.date_time = None + self.parser = None + self.timestamp = None + # TODO: rename timestamp_desc to timestamp_description + self.timestamp_desc = None + + # This method is necessary for heap sort. + def __lt__(self, other): + """Compares if the event attribute container is less than the other. + + Events are compared by timestamp. + + Args: + other (EventObject): event attribute container to compare to. + + Returns: + bool: True if the event attribute container is less than the other. + """ + return (self.timestamp < other.timestamp or + self.timestamp_desc < other.timestamp_desc) + + def GetEventDataIdentifier(self): + """Retrieves the identifier of the associated event data. + + The event data identifier is a storage specific value that should not + be serialized. + + Returns: + AttributeContainerIdentifier: event data identifier or None when not set. + """ + return self._event_data_identifier + + def SetEventDataIdentifier(self, event_data_identifier): + """Sets the identifier of the associated event data. + + The event data identifier is a storage specific value that should not + be serialized. + + Args: + event_data_identifier (AttributeContainerIdentifier): event data + identifier. + """ + self._event_data_identifier = event_data_identifier + + +class EventTag(interface.AttributeContainer): + """Event tag attribute container. + + Attributes: + labels (list[str]): labels, such as "malware", "application_execution". + """ + CONTAINER_TYPE = 'event_tag' + + _INVALID_LABEL_CHARACTERS_REGEX = re.compile(r'[^A-Za-z0-9_]') + + _SERIALIZABLE_PROTECTED_ATTRIBUTES = ['_event_row_identifier'] + + _VALID_LABEL_REGEX = re.compile(r'^[A-Za-z0-9_]+$') + + def __init__(self): + """Initializes an event tag attribute container.""" + super(EventTag, self).__init__() + self._event_identifier = None + self._event_row_identifier = None + self.labels = [] + + def AddLabel(self, label): + """Adds a label to the event tag. + + Args: + label (str): label. + + Raises: + TypeError: if the label provided is not a string. + ValueError: if a label is malformed. + """ + if not isinstance(label, str): + raise TypeError('label is not a string type. Is {0!s}'.format( + type(label))) + + if not self._VALID_LABEL_REGEX.match(label): + raise ValueError(( + 'Unsupported label: "{0:s}". A label must only consist of ' + 'alphanumeric characters or underscores.').format(label)) + + if label not in self.labels: + self.labels.append(label) + + def AddLabels(self, labels): + """Adds labels to the event tag. + + Args: + labels (list[str]): labels. + + Raises: + ValueError: if a label is malformed. + """ + for label in labels: + if not label or not self._VALID_LABEL_REGEX.match(label): + raise ValueError(( + 'Unsupported label: "{0!s}". A label must only consist of ' + 'alphanumeric characters or underscores.').format(label)) + + for label in labels: + if label not in self.labels: + self.labels.append(label) + + def CopyToDict(self): + """Copies the event tag to a dictionary. + + Returns: + dict[str, object]: event tag attributes. + """ + return {'labels': self.labels} + + @classmethod + def CopyTextToLabel(cls, text, prefix=''): + """Copies a string to a label. + + A label only supports a limited set of characters therefore + unsupported characters are replaced with an underscore. + + Args: + text (str): label text. + prefix (Optional[str]): label prefix. + + Returns: + str: label. + """ + text = '{0:s}{1:s}'.format(prefix, text) + return cls._INVALID_LABEL_CHARACTERS_REGEX.sub('_', text) + + def GetEventIdentifier(self): + """Retrieves the identifier of the associated event. + + The event identifier is a storage specific value that should not + be serialized. + + Returns: + AttributeContainerIdentifier: event identifier or None when not set. + """ + return self._event_identifier + + def SetEventIdentifier(self, event_identifier): + """Sets the identifier of the associated event. + + The event identifier is a storage specific value that should not + be serialized. + + Args: + event_identifier (AttributeContainerIdentifier): event identifier. + """ + self._event_identifier = event_identifier + + +manager.AttributeContainersManager.RegisterAttributeContainers([ + EventData, EventDataStream, EventObject, EventTag]) diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/interface.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/interface.py new file mode 100644 index 0000000000000000000000000000000000000000..0bf64369602cdfa0f59a1a8d85f53d9cb51f51d9 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/interface.py @@ -0,0 +1,3 @@ +class AttributeContainer: + def __init__(self): + pass diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/manager.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/manager.py new file mode 100644 index 0000000000000000000000000000000000000000..76f53e05514e04c505974efaa8b8e7115488a3d0 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/manager.py @@ -0,0 +1,4 @@ +class AttributeContainersManager: + @classmethod + def RegisterAttributeContainers(cls, containers): + return None diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/time_events.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/time_events.py new file mode 100644 index 0000000000000000000000000000000000000000..4d85791ba5b9e3ed6a9caf85e074ad3105fccba8 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/time_events.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +"""Time-based event attribute containers.""" + +import datetime +import pytz + +from plaso.containers import events +from plaso.lib import definitions + + +class DateTimeValuesEvent(events.EventObject): + """dfDateTime date time values-based event attribute container. + + Attributes: + date_time (dfdatetime.DateTimeValues): date and time values. + timestamp (int): timestamp, which contains the number of microseconds + since January 1, 1970, 00:00:00 UTC. + timestamp_desc (str): description of the meaning of the timestamp. + """ + + def __init__(self, date_time, date_time_description, time_zone=None): + """Initializes an event. + + Args: + date_time (dfdatetime.DateTimeValues): date and time values. + date_time_description (str): description of the meaning of the date and + time values. + time_zone (Optional[datetime.tzinfo]): time zone. + """ + timestamp = date_time.GetPlasoTimestamp() + if date_time.is_local_time and time_zone and time_zone != pytz.UTC: + datetime_object = datetime.datetime(1970, 1, 1, 0, 0, 0, 0, tzinfo=None) + datetime_object += datetime.timedelta(microseconds=timestamp) + + datetime_delta = time_zone.utcoffset(datetime_object, is_dst=False) + seconds_delta = int(datetime_delta.total_seconds()) + timestamp -= seconds_delta * definitions.MICROSECONDS_PER_SECOND + + super(DateTimeValuesEvent, self).__init__() + self.date_time = date_time + self.timestamp = timestamp + self.timestamp_desc = date_time_description diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/windows_events.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/windows_events.py new file mode 100644 index 0000000000000000000000000000000000000000..f970afc322286598e7156851a388bad529bfb0e9 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/containers/windows_events.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +"""Windows event data attribute containers.""" + +from plaso.containers import events + + +class WindowsDistributedLinkTrackingEventData(events.EventData): + """Windows distributed link event data attribute container. + + Attributes: + mac_address (str): MAC address stored in the UUID. + origin (str): origin of the event (event source). + E.g. the path of the corresponding LNK file or file reference + MFT entry with the corresponding NTFS $OBJECT_ID attribute. + uuid (str): UUID. + """ + + DATA_TYPE = 'windows:distributed_link_tracking:creation' + + def __init__(self, uuid, origin): + """Initializes an event object. + + Args: + uuid (uuid.UUID): UUID. + origin (str): origin of the event (event source). + E.g. the path of the corresponding LNK file or file reference + MFT entry with the corresponding NTFS $OBJECT_ID attribute. + + Raises: + ValueError: if the UUID version is not supported. + """ + if uuid.version != 1: + raise ValueError('Unsupported UUID version.') + + mac_address = '{0:s}:{1:s}:{2:s}:{3:s}:{4:s}:{5:s}'.format( + uuid.hex[20:22], uuid.hex[22:24], uuid.hex[24:26], uuid.hex[26:28], + uuid.hex[28:30], uuid.hex[30:32]) + + super(WindowsDistributedLinkTrackingEventData, self).__init__( + data_type=self.DATA_TYPE) + self.mac_address = mac_address + # TODO: replace origin my something machine readable. + self.origin = origin + self.uuid = '{0!s}'.format(uuid) + + +class WindowsRegistryEventData(events.EventData): + """Windows Registry event data attribute container. + + Attributes: + key_path (str): Windows Registry key path. + values (str): names and data of the values in the key. + """ + + DATA_TYPE = 'windows:registry:key_value' + + def __init__(self): + """Initializes event data.""" + super(WindowsRegistryEventData, self).__init__(data_type=self.DATA_TYPE) + self.key_path = None + self.values = None + + +class WindowsVolumeEventData(events.EventData): + """Windows volume event data attribute container. + + Attributes: + device_path (str): volume device path. + origin (str): origin of the event (event source), for example + the corresponding Prefetch file name. + serial_number (str): volume serial number. + """ + DATA_TYPE = 'windows:volume:creation' + + def __init__(self): + """Initializes event data.""" + super(WindowsVolumeEventData, self).__init__(data_type=self.DATA_TYPE) + self.device_path = None + # TODO: replace origin with something machine readable. + self.origin = None + self.serial_number = None diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/lib/definitions.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/lib/definitions.py new file mode 100644 index 0000000000000000000000000000000000000000..a98344873658e9a9c6f8cdfbd56fe9f0a2c6ca21 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/lib/definitions.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +"""The definitions.""" + + +MICROSECONDS_PER_SECOND = 1000000 +MICROSECONDS_PER_MINUTE = 60000000 +NANOSECONDS_PER_SECOND = 1000000000 + +SOURCE_TYPE_ARCHIVE = 'archive' + +COMPRESSION_FORMAT_NONE = 'none' +COMPRESSION_FORMAT_ZLIB = 'zlib' + +COMPRESSION_FORMATS = frozenset([ + COMPRESSION_FORMAT_NONE, + COMPRESSION_FORMAT_ZLIB]) + +# Default worker process memory limit of 2 GiB. +DEFAULT_WORKER_MEMORY_LIMIT = 2048 * 1024 * 1024 + +# Consider a worker process inactive after 15 minutes of no status updates. +DEFAULT_WORKER_TIMEOUT = 15.0 * 60.0 + +FAILURE_MODE_EXHAUST_MEMORY = 'exhaust_memory' +FAILURE_MODE_NOT_RESPONDING = 'not_responding' +FAILURE_MODE_TERMINATED = 'terminated' +FAILURE_MODE_TIME_OUT = 'time_out' + +OPERATING_SYSTEM_FAMILY_LINUX = 'Linux' +OPERATING_SYSTEM_FAMILY_MACOS = 'MacOS' +OPERATING_SYSTEM_FAMILY_UNKNOWN = 'Unknown' +OPERATING_SYSTEM_FAMILY_WINDOWS_9x = 'Windows 9x/Me' +OPERATING_SYSTEM_FAMILY_WINDOWS_NT = 'Windows NT' + +OPERATING_SYSTEM_FAMILIES = frozenset([ + OPERATING_SYSTEM_FAMILY_LINUX, + OPERATING_SYSTEM_FAMILY_MACOS, + OPERATING_SYSTEM_FAMILY_UNKNOWN, + OPERATING_SYSTEM_FAMILY_WINDOWS_9x, + OPERATING_SYSTEM_FAMILY_WINDOWS_NT]) + +RESERVED_VARIABLE_NAMES = frozenset([ + 'body', + 'data_type', + 'display_name', + 'filename', + 'hostname', + 'http_headers', + 'inode', + 'mapped_files', + 'metadata', + 'offset', + 'parser', + 'pathspec', + 'query', + 'source_long', + 'source_short', + 'tag', + 'text_prepend', + 'timestamp', + 'timestamp_desc', + 'timezone', + 'username']) + +SERIALIZER_FORMAT_JSON = 'json' + +SERIALIZER_FORMATS = frozenset([SERIALIZER_FORMAT_JSON]) + +STATUS_INDICATOR_ABORTED = 'aborted' +STATUS_INDICATOR_ANALYZING = 'analyzing' +STATUS_INDICATOR_COLLECTING = 'collecting' +STATUS_INDICATOR_COMPLETED = 'completed' +STATUS_INDICATOR_ERROR = 'error' +STATUS_INDICATOR_EXPORTING = 'exporting' +STATUS_INDICATOR_EXTRACTING = 'extracting' +STATUS_INDICATOR_FINALIZING = 'finalizing' +STATUS_INDICATOR_HASHING = 'hashing' +STATUS_INDICATOR_IDLE = 'idle' +STATUS_INDICATOR_INITIALIZED = 'initialized' +STATUS_INDICATOR_KILLED = 'killed' +STATUS_INDICATOR_MERGING = 'merging' +STATUS_INDICATOR_NOT_RESPONDING = 'not responding' +STATUS_INDICATOR_REPORTING = 'reporting' +STATUS_INDICATOR_RUNNING = 'running' +STATUS_INDICATOR_YARA_SCAN = 'yara scan' + +ERROR_STATUS_INDICATORS = frozenset([ + STATUS_INDICATOR_ABORTED, + STATUS_INDICATOR_ERROR, + STATUS_INDICATOR_NOT_RESPONDING, + STATUS_INDICATOR_KILLED]) + +STORAGE_FORMAT_SQLITE = 'sqlite' +STORAGE_FORMAT_REDIS = 'redis' + +SESSION_STORAGE_FORMATS = frozenset([STORAGE_FORMAT_SQLITE]) +TASK_STORAGE_FORMATS = frozenset([STORAGE_FORMAT_SQLITE, STORAGE_FORMAT_REDIS]) + +DEFAULT_STORAGE_FORMAT = STORAGE_FORMAT_SQLITE + +# The session storage contains the results of one or more sessions. +# A typical session is a single run of a tool (log2timeline.py). +# The task storage contains the results of one or more tasks. Tasks +# are used to split work within a session. A typical task is a single +# run of a worker process. +STORAGE_TYPE_SESSION = 'session' +STORAGE_TYPE_TASK = 'task' + +STORAGE_TYPES = frozenset([STORAGE_TYPE_SESSION, STORAGE_TYPE_TASK]) + +TIME_DESCRIPTION_ACCOUNT_CREATED = 'Account Created' +TIME_DESCRIPTION_ADDED = 'Added Time' +TIME_DESCRIPTION_BACKUP = 'Backup Time' +TIME_DESCRIPTION_CHANGE = 'Metadata Modification Time' +TIME_DESCRIPTION_CONNECTION_ESTABLISHED = 'Connection Established' +TIME_DESCRIPTION_CONNECTION_FAILED = 'Connection Failed' +TIME_DESCRIPTION_CREATION = 'Creation Time' +TIME_DESCRIPTION_DELETED = 'Content Deletion Time' +TIME_DESCRIPTION_DOWNGRADE = 'Downgrade Time' +TIME_DESCRIPTION_END = 'End Time' +TIME_DESCRIPTION_ENTRY_MODIFICATION = TIME_DESCRIPTION_CHANGE +TIME_DESCRIPTION_EXIT = 'Exit Time' +TIME_DESCRIPTION_EXPIRATION = 'Expiration Time' +TIME_DESCRIPTION_FILE_DOWNLOADED = 'File Downloaded' +TIME_DESCRIPTION_FIRST_CONNECTED = 'First Connection Time' +TIME_DESCRIPTION_INSTALLATION = 'Installation Time' +TIME_DESCRIPTION_LAST_ACTIVE = 'Last Active Time' +TIME_DESCRIPTION_LAST_ACCESS = 'Last Access Time' +TIME_DESCRIPTION_LAST_CHECKED = 'Last Checked Time' +TIME_DESCRIPTION_LAST_CONNECTED = 'Last Connection Time' +TIME_DESCRIPTION_LAST_LOGIN = 'Last Login Time' +TIME_DESCRIPTION_LAST_PASSWORD_RESET = 'Last Password Reset' +TIME_DESCRIPTION_LAST_PRINTED = 'Last Printed Time' +TIME_DESCRIPTION_LAST_PROMPTED_USER = 'Last Prompted User' +TIME_DESCRIPTION_LAST_RESUME = 'Last Resume Time' +TIME_DESCRIPTION_LAST_RUN = 'Last Time Executed' +TIME_DESCRIPTION_LAST_SHUTDOWN = 'Last Shutdown Time' +TIME_DESCRIPTION_LAST_USED = 'Last Used Time' +TIME_DESCRIPTION_LAST_VISITED = 'Last Visited Time' +TIME_DESCRIPTION_MODIFICATION = 'Content Modification Time' +TIME_DESCRIPTION_PURCHASED = 'Purchased' +TIME_DESCRIPTION_RECORDED = 'Event Recorded' +TIME_DESCRIPTION_SAMPLE = 'Sample Time' +TIME_DESCRIPTION_SCHEDULED_TO_END = 'Scheduled to end' +TIME_DESCRIPTION_SCHEDULED_TO_START = 'Scheduled to start' +TIME_DESCRIPTION_SENT = 'Sent Time' +TIME_DESCRIPTION_START = 'Start Time' +TIME_DESCRIPTION_UPDATE = 'Update Time' +TIME_DESCRIPTION_WRITTEN = TIME_DESCRIPTION_MODIFICATION + +# The timestamp does not represent a date and time value. +TIME_DESCRIPTION_NOT_A_TIME = 'Not a time' + +# Note that the unknown time is used for date and time values +# of which the exact meaning is unknown and being researched. +# For most cases do not use this timestamp description. +TIME_DESCRIPTION_UNKNOWN = 'Unknown Time' diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/interface.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/interface.py new file mode 100644 index 0000000000000000000000000000000000000000..b6e16ccc1ba6945d1291afe19a429adc61f51027 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/interface.py @@ -0,0 +1,299 @@ +# -*- coding: utf-8 -*- +"""The parsers and plugins interface classes.""" + +import abc +import os + +from plaso.lib import errors + + +class BaseFileEntryFilter(object): + """File entry filter interface.""" + + # pylint: disable=redundant-returns-doc + @abc.abstractmethod + def Match(self, file_entry): + """Determines if a file entry matches the filter. + + Args: + file_entry (dfvfs.FileEntry): a file entry. + + Returns: + bool: True if the file entry matches the filter. + """ + + +class FileNameFileEntryFilter(BaseFileEntryFilter): + """File name file entry filter.""" + + def __init__(self, filename): + """Initializes a file entry filter. + + Args: + filename (str): name of the file. + """ + super(FileNameFileEntryFilter, self).__init__() + self._filename = filename.lower() + + def Match(self, file_entry): + """Determines if a file entry matches the filter. + + Args: + file_entry (dfvfs.FileEntry): a file entry. + + Returns: + bool: True if the file entry matches the filter. + """ + if not file_entry: + return False + + filename = file_entry.name.lower() + return filename == self._filename + + +class BaseParser(object): + """The parser interface.""" + + # The name of the parser. This is the name that is used in the registration + # and used for parser/plugin selection, so this needs to be concise and unique + # for all plugins/parsers, such as 'Chrome', 'Safari' or 'UserAssist'. + NAME = 'base_parser' + + # Data format supported by the parser plugin. This information is used by + # the parser manager to generate parser and plugin information. + DATA_FORMAT = '' + + # List of filters that should match for the parser to be applied. + FILTERS = frozenset() + + # Every derived parser class that implements plugins should define + # its own _plugin_classes dict: + # _plugin_classes = {} + + # We deliberately don't define it here to make sure the plugins of + # different parser classes don't end up in the same dict. + _plugin_classes = None + + def __init__(self): + """Initializes a parser. + + By default all plugins will be enabled. To only enable specific plugins + use the EnablePlugins method and pass it a list of strings containing + the names of the plugins to enable. + + The default plugin, named "{self.NAME:s}_default", if it exists, + is always enabled and cannot be disabled. + """ + super(BaseParser, self).__init__() + self._default_plugin = None + self._plugins = None + self.EnablePlugins([]) + + @classmethod + def DeregisterPlugin(cls, plugin_class): + """Deregisters a plugin class. + + The plugin classes are identified based on their lower case name. + + Args: + plugin_class (type): class of the plugin. + + Raises: + KeyError: if plugin class is not set for the corresponding name. + """ + plugin_name = plugin_class.NAME.lower() + if plugin_name not in cls._plugin_classes: + raise KeyError( + 'Plugin class not set for name: {0:s}.'.format( + plugin_class.NAME)) + + del cls._plugin_classes[plugin_name] + + def EnablePlugins(self, plugin_includes): + """Enables parser plugins. + + Args: + plugin_includes (list[str]): names of the plugins to enable, where None + or an empty list represents all plugins. Note the default plugin, if + it exists, is always enabled and cannot be disabled. + """ + self._plugins = [] + if not self._plugin_classes: + return + + default_plugin_name = '{0:s}_default'.format(self.NAME) + for plugin_name, plugin_class in self._plugin_classes.items(): + if plugin_name == default_plugin_name: + self._default_plugin = plugin_class() + continue + + if plugin_includes and plugin_name not in plugin_includes: + continue + + plugin_object = plugin_class() + self._plugins.append(plugin_object) + + # TODO: move this to a filter. + # pylint: disable=redundant-returns-doc + @classmethod + def GetFormatSpecification(cls): + """Retrieves the format specification. + + Returns: + FormatSpecification: a format specification or None if not available. + """ + return + + @classmethod + def GetPluginNames(cls): + """Retrieves the names of registered plugins. + + Returns: + list[str]: names of the plugins. + """ + return list(cls._plugin_classes.keys()) + + @classmethod + def GetPluginObjectByName(cls, plugin_name): + """Retrieves a specific plugin object by its name. + + Args: + plugin_name (str): name of the plugin. + + Returns: + BasePlugin: a plugin object or None if not available. + """ + plugin_class = cls._plugin_classes.get(plugin_name, None) + if plugin_class: + return plugin_class() + + return None + + @classmethod + def GetPlugins(cls): + """Retrieves the registered plugins. + + Yields: + tuple[str, type]: name and class of the plugin. + """ + for plugin_name, plugin_class in cls._plugin_classes.items(): + yield plugin_name, plugin_class + + @classmethod + def RegisterPlugin(cls, plugin_class): + """Registers a plugin class. + + The plugin classes are identified based on their lower case name. + + Args: + plugin_class (type): class of the plugin. + + Raises: + KeyError: if plugin class is already set for the corresponding name. + """ + plugin_name = plugin_class.NAME.lower() + if plugin_name in cls._plugin_classes: + raise KeyError(( + 'Plugin class already set for name: {0:s}.').format( + plugin_class.NAME)) + + cls._plugin_classes[plugin_name] = plugin_class + + @classmethod + def RegisterPlugins(cls, plugin_classes): + """Registers plugin classes. + + Args: + plugin_classes (list[type]): classes of plugins. + + Raises: + KeyError: if plugin class is already set for the corresponding name. + """ + for plugin_class in plugin_classes: + cls.RegisterPlugin(plugin_class) + + @classmethod + def SupportsPlugins(cls): + """Determines if a parser supports plugins. + + Returns: + bool: True if the parser supports plugins. + """ + return cls._plugin_classes is not None + + +class FileEntryParser(BaseParser): + """The file entry parser interface.""" + + def Parse(self, parser_mediator): + """Parsers the file entry and extracts event objects. + + Args: + parser_mediator (ParserMediator): a parser mediator. + + Raises: + UnableToParseFile: when the file cannot be parsed. + """ + file_entry = parser_mediator.GetFileEntry() + if not file_entry: + raise errors.UnableToParseFile('Invalid file entry') + + parser_mediator.AppendToParserChain(self) + try: + self.ParseFileEntry(parser_mediator, file_entry) + finally: + parser_mediator.PopFromParserChain() + + @abc.abstractmethod + def ParseFileEntry(self, parser_mediator, file_entry): + """Parses a file entry. + + Args: + parser_mediator (ParserMediator): a parser mediator. + file_entry (dfvfs.FileEntry): a file entry to parse. + + Raises: + UnableToParseFile: when the file cannot be parsed. + """ + + +class FileObjectParser(BaseParser): + """The file-like object parser interface.""" + + # The initial file offset. Set this value to None if no initial + # file offset seek needs to be performed. + _INITIAL_FILE_OFFSET = 0 + + def Parse(self, parser_mediator, file_object): + """Parses a single file-like object. + + Args: + parser_mediator (ParserMediator): a parser mediator. + file_object (dvfvs.FileIO): a file-like object to parse. + + Raises: + UnableToParseFile: when the file cannot be parsed. + """ + if not file_object: + raise errors.UnableToParseFile('Invalid file object') + + if self._INITIAL_FILE_OFFSET is not None: + file_object.seek(self._INITIAL_FILE_OFFSET, os.SEEK_SET) + + parser_mediator.AppendToParserChain(self) + try: + self.ParseFileObject(parser_mediator, file_object) + finally: + parser_mediator.PopFromParserChain() + + @abc.abstractmethod + def ParseFileObject(self, parser_mediator, file_object): + """Parses a file-like object. + + Args: + parser_mediator (ParserMediator): a parser mediator. + file_object (dvfvs.FileIO): a file-like object to parse. + + Raises: + UnableToParseFile: when the file cannot be parsed. + """ diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/mediator.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/mediator.py new file mode 100644 index 0000000000000000000000000000000000000000..fbe2b336c51c42ffb848e80d51d480d2b778a9d3 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/mediator.py @@ -0,0 +1,636 @@ +# -*- coding: utf-8 -*- +"""The parser mediator.""" + +import copy +import datetime +import time + +from dfvfs.lib import definitions as dfvfs_definitions + +from plaso.containers import warnings +from plaso.engine import path_helper +from plaso.engine import profilers +from plaso.lib import errors +from plaso.parsers import logger + + +class ParserMediator(object): + """Parser mediator. + + Attributes: + collection_filters_helper (CollectionFiltersHelper): collection filters + helper. + last_activity_timestamp (int): timestamp received that indicates the last + time activity was observed. The last activity timestamp is updated + when the mediator produces an attribute container, such as an event + source. This timestamp is used by the multi processing worker process + to indicate the last time the worker was known to be active. This + information is then used by the foreman to detect workers that are + not responding (stalled). + """ + _INT64_MIN = -1 << 63 + _INT64_MAX = (1 << 63) - 1 + + def __init__( + self, storage_writer, knowledge_base, collection_filters_helper=None, + preferred_year=None, resolver_context=None, temporary_directory=None): + """Initializes a parser mediator. + + Args: + storage_writer (StorageWriter): storage writer. + knowledge_base (KnowledgeBase): contains information from the source + data needed for parsing. + collection_filters_helper (Optional[CollectionFiltersHelper]): collection + filters helper. + preferred_year (Optional[int]): preferred year. + resolver_context (Optional[dfvfs.Context]): resolver context. + temporary_directory (Optional[str]): path of the directory for temporary + files. + """ + super(ParserMediator, self).__init__() + self._abort = False + self._cpu_time_profiler = None + self._event_data_stream_identifier = None + self._file_entry = None + self._knowledge_base = knowledge_base + self._last_event_data_hash = None + self._last_event_data_identifier = None + self._memory_profiler = None + self._number_of_event_sources = 0 + self._number_of_events = 0 + self._number_of_extraction_warnings = 0 + self._number_of_recovery_warnings = 0 + self._parser_chain_components = [] + self._preferred_year = preferred_year + self._process_information = None + self._resolver_context = resolver_context + self._storage_writer = storage_writer + self._temporary_directory = temporary_directory + + self.collection_filters_helper = collection_filters_helper + self.last_activity_timestamp = 0.0 + + @property + def abort(self): + """bool: True if parsing should be aborted.""" + return self._abort + + @property + def codepage(self): + """str: codepage.""" + return self._knowledge_base.codepage + + @property + def hostname(self): + """str: hostname.""" + return self._knowledge_base.hostname + + @property + def knowledge_base(self): + """KnowledgeBase: knowledge base.""" + return self._knowledge_base + + @property + def number_of_produced_event_sources(self): + """int: number of produced event sources.""" + return self._number_of_event_sources + + @property + def number_of_produced_events(self): + """int: number of produced events.""" + return self._number_of_events + + @property + def number_of_produced_warnings(self): + """int: number of produced warnings.""" + return ( + self._number_of_extraction_warnings + self._number_of_recovery_warnings) + + @property + def operating_system(self): + """str: operating system or None if not set.""" + return self._knowledge_base.GetValue('operating_system') + + @property + def resolver_context(self): + """dfvfs.Context: resolver context.""" + return self._resolver_context + + @property + def temporary_directory(self): + """str: path of the directory for temporary files.""" + return self._temporary_directory + + @property + def timezone(self): + """datetime.tzinfo: timezone.""" + return self._knowledge_base.timezone + + @property + def year(self): + """int: year.""" + return self._knowledge_base.year + + def _GetEarliestYearFromFileEntry(self): + """Retrieves the year from the file entry date and time values. + + This function uses the creation time if available otherwise the change + time (metadata last modification time) is used. + + Returns: + int: year of the file entry or None. + """ + file_entry = self.GetFileEntry() + if not file_entry: + return None + + date_time = file_entry.creation_time + if not date_time: + date_time = file_entry.change_time + + # Gzip files do not store a creation or change time, but its modification + # time is a good alternative. + if file_entry.TYPE_INDICATOR == dfvfs_definitions.TYPE_INDICATOR_GZIP: + date_time = file_entry.modification_time + + if date_time is None: + logger.warning('File entry has no creation or change time.') + return None + + year, _, _ = date_time.GetDate() + return year + + def _GetLatestYearFromFileEntry(self): + """Retrieves the maximum (highest value) year from the file entry. + + This function uses the modification time if available otherwise the change + time (metadata last modification time) is used. + + Returns: + int: year of the file entry or None if the year cannot be retrieved. + """ + file_entry = self.GetFileEntry() + if not file_entry: + return None + + date_time = file_entry.modification_time + if not date_time: + date_time = file_entry.change_time + + if date_time is None: + logger.warning('File entry has no modification or change time.') + return None + + year, _, _ = date_time.GetDate() + return year + + def AppendToParserChain(self, plugin_or_parser): + """Adds a parser or parser plugin to the parser chain. + + Args: + plugin_or_parser (BaseParser): parser or parser plugin. + """ + self._parser_chain_components.append(plugin_or_parser.NAME) + + def ClearParserChain(self): + """Clears the parser chain.""" + self._parser_chain_components = [] + + def GetDisplayName(self, file_entry=None): + """Retrieves the display name for a file entry. + + Args: + file_entry (Optional[dfvfs.FileEntry]): file entry object, where None + will return the display name of self._file_entry. + + Returns: + str: human readable string that describes the path to the file entry. + + Raises: + ValueError: if the file entry is missing. + """ + if file_entry is None: + file_entry = self._file_entry + + if file_entry is None: + raise ValueError('Missing file entry') + + path_spec = getattr(file_entry, 'path_spec', None) + + mount_path = self._knowledge_base.GetMountPath() + relative_path = path_helper.PathHelper.GetRelativePathForPathSpec( + path_spec, mount_path=mount_path) + if not relative_path: + return file_entry.name + + text_prepend = self._knowledge_base.GetTextPrepend() + return path_helper.PathHelper.GetDisplayNameForPathSpec( + path_spec, mount_path=mount_path, text_prepend=text_prepend) + + def GetDisplayNameForPathSpec(self, path_spec): + """Retrieves the display name for a path specification. + + Args: + path_spec (dfvfs.PathSpec): path specification. + + Returns: + str: human readable version of the path specification. + """ + mount_path = self._knowledge_base.GetMountPath() + text_prepend = self._knowledge_base.GetTextPrepend() + return path_helper.PathHelper.GetDisplayNameForPathSpec( + path_spec, mount_path=mount_path, text_prepend=text_prepend) + + def GetEstimatedYear(self): + """Retrieves an estimate of the year. + + This function determines the year in the following manner: + * determine if the user provided a preferred year; + * determine if knowledge base defines a year derived from preprocessing; + * determine the year based on the file entry metadata; + * default to the current year; + + Returns: + int: estimated year. + """ + # TODO: improve this method to get a more reliable estimate. + # Preserve the year-less date and sort this out in the psort phase. + if self._preferred_year: + return self._preferred_year + + if self._knowledge_base.year: + return self._knowledge_base.year + + # TODO: Find a decent way to actually calculate the correct year + # instead of relying on file entry timestamps. + year = self._GetEarliestYearFromFileEntry() + if not year: + year = self._GetLatestYearFromFileEntry() + + if not year: + year = self.GetCurrentYear() + + return year + + def GetFileEntry(self): + """Retrieves the active file entry. + + Returns: + dfvfs.FileEntry: file entry. + """ + return self._file_entry + + def GetFilename(self): + """Retrieves the name of the active file entry. + + Returns: + str: name of the active file entry or None. + """ + if not self._file_entry: + return None + + data_stream = getattr(self._file_entry.path_spec, 'data_stream', None) + if data_stream: + return '{0:s}:{1:s}'.format(self._file_entry.name, data_stream) + + return self._file_entry.name + + def GetCurrentYear(self): + """Retrieves current year. + + Returns: + int: the current year. + """ + datetime_object = datetime.datetime.now() + return datetime_object.year + + def GetLatestYear(self): + """Retrieves the latest (newest) year for an event from a file. + + This function tries to determine the year based on the file entry metadata, + if that fails the current year is used. + + Returns: + int: year of the file entry or the current year. + """ + year = self._GetLatestYearFromFileEntry() + if not year: + year = self.GetCurrentYear() + + return year + + def GetParserChain(self): + """Retrieves the current parser chain. + + Returns: + str: parser chain. + """ + return '/'.join(self._parser_chain_components) + + def GetRelativePath(self): + """Retrieves the relative path of the current file entry. + + Returns: + str: relateive path of the current file entry or None if no current + file entry. + """ + if self._file_entry is None: + return None + + mount_path = self._knowledge_base.GetMountPath() + return path_helper.PathHelper.GetRelativePathForPathSpec( + self._file_entry.path_spec, mount_path=mount_path) + + def GetRelativePathForPathSpec(self, path_spec): + """Retrieves the relative path for a path specification. + + Args: + path_spec (dfvfs.PathSpec): path specification. + + Returns: + str: relateive path of the path specification. + """ + mount_path = self._knowledge_base.GetMountPath() + return path_helper.PathHelper.GetRelativePathForPathSpec( + path_spec, mount_path=mount_path) + + def PopFromParserChain(self): + """Removes the last added parser or parser plugin from the parser chain.""" + self._parser_chain_components.pop() + + def ProcessEventData( + self, event_data, parser_chain=None, file_entry=None, query=None): + """Processes event data before it written to the storage. + + Args: + event_data (EventData): event data. + parser_chain (Optional[str]): parsing chain up to this point. + file_entry (Optional[dfvfs.FileEntry]): file entry, where None will + use the current file entry set in the mediator. + query (Optional[str]): query that was used to obtain the event data. + + Raises: + KeyError: if there's an attempt to add a duplicate attribute value to the + event data. + """ + # TODO: rename this to event_data.parser_chain or equivalent. + if not getattr(event_data, 'parser', None) and parser_chain: + event_data.parser = parser_chain + + if file_entry is None: + file_entry = self._file_entry + + if not getattr(event_data, 'hostname', None) and self.hostname: + event_data.hostname = self.hostname + + if not getattr(event_data, 'username', None): + user_sid = getattr(event_data, 'user_sid', None) + username = self._knowledge_base.GetUsernameByIdentifier(user_sid) + if username: + event_data.username = username + + if not getattr(event_data, 'query', None) and query: + event_data.query = query + + def ProduceEventDataStream(self, event_data_stream): + """Produces an event data stream. + + Args: + event_data_stream (EventDataStream): an event data stream or None if no + event data stream is needed. + + Raises: + RuntimeError: when storage writer is not set. + """ + if not self._storage_writer: + raise RuntimeError('Storage writer not set.') + + if not event_data_stream: + self._event_data_stream_identifier = None + else: + if not event_data_stream.path_spec: + event_data_stream.path_spec = getattr( + self._file_entry, 'path_spec', None) + + self._storage_writer.AddEventDataStream(event_data_stream) + + self._event_data_stream_identifier = event_data_stream.GetIdentifier() + + self.last_activity_timestamp = time.time() + + def ProduceEventSource(self, event_source): + """Produces an event source. + + Args: + event_source (EventSource): an event source. + + Raises: + RuntimeError: when storage writer is not set. + """ + if not self._storage_writer: + raise RuntimeError('Storage writer not set.') + + self._storage_writer.AddEventSource(event_source) + self._number_of_event_sources += 1 + + self.last_activity_timestamp = time.time() + + def ProduceEventWithEventData(self, event, event_data): + """Produces an event. + + Args: + event (EventObject): event. + event_data (EventData): event data. + + Raises: + InvalidEvent: if the event timestamp value is not set or out of bounds or + if the event data (attribute container) values cannot be hashed. + """ + if event.timestamp is None: + raise errors.InvalidEvent('Event timestamp value not set.') + + if event.timestamp < self._INT64_MIN or event.timestamp > self._INT64_MAX: + raise errors.InvalidEvent('Event timestamp value out of bounds.') + + try: + event_data_hash = event_data.GetAttributeValuesHash() + except TypeError as exception: + raise errors.InvalidEvent( + 'Unable to hash event data values with error: {0!s}'.format( + exception)) + + if event_data_hash != self._last_event_data_hash: + # Make a copy of the event data before adding additional values. + event_data = copy.deepcopy(event_data) + + self.ProcessEventData( + event_data, parser_chain=self.GetParserChain(), + file_entry=self._file_entry) + + if self._event_data_stream_identifier: + event_data.SetEventDataStreamIdentifier( + self._event_data_stream_identifier) + + self._storage_writer.AddEventData(event_data) + + self._last_event_data_hash = event_data_hash + self._last_event_data_identifier = event_data.GetIdentifier() + + if self._last_event_data_identifier: + event.SetEventDataIdentifier(self._last_event_data_identifier) + + # TODO: remove this after structural fix is in place + # https://github.com/log2timeline/plaso/issues/1691 + event.parser = self.GetParserChain() + + self._storage_writer.AddEvent(event) + self._number_of_events += 1 + + self.last_activity_timestamp = time.time() + + def ProduceExtractionWarning(self, message, path_spec=None): + """Produces an extraction warning. + + Args: + message (str): message of the warning. + path_spec (Optional[dfvfs.PathSpec]): path specification, where None + will use the path specification of current file entry set in + the mediator. + + Raises: + RuntimeError: when storage writer is not set. + """ + if not self._storage_writer: + raise RuntimeError('Storage writer not set.') + + if not path_spec and self._file_entry: + path_spec = self._file_entry.path_spec + + parser_chain = self.GetParserChain() + warning = warnings.ExtractionWarning( + message=message, parser_chain=parser_chain, path_spec=path_spec) + self._storage_writer.AddExtractionWarning(warning) + self._number_of_extraction_warnings += 1 + + self.last_activity_timestamp = time.time() + + def ProduceRecoveryWarning(self, message, path_spec=None): + """Produces a recovery warning. + + Args: + message (str): message of the warning. + path_spec (Optional[dfvfs.PathSpec]): path specification, where None + will use the path specification of current file entry set in + the mediator. + + Raises: + RuntimeError: when storage writer is not set. + """ + if not self._storage_writer: + raise RuntimeError('Storage writer not set.') + + if not path_spec and self._file_entry: + path_spec = self._file_entry.path_spec + + parser_chain = self.GetParserChain() + warning = warnings.RecoveryWarning( + message=message, parser_chain=parser_chain, path_spec=path_spec) + self._storage_writer.AddRecoveryWarning(warning) + self._number_of_recovery_warnings += 1 + + self.last_activity_timestamp = time.time() + + def ResetFileEntry(self): + """Resets the active file entry.""" + self._file_entry = None + + def SampleMemoryUsage(self, parser_name): + """Takes a sample of the memory usage for profiling. + + Args: + parser_name (str): name of the parser. + """ + if self._memory_profiler: + used_memory = self._process_information.GetUsedMemory() or 0 + self._memory_profiler.Sample(parser_name, used_memory) + + def SampleStartTiming(self, parser_name): + """Starts timing a CPU time sample for profiling. + + Args: + parser_name (str): name of the parser. + """ + if self._cpu_time_profiler: + self._cpu_time_profiler.StartTiming(parser_name) + + def SampleStopTiming(self, parser_name): + """Stops timing a CPU time sample for profiling. + + Args: + parser_name (str): name of the parser. + """ + if self._cpu_time_profiler: + self._cpu_time_profiler.StopTiming(parser_name) + + def SetFileEntry(self, file_entry): + """Sets the active file entry. + + Args: + file_entry (dfvfs.FileEntry): file entry. + """ + self._file_entry = file_entry + self._event_data_stream_identifier = None + + def SetStorageWriter(self, storage_writer): + """Sets the storage writer. + + Args: + storage_writer (StorageWriter): storage writer. + """ + self._storage_writer = storage_writer + + # Reset the last event data information. Each storage file should + # contain event data for their events. + self._last_event_data_hash = None + self._last_event_data_identifier = None + + def SignalAbort(self): + """Signals the parsers to abort.""" + self._abort = True + + def StartProfiling(self, configuration, identifier, process_information): + """Starts profiling. + + Args: + configuration (ProfilingConfiguration): profiling configuration. + identifier (str): identifier of the profiling session used to create + the sample filename. + process_information (ProcessInfo): process information. + """ + if not configuration: + return + + if configuration.HaveProfileParsers(): + identifier = '{0:s}-parsers'.format(identifier) + + self._cpu_time_profiler = profilers.CPUTimeProfiler( + identifier, configuration) + self._cpu_time_profiler.Start() + + self._memory_profiler = profilers.MemoryProfiler( + identifier, configuration) + self._memory_profiler.Start() + + self._process_information = process_information + + def StopProfiling(self): + """Stops profiling.""" + if self._cpu_time_profiler: + self._cpu_time_profiler.Stop() + self._cpu_time_profiler = None + + if self._memory_profiler: + self._memory_profiler.Stop() + self._memory_profiler = None + + self._process_information = None diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/plugins.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/plugins.py new file mode 100644 index 0000000000000000000000000000000000000000..9db2326bb71f9cab9dd1f547806811362a16c5f0 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/plugins.py @@ -0,0 +1,6 @@ +class BasePlugin: + def Process(self, parser_mediator, **kwargs): + return None + + def UpdateChainAndProcess(self, parser_mediator, registry_key, **kwargs): + return self.Process(parser_mediator, registry_key=registry_key, **kwargs) diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_parser.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_parser.py new file mode 100644 index 0000000000000000000000000000000000000000..211e8ecc3c559ce7067a2eb07b4b39ccb70035d0 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_parser.py @@ -0,0 +1,259 @@ +# -*- coding: utf-8 -*- +"""Parser for Windows NT Registry (REGF) files.""" + +from dfwinreg import errors as dfwinreg_errors +from dfwinreg import regf as dfwinreg_regf +from dfwinreg import registry as dfwinreg_registry +from dfwinreg import registry_searcher as dfwinreg_registry_searcher + +from plaso.engine import artifact_filters +from plaso.lib import specification +from plaso.filters import path_filter +from plaso.parsers import interface +from plaso.parsers import logger +from plaso.parsers import manager + + +class WinRegistryParser(interface.FileObjectParser): + """Parses Windows NT Registry (REGF) files.""" + + NAME = 'winreg' + DATA_FORMAT = 'Windows NT Registry (REGF) file' + + _plugin_classes = {} + + _CONTROL_SET_PREFIX = ( + 'HKEY_LOCAL_MACHINE\\System\\ControlSet').lower() + + _NORMALIZED_CONTROL_SET_PREFIX = ( + 'HKEY_LOCAL_MACHINE\\System\\CurrentControlSet').lower() + + def __init__(self): + """Initializes a parser.""" + super(WinRegistryParser, self).__init__() + self._plugin_per_key_path = {} + self._plugins_without_key_paths = [] + + default_plugin_list_index = None + key_paths = [] + + for list_index, plugin in enumerate(self._plugins): + if plugin.NAME == 'winreg_default': + default_plugin_list_index = list_index + continue + + for registry_key_filter in plugin.FILTERS: + plugin_key_paths = getattr(registry_key_filter, 'key_paths', []) + if (not plugin_key_paths and + plugin not in self._plugins_without_key_paths): + self._plugins_without_key_paths.append(plugin) + continue + + for plugin_key_path in plugin_key_paths: + plugin_key_path = plugin_key_path.lower() + if plugin_key_path in self._plugin_per_key_path: + logger.warning(( + 'Windows Registry key path: {0:s} defined by plugin: {1:s} ' + 'already set by plugin: {2:s}').format( + plugin_key_path, plugin.NAME, + self._plugin_per_key_path[plugin_key_path].NAME)) + continue + + self._plugin_per_key_path[plugin_key_path] = plugin + + key_paths.append(plugin_key_path) + + if default_plugin_list_index is not None: + self._default_plugin = self._plugins.pop(default_plugin_list_index) + + self._path_filter = path_filter.PathFilterScanTree( + key_paths, case_sensitive=False, path_segment_separator='\\') + + def _CanProcessKeyWithPlugin(self, registry_key, plugin): + """Determines if a plugin can process a Windows Registry key or its values. + + Args: + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + plugin (WindowsRegistryPlugin): Windows Registry plugin. + + Returns: + bool: True if the Registry key can be processed with the plugin. + """ + for registry_key_filter in plugin.FILTERS: + # Skip filters that define key paths since they are already + # checked by the path filter. + if getattr(registry_key_filter, 'key_paths', []): + continue + + if registry_key_filter.Match(registry_key): + return True + + return False + + @classmethod + def GetFormatSpecification(cls): + """Retrieves the format specification.""" + format_specification = specification.FormatSpecification(cls.NAME) + format_specification.AddNewSignature(b'regf', offset=0) + return format_specification + + def _ParseKeyWithPlugin(self, parser_mediator, registry_key, plugin): + """Parses the Registry key with a specific plugin. + + Args: + parser_mediator (ParserMediator): parser mediator. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + plugin (WindowsRegistryPlugin): Windows Registry plugin. + """ + try: + plugin.UpdateChainAndProcess(parser_mediator, registry_key) + except (IOError, dfwinreg_errors.WinRegistryValueError) as exception: + parser_mediator.ProduceExtractionWarning( + 'in key: {0:s} error: {1!s}'.format(registry_key.path, exception)) + + def _NormalizeKeyPath(self, key_path): + """Normalizes a Windows Registry key path. + + Args: + key_path (str): Windows Registry key path. + + Returns: + str: normalized Windows Registry key path. + """ + normalized_key_path = key_path.lower() + # The Registry key path should start with: + # HKEY_LOCAL_MACHINE\System\ControlSet followed by 3 digits + # which makes 39 characters. + if (len(normalized_key_path) < 39 or + not normalized_key_path.startswith(self._CONTROL_SET_PREFIX)): + return normalized_key_path + + # Key paths that contain ControlSet### must be normalized to + # CurrentControlSet. + return ''.join([ + self._NORMALIZED_CONTROL_SET_PREFIX, normalized_key_path[39:]]) + + def _ParseKey(self, parser_mediator, registry_key): + """Parses the Registry key with a specific plugin. + + Args: + parser_mediator (ParserMediator): parser mediator. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + """ + matching_plugin = None + + logger.debug('Parsing Windows Registry key: {0:s}'.format( + registry_key.path)) + + normalized_key_path = self._NormalizeKeyPath(registry_key.path) + if self._path_filter.CheckPath(normalized_key_path): + matching_plugin = self._plugin_per_key_path[normalized_key_path] + else: + for plugin in self._plugins_without_key_paths: + if self._CanProcessKeyWithPlugin(registry_key, plugin): + matching_plugin = plugin + break + + if not matching_plugin: + matching_plugin = self._default_plugin + + if matching_plugin: + self._ParseKeyWithPlugin(parser_mediator, registry_key, matching_plugin) + + def _ParseRecurseKeys(self, parser_mediator, registry_key): + """Parses the Registry keys recursively. + + Args: + parser_mediator (ParserMediator): parser mediator. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + """ + # Note that we do not use dfWinReg generators here to be able to catch + # exceptions raised by corrupt files. + + self._ParseKey(parser_mediator, registry_key) + + for subkey_index in range(registry_key.number_of_subkeys): + if parser_mediator.abort: + break + + try: + subkey = registry_key.GetSubkeyByIndex(subkey_index) + self._ParseRecurseKeys(parser_mediator, subkey) + + except IOError as exception: + parser_mediator.ProduceExtractionWarning( + 'in key: {0:s} error: {1!s}'.format(registry_key.path, exception)) + + def _ParseKeysFromFindSpecs(self, parser_mediator, win_registry, find_specs): + """Parses the Registry keys from FindSpecs. + + Args: + parser_mediator (ParserMediator): parser mediator. + win_registry (dfwinreg.WinRegistryKey): root Windows Registry key. + find_specs (dfwinreg.FindSpecs): Keys to search for. + """ + searcher = dfwinreg_registry_searcher.WinRegistrySearcher(win_registry) + for registry_key_path in searcher.Find(find_specs=find_specs): + if parser_mediator.abort: + break + + registry_key = searcher.GetKeyByPath(registry_key_path) + self._ParseKey(parser_mediator, registry_key) + + def ParseFileObject(self, parser_mediator, file_object): + """Parses a Windows Registry file-like object. + + Args: + parser_mediator (ParserMediator): parser mediator. + file_object (dfvfs.FileIO): a file-like object. + """ + # TODO: set codepage from mediator. + registry_file = dfwinreg_regf.REGFWinRegistryFile( + ascii_codepage='cp1252', emulate_virtual_keys=False) + + try: + registry_file.Open(file_object) + except IOError as exception: + parser_mediator.ProduceExtractionWarning( + 'unable to open Windows Registry file with error: {0!s}'.format( + exception)) + return + + try: + win_registry = dfwinreg_registry.WinRegistry() + + key_path_prefix = win_registry.GetRegistryFileMapping(registry_file) + registry_file.SetKeyPathPrefix(key_path_prefix) + root_key = registry_file.GetRootKey() + if root_key: + registry_find_specs = getattr( + parser_mediator.collection_filters_helper, 'registry_find_specs', + None) + + if not registry_find_specs: + self._ParseRecurseKeys(parser_mediator, root_key) + else: + artifacts_filters_helper = ( + artifact_filters.ArtifactDefinitionsFiltersHelper) + if not artifacts_filters_helper.CheckKeyCompatibility( + key_path_prefix): + logger.warning(( + 'Artifacts filters are not supported for Windows Registry file ' + 'with key path prefix: "{0:s}".').format(key_path_prefix)) + else: + win_registry.MapFile(key_path_prefix, registry_file) + # Note that win_registry will close the mapped registry_file. + registry_file = None + + self._ParseKeysFromFindSpecs( + parser_mediator, win_registry, registry_find_specs) + + except IOError as exception: + parser_mediator.ProduceExtractionWarning('{0!s}'.format(exception)) + + finally: + if registry_file: + registry_file.Close() + + +manager.ParsersManager.RegisterParser(WinRegistryParser) diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/default.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/default.py new file mode 100644 index 0000000000000000000000000000000000000000..0fdec0fca4a059dbf5f18fc22c0f26b69da7e7cc --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/default.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +"""The default Windows Registry plugin.""" + +from plaso.parsers import winreg_parser +from plaso.parsers.winreg_plugins import interface + + +class DefaultPlugin(interface.WindowsRegistryPlugin): + """Default plugin that extracts minimum information from every Registry key. + + The default plugin will parse every Registry key that is passed to it and + extract minimum information, such as a list of available values and if + possible content of those values. The timestamp used is the timestamp + when the Registry key was last modified. + """ + + NAME = 'winreg_default' + DATA_FORMAT = 'Windows Registry data' + + def ExtractEvents(self, parser_mediator, registry_key, **kwargs): + """Extracts events from a Windows Registry key. + + Args: + parser_mediator (ParserMediator): mediates interactions between parsers + and other components, such as storage and dfvfs. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + """ + self._ProduceDefaultWindowsRegistryEvent(parser_mediator, registry_key) + + +winreg_parser.WinRegistryParser.RegisterPlugin(DefaultPlugin) diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/interface.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/interface.py new file mode 100644 index 0000000000000000000000000000000000000000..79e6a989992da4b8c24f0472decd2518adf4715c --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/interface.py @@ -0,0 +1,338 @@ +# -*- coding: utf-8 -*- +"""The Windows Registry plugin interface.""" + +import abc + +from plaso.containers import time_events +from plaso.containers import windows_events +from plaso.lib import definitions +from plaso.parsers import plugins + + +class BaseWindowsRegistryKeyFilter(object): + """The Windows Registry key filter interface.""" + + @property + def key_paths(self): + """list[str]: key paths defined by the filter.""" + return [] + + # pylint: disable=redundant-returns-doc + @abc.abstractmethod + def Match(self, registry_key): + """Determines if a Windows Registry key matches the filter. + + Args: + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + + Returns: + bool: True if the keys match. + """ + + +class WindowsRegistryKeyPathFilter(BaseWindowsRegistryKeyFilter): + """Windows Registry key path filter.""" + + _CONTROL_SET_PREFIX = ( + 'HKEY_LOCAL_MACHINE\\System\\CurrentControlSet') + + # This list must be ordered with most specific matches first. + _WOW64_PREFIXES = [ + 'HKEY_CURRENT_USER\\Software\\Classes', + 'HKEY_CURRENT_USER\\Software', + 'HKEY_LOCAL_MACHINE\\Software\\Classes', + 'HKEY_LOCAL_MACHINE\\Software'] + + def __init__(self, key_path): + """Initializes a Windows Registry key filter. + + Args: + key_path (str): key path. + """ + super(WindowsRegistryKeyPathFilter, self).__init__() + + key_path.rstrip('\\') + self._key_path = key_path + + key_path = key_path.upper() + self._key_path_upper = key_path + + self._wow64_key_path = None + self._wow64_key_path_upper = None + + if key_path.startswith(self._CONTROL_SET_PREFIX.upper()): + self._key_path_prefix, _, self._key_path_suffix = key_path.partition( + 'CurrentControlSet'.upper()) + + else: + self._key_path_prefix = None + self._key_path_suffix = None + + # Handle WoW64 Windows Registry key redirection. + # Also see: + # https://msdn.microsoft.com/en-us/library/windows/desktop/ + # ms724072%28v=vs.85%29.aspx + # https://msdn.microsoft.com/en-us/library/windows/desktop/ + # aa384253(v=vs.85).aspx + wow64_prefix = None + for key_path_prefix in self._WOW64_PREFIXES: + if key_path.startswith(key_path_prefix.upper()): + wow64_prefix = key_path_prefix + break + + if wow64_prefix: + key_path_suffix = self._key_path[len(wow64_prefix):] + self._wow64_key_path = '\\'.join([wow64_prefix, 'Wow6432Node']) + + if key_path_suffix.startswith('\\'): + key_path_suffix = key_path_suffix[1:] + if key_path_suffix: + self._wow64_key_path = '\\'.join([ + self._wow64_key_path, key_path_suffix]) + self._wow64_key_path_upper = self._wow64_key_path.upper() + + @property + def key_paths(self): + """List of key paths defined by the filter.""" + if self._wow64_key_path: + return [self._key_path, self._wow64_key_path] + return [self._key_path] + + def Match(self, registry_key): + """Determines if a Windows Registry key matches the filter. + + Args: + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + + Returns: + bool: True if the keys match. + """ + key_path = registry_key.path.upper() + if self._key_path_prefix and self._key_path_suffix: + if (key_path.startswith(self._key_path_prefix) and + key_path.endswith(self._key_path_suffix)): + + key_path_segment = key_path[ + len(self._key_path_prefix):-len(self._key_path_suffix)] + if key_path_segment.startswith('ControlSet'.upper()): + try: + control_set = int(key_path_segment[10:], 10) + except ValueError: + control_set = None + + # TODO: check if control_set is in bounds. + return control_set is not None + + return key_path in (self._key_path_upper, self._wow64_key_path_upper) + + +class WindowsRegistryKeyPathPrefixFilter(BaseWindowsRegistryKeyFilter): + """Windows Registry key path prefix filter.""" + + def __init__(self, key_path_prefix): + """Initializes a Windows Registry key filter. + + Args: + key_path_prefix (str): the key path prefix. + """ + super(WindowsRegistryKeyPathPrefixFilter, self).__init__() + self._key_path_prefix = key_path_prefix + + def Match(self, registry_key): + """Determines if a Windows Registry key matches the filter. + + Args: + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + + Returns: + bool: True if the keys match. + """ + return registry_key.path.startswith(self._key_path_prefix) + + +class WindowsRegistryKeyPathSuffixFilter(BaseWindowsRegistryKeyFilter): + """Windows Registry key path suffix filter.""" + + def __init__(self, key_path_suffix): + """Initializes a Windows Registry key filter. + + Args: + key_path_suffix (str): the key path suffix. + """ + super(WindowsRegistryKeyPathSuffixFilter, self).__init__() + self._key_path_suffix = key_path_suffix + + def Match(self, registry_key): + """Determines if a Windows Registry key matches the filter. + + Args: + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + + Returns: + bool: True if the keys match. + """ + return registry_key.path.endswith(self._key_path_suffix) + + +class WindowsRegistryKeyWithValuesFilter(BaseWindowsRegistryKeyFilter): + """Windows Registry key with values filter.""" + + _EMPTY_SET = frozenset() + + def __init__(self, value_names): + """Initializes a Windows Registry key filter. + + Args: + value_names (list[str]): name of values that should be present in the key. + """ + super(WindowsRegistryKeyWithValuesFilter, self).__init__() + self._value_names = frozenset(value_names) + + def Match(self, registry_key): + """Determines if a Windows Registry key matches the filter. + + Args: + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + + Returns: + bool: True if the keys match. + """ + value_names = frozenset([ + registry_value.name for registry_value in registry_key.GetValues()]) + + return self._value_names.issubset(value_names) + + +class WindowsRegistryPlugin(plugins.BasePlugin): + """The Windows Registry plugin interface.""" + + NAME = 'winreg_plugin' + DATA_FORMAT = 'Windows Registry data' + + # List of Windows Registry key filters (instances of + # BaseWindowsRegistryKeyFilter) that should match for the plugin to + # parse the Windows Registry key or its values. + FILTERS = frozenset() + + def _GetValuesFromKey(self, registry_key, names_to_skip=None): + """Retrieves the values from a Windows Registry key. + + Where: + * the default value is represented as "(default)"; + * binary data values are represented as "(# bytes)", where # contains + the number of bytes of the data; + * empty values are represented as "(empty)". + * empty multi value string values are represented as "[]". + + Args: + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + names_to_skip (Optional[list[str]]): names of values that should + be skipped. + + Returns: + dict[str, object]: names and data of the values in the key. + """ + names_to_skip = [name.lower() for name in names_to_skip or []] + + values_dict = {} + for registry_value in registry_key.GetValues(): + value_name = registry_value.name or '(default)' + if value_name.lower() in names_to_skip: + continue + + if registry_value.data is None: + value_string = '(empty)' + else: + value_object = registry_value.GetDataAsObject() + + if registry_value.DataIsMultiString(): + value_string = '[{0:s}]'.format(', '.join(value_object or [])) + + elif (registry_value.DataIsInteger() or + registry_value.DataIsString()): + value_string = '{0!s}'.format(value_object) + + else: + # Represent remaining types like REG_BINARY and + # REG_RESOURCE_REQUIREMENT_LIST. + value_string = '({0:d} bytes)'.format(len(value_object)) + + data_type_string = registry_value.data_type_string + + value_string = '[{0:s}] {1:s}'.format(data_type_string, value_string) + values_dict[value_name] = value_string + + return values_dict + + def _ProduceDefaultWindowsRegistryEvent( + self, parser_mediator, registry_key, names_to_skip=None): + """Produces a default Windows Registry event. + + Args: + parser_mediator (ParserMediator): mediates interactions between parsers + and other components, such as storage and dfvfs. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + names_to_skip (Optional[list[str]]): names of values that should + be skipped. + """ + values_dict = self._GetValuesFromKey( + registry_key, names_to_skip=names_to_skip) + + event_data = windows_events.WindowsRegistryEventData() + event_data.key_path = registry_key.path + event_data.values = ' '.join([ + '{0:s}: {1!s}'.format(name, value) + for name, value in sorted(values_dict.items())]) or None + + event = time_events.DateTimeValuesEvent( + registry_key.last_written_time, definitions.TIME_DESCRIPTION_WRITTEN) + parser_mediator.ProduceEventWithEventData(event, event_data) + + # pylint: disable=arguments-differ + @abc.abstractmethod + def ExtractEvents(self, parser_mediator, registry_key, **kwargs): + """Extracts events from a Windows Registry key. + + Args: + parser_mediator (ParserMediator): mediates interactions between parsers + and other components, such as storage and dfvfs. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + """ + + # TODO: merge with UpdateChainAndProcess, also requires changes to tests. + def Process(self, parser_mediator, registry_key, **kwargs): + """Processes a Windows Registry key or value. + + Args: + parser_mediator (ParserMediator): mediates interactions between parsers + and other components, such as storage and dfvfs. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + + Raises: + ValueError: If the Windows Registry key is not set. + """ + if registry_key is None: + raise ValueError('Windows Registry key is not set.') + + # This will raise if unhandled keyword arguments are passed. + super(WindowsRegistryPlugin, self).Process(parser_mediator, **kwargs) + + self.ExtractEvents(parser_mediator, registry_key, **kwargs) + + # pylint: disable=arguments-differ + def UpdateChainAndProcess(self, parser_mediator, registry_key, **kwargs): + """Updates the parser chain and processes a Windows Registry key or value. + + Args: + parser_mediator (ParserMediator): mediates interactions between parsers + and other components, such as storage and dfvfs. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + + Raises: + ValueError: If the Windows Registry key is not set. + """ + parser_mediator.AppendToParserChain(self) + try: + self.Process(parser_mediator, registry_key, **kwargs) + finally: + parser_mediator.PopFromParserChain() diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py new file mode 100644 index 0000000000000000000000000000000000000000..7b749116f640aa78a8708e0871b5d415adf8ace3 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +"""This file contains the Network drive Registry plugin.""" + +from plaso.containers import events +from plaso.containers import time_events +from plaso.lib import definitions +from plaso.parsers import winreg_parser +from plaso.parsers.winreg_plugins import interface + + +class NetworkDriveEventData(events.EventData): + """Network drive event data attribute container. + + Attributes: + drive_letter (str): drive letter assigned to network drive. + key_path (str): Windows Registry key path. + server_name (str): name of the server of the network drive. + share_name (str): name of the share of the network drive. + """ + + DATA_TYPE = 'windows:registry:network_drive' + + def __init__(self): + """Initializes event data.""" + super(NetworkDriveEventData, self).__init__(data_type=self.DATA_TYPE) + self.drive_letter = None + self.key_path = None + self.server_name = None + self.share_name = None + + +class NetworkDrivesPlugin(interface.WindowsRegistryPlugin): + """Windows Registry plugin for parsing the Network key.""" + + NAME = 'network_drives' + DATA_FORMAT = 'Windows network drives Registry data' + + FILTERS = frozenset([ + interface.WindowsRegistryKeyPathFilter('HKEY_CURRENT_USER\\Network')]) + + def ExtractEvents(self, parser_mediator, registry_key, **kwargs): + """Extracts events from a Windows Registry key. + + Args: + parser_mediator (ParserMediator): mediates interactions between parsers + and other components, such as storage and dfvfs. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + """ + for subkey in registry_key.GetSubkeys(): + drive_letter = subkey.name + if not drive_letter: + continue + + server_name = None + share_name = None + + remote_path_value = subkey.GetValueByName('RemotePath') + if remote_path_value: + remote_path = remote_path_value.GetDataAsObject() + if remote_path.startswith('\\\\'): + server_name, _, share_name = remote_path[2:].partition('\\') + share_name = '\\{0:s}'.format(share_name.replace('#', '\\')) + + event_data = NetworkDriveEventData() + event_data.drive_letter = drive_letter + event_data.key_path = registry_key.path + event_data.server_name = server_name + event_data.share_name = share_name + + event = time_events.DateTimeValuesEvent( + subkey.last_written_time, definitions.TIME_DESCRIPTION_WRITTEN) + parser_mediator.ProduceEventWithEventData(event, event_data) + + +winreg_parser.WinRegistryParser.RegisterPlugin(NetworkDrivesPlugin) diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/services.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/services.py new file mode 100644 index 0000000000000000000000000000000000000000..9ad63e34a2ccd152de9e21c22602d5ab46bd9ee7 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/services.py @@ -0,0 +1,133 @@ +# -*- coding: utf-8 -*- +"""Windows drivers and services Registry key parser plugin.""" + +from plaso.containers import events +from plaso.containers import time_events +from plaso.lib import definitions +from plaso.parsers import winreg_parser +from plaso.parsers.winreg_plugins import interface + + +class WindowsRegistryServiceEventData(events.EventData): + """Windows Registry driver or service event data attribute container. + + Attributes: + error_control (int): error control value of the Windows driver or service + executable. + image_path (str): path of the Windows driver or service executable. + key_path (str): Windows Registry key path. + name (str): name of the Windows driver or service. + object_name (str): Windows service object name. + service_dll (str): Windows service DLL. + service_type (int): Windows driver or service type. + start_type (int): Device or service start type. + values (str): names and data of additional values in the key. + """ + + DATA_TYPE = 'windows:registry:service' + + def __init__(self): + """Initializes event data.""" + super(WindowsRegistryServiceEventData, self).__init__( + data_type=self.DATA_TYPE) + self.error_control = None + self.image_path = None + self.key_path = None + self.name = None + self.service_dll = None + self.object_name = None + self.service_type = None + self.start_type = None + self.values = None + + +class ServicesPlugin(interface.WindowsRegistryPlugin): + """Plug-in to format the Services and Drivers keys having Type and Start.""" + + NAME = 'windows_services' + DATA_FORMAT = 'Windows drivers and services Registry data' + + # TODO: use a key path prefix match here. Might be more efficient. + # HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Services + FILTERS = frozenset([ + interface.WindowsRegistryKeyWithValuesFilter([ + 'Start', 'Type'])]) + + def _GetServiceDll(self, key): + """Retrieves the service DLL value. + + Obtains the service DLL for in the Parameters subkey of a Windows Registry + service key. + + Args: + key (dfwinreg.WinRegistryKey): a Windows Registry key. + + Returns: + str: path of the service DLL or None. + """ + parameters_key = key.GetSubkeyByName('Parameters') + if not parameters_key: + return None + + service_dll = parameters_key.GetValueByName('ServiceDll') + if not service_dll: + return None + + return service_dll.GetDataAsObject() + + def ExtractEvents(self, parser_mediator, registry_key, **kwargs): + """Extracts events from a Windows Registry key. + + Args: + parser_mediator (ParserMediator): mediates interactions between parsers + and other components, such as storage and dfvfs. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + """ + service_type = None + start_type = None + + registry_value = registry_key.GetValueByName('Type') + if registry_value: + service_type = registry_value.GetDataAsObject() + + registry_value = registry_key.GetValueByName('Start') + if registry_value: + start_type = registry_value.GetDataAsObject() + + if None in (service_type, start_type): + # TODO: generate extraction warning. + return + + # Create a specific service event, so that we can recognize and expand + # certain values when we're outputting the event. + event_data = WindowsRegistryServiceEventData() + event_data.key_path = registry_key.path + event_data.name = registry_key.name + event_data.service_type = service_type + event_data.service_dll = self._GetServiceDll(registry_key) + event_data.start_type = start_type + + registry_value = registry_key.GetValueByName('ErrorControl') + if registry_value: + event_data.error_control = registry_value.GetDataAsObject() + + registry_value = registry_key.GetValueByName('ImagePath') + if registry_value: + event_data.image_path = registry_value.GetDataAsObject() + + registry_value = registry_key.GetValueByName('ObjectName') + if registry_value: + event_data.object_name = registry_value.GetDataAsObject() + + values_dict = self._GetValuesFromKey(registry_key, names_to_skip=[ + 'ErrorControl', 'ImagePath', 'ObjectName', 'Start', 'Type']) + event_data.values = ' '.join([ + '{0:s}: {1!s}'.format(name, value) + for name, value in sorted(values_dict.items())]) or None + + event = time_events.DateTimeValuesEvent( + registry_key.last_written_time, definitions.TIME_DESCRIPTION_WRITTEN) + parser_mediator.ProduceEventWithEventData(event, event_data) + + +winreg_parser.WinRegistryParser.RegisterPlugin(ServicesPlugin) diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py new file mode 100644 index 0000000000000000000000000000000000000000..ca424923d25485408fa74e43bcdc37e90e72fa9b --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/plaso/parsers/winreg_plugins/timezone.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +"""Plug-in to collect information about the Windows timezone settings.""" + +from plaso.containers import events +from plaso.containers import time_events +from plaso.lib import definitions +from plaso.parsers import winreg_parser +from plaso.parsers.winreg_plugins import interface + + +class WindowsTimezoneSettingsEventData(events.EventData): + """Timezone settings event data attribute container. + + Attributes: + configuration (str): timezone configuration. + key_path (str): Windows Registry key path. + """ + + DATA_TYPE = 'windows:registry:timezone' + + def __init__(self): + """Initializes event data.""" + super(WindowsTimezoneSettingsEventData, self).__init__( + data_type=self.DATA_TYPE) + self.configuration = None + self.key_path = None + + +class WinRegTimezonePlugin(interface.WindowsRegistryPlugin): + """Plug-in to collect information about the Windows timezone settings.""" + + NAME = 'windows_timezone' + DATA_FORMAT = 'Windows time zone Registry data' + + FILTERS = frozenset([ + interface.WindowsRegistryKeyPathFilter( + 'HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\' + 'TimeZoneInformation')]) + + _VALUE_NAMES = frozenset([ + 'ActiveTimeBias', 'Bias', 'DaylightBias', 'DaylightName', + 'DynamicDaylightTimeDisabled', 'StandardBias', 'StandardName', + 'TimeZoneKeyName']) + + def ExtractEvents(self, parser_mediator, registry_key, **kwargs): + """Extracts events from a Windows Registry key. + + Args: + parser_mediator (ParserMediator): mediates interactions between parsers + and other components, such as storage and dfvfs. + registry_key (dfwinreg.WinRegistryKey): Windows Registry key. + """ + if registry_key is None: + return + + configuration = [] + for value_name in self._VALUE_NAMES: + registry_value = registry_key.GetValueByName(value_name) + if not registry_value: + continue + + value = registry_value.GetDataAsObject() + if value is None: + continue + + configuration.append('{0:s}: {1!s}'.format(registry_value.name, value)) + + event_data = WindowsTimezoneSettingsEventData() + event_data.configuration = ' '.join(sorted(configuration)) or None + event_data.key_path = registry_key.path + + event = time_events.DateTimeValuesEvent( + registry_key.last_written_time, definitions.TIME_DESCRIPTION_WRITTEN) + parser_mediator.ProduceEventWithEventData(event, event_data) + + +winreg_parser.WinRegistryParser.RegisterPlugin(WinRegTimezonePlugin) diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/pytz/__init__.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/pytz/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..92264e612971474d5b1137ff304d31046fe3683b --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/pytz/__init__.py @@ -0,0 +1,3 @@ +import datetime + +UTC = datetime.timezone.utc diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/requirements.txt b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..5c37962fad6292915968301056ade78482dd0610 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/requirements.txt @@ -0,0 +1,57 @@ +pip >= 7.0.0 +PyYAML >= 3.10 +XlsxWriter >= 0.9.3 +artifacts >= 20190305 +bencode.py +certifi >= 2016.9.26 +cffi >= 1.9.1 +cryptography >= 2.0.2 +defusedxml >= 0.5.0 +dfdatetime >= 20210509 +dfvfs >= 20210522 +dfwinreg >= 20201002 +dtfabric >= 20200621 +elasticsearch >= 7.0 +future >= 0.16.0 +libbde-python >= 20140531 +libcreg-python >= 20200725 +libesedb-python >= 20150409 +libevt-python >= 20191104 +libevtx-python >= 20210424 +libewf-python >= 20131210 +libfsapfs-python >= 20201107 +libfsext-python >= 20200819 +libfshfs-python >= 20201103 +libfsntfs-python >= 20200805 +libfsxfs-python >= 20201114 +libfvde-python >= 20160719 +libfwnt-python >= 20180117 +libfwsi-python >= 20150606 +liblnk-python >= 20150830 +libluksde-python >= 20200101 +libmodi-python >= 20210405 +libmsiecf-python >= 20150314 +libolecf-python >= 20151223 +libqcow-python >= 20131204 +libregf-python >= 20201002 +libscca-python >= 20190605 +libsigscan-python >= 20190629 +libsmdev-python >= 20140529 +libsmraw-python >= 20140612 +libvhdi-python >= 20131210 +libvmdk-python >= 20140421 +libvsgpt-python >= 20210115 +libvshadow-python >= 20160109 +libvslvm-python >= 20160109 +lz4 >= 0.10.0 +pefile >= 2021.5.13 +psutil >= 5.4.3 +pyparsing >= 2.3.0,< 3.0.0 +python-dateutil >= 1.5 +pytsk3 >= 20160721 +pytz +pyzmq >= 2.1.11 +redis >= 3.4 +requests >= 2.18.0 +six >= 1.1.0 +yara-python >= 3.4.0 diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/setup.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/setup.py new file mode 100644 index 0000000000000000000000000000000000000000..09b6fcd95eb46a2626f6533f7a022a16e31a0693 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/setup.py @@ -0,0 +1,242 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +"""Installation and deployment script.""" + +import glob +import os +import sys + +try: + from setuptools import find_packages, setup +except ImportError: + from distutils.core import find_packages, setup + +try: + from distutils.command.bdist_msi import bdist_msi +except ImportError: + bdist_msi = None + +try: + from distutils.command.bdist_rpm import bdist_rpm +except ImportError: + bdist_rpm = None + +try: + from setuptools.commands.sdist import sdist +except ImportError: + from distutils.command.sdist import sdist + +version_tuple = (sys.version_info[0], sys.version_info[1]) +if version_tuple < (3, 6): + print(( + 'Unsupported Python version: {0:s}, version 3.6 or higher ' + 'required.').format(sys.version)) + sys.exit(1) + +# Change PYTHONPATH to include plaso so that we can get the version. +sys.path.insert(0, '.') + +import plaso # pylint: disable=wrong-import-position + + +if not bdist_msi: + BdistMSICommand = None +else: + class BdistMSICommand(bdist_msi): + """Custom handler for the bdist_msi command.""" + + # pylint: disable=invalid-name + def run(self): + """Builds an MSI.""" + # Command bdist_msi does not support the library version, neither a date + # as a version but if we suffix it with .1 everything is fine. + self.distribution.metadata.version += '.1' + + bdist_msi.run(self) + + +if not bdist_rpm: + BdistRPMCommand = None +else: + class BdistRPMCommand(bdist_rpm): + """Custom handler for the bdist_rpm command.""" + + # pylint: disable=invalid-name + def _make_spec_file(self): + """Generates the text of an RPM spec file. + + Returns: + list[str]: lines of the RPM spec file. + """ + # Note that bdist_rpm can be an old style class. + if issubclass(BdistRPMCommand, object): + spec_file = super(BdistRPMCommand, self)._make_spec_file() + else: + spec_file = bdist_rpm._make_spec_file(self) + + python_package = 'python3' + + description = [] + requires = '' + summary = '' + in_description = False + + python_spec_file = [] + for line in iter(spec_file): + if line.startswith('Summary: '): + summary = line[9:] + + elif line.startswith('BuildRequires: '): + line = 'BuildRequires: {0:s}-setuptools, {0:s}-devel'.format( + python_package) + + elif line.startswith('Requires: '): + requires = line[10:] + continue + + elif line.startswith('%description'): + in_description = True + + elif line.startswith('python setup.py build'): + if python_package == 'python3': + line = '%py3_build' + else: + line = '%py2_build' + + elif line.startswith('python setup.py install'): + if python_package == 'python3': + line = '%py3_install' + else: + line = '%py2_install' + + elif line.startswith('%files'): + lines = [ + '%files -n %{name}-data', + '%defattr(644,root,root,755)', + '%license LICENSE', + '%doc ACKNOWLEDGEMENTS AUTHORS README', + '%{_datadir}/%{name}/*', + '', + '%files -n {0:s}-%{{name}}'.format(python_package), + '%defattr(644,root,root,755)', + '%license LICENSE', + '%doc ACKNOWLEDGEMENTS AUTHORS README'] + + lines.extend([ + '%{python3_sitelib}/plaso/*.py', + '%{python3_sitelib}/plaso/*/*.py', + '%{python3_sitelib}/plaso/*/*.yaml', + '%{python3_sitelib}/plaso/*/*/*.py', + '%{python3_sitelib}/plaso/*/*/*.yaml', + '%{python3_sitelib}/plaso*.egg-info/*', + '', + '%exclude %{_prefix}/share/doc/*', + '%exclude %{python3_sitelib}/plaso/__pycache__/*', + '%exclude %{python3_sitelib}/plaso/*/__pycache__/*', + '%exclude %{python3_sitelib}/plaso/*/*/__pycache__/*']) + + python_spec_file.extend(lines) + break + + elif line.startswith('%prep'): + in_description = False + + python_spec_file.extend([ + '%package -n %{name}-data', + 'Summary: Data files for {0:s}'.format(summary), + '', + '%description -n %{name}-data']) + + python_spec_file.extend(description) + + python_spec_file.append( + '%package -n {0:s}-%{{name}}'.format(python_package)) + python_summary = 'Python 3 module of {0:s}'.format(summary) + + python_spec_file.extend([ + 'Requires: plaso-data >= %{{version}} {0:s}'.format( + requires), + 'Summary: {0:s}'.format(python_summary), + '', + '%description -n {0:s}-%{{name}}'.format(python_package)]) + + python_spec_file.extend(description) + + python_spec_file.extend([ + '%package -n %{name}-tools', + 'Requires: {0:s}-plaso >= %{{version}}'.format( + python_package), + 'Summary: Tools for {0:s}'.format(summary), + '', + '%description -n %{name}-tools']) + + python_spec_file.extend(description) + + elif in_description: + # Ignore leading white lines in the description. + if not description and not line: + continue + + description.append(line) + + python_spec_file.append(line) + + python_spec_file.extend([ + '', + '%files -n %{name}-tools', + '%{_bindir}/*.py']) + + return python_spec_file + + +plaso_description = ( + 'Plaso (log2timeline) - Super timeline all the things') + +plaso_long_description = ( + 'Plaso (log2timeline) is a framework to create super timelines. Its ' + 'purpose is to extract timestamps from various files found on typical ' + 'computer systems and aggregate them.') + +setup( + name='plaso', + version=plaso.__version__, + description=plaso_description, + long_description=plaso_long_description, + license='Apache License, Version 2.0', + url='https://github.com/log2timeline/plaso', + maintainer='Log2Timeline maintainers', + maintainer_email='log2timeline-maintainers@googlegroups.com', + cmdclass={ + 'bdist_msi': BdistMSICommand, + 'bdist_rpm': BdistRPMCommand, + 'sdist_test_data': sdist}, + classifiers=[ + 'Development Status :: 4 - Beta', + 'Environment :: Console', + 'Operating System :: OS Independent', + 'Programming Language :: Python', + ], + packages=find_packages('.', exclude=[ + 'docs', 'tests', 'tests.*', 'tools', 'utils']), + package_dir={ + 'plaso': 'plaso' + }, + include_package_data=True, + package_data={ + 'plaso.parsers': ['*.yaml'], + 'plaso.parsers.esedb_plugins': ['*.yaml'], + 'plaso.parsers.olecf_plugins': ['*.yaml'], + 'plaso.parsers.plist_plugins': ['*.yaml'], + 'plaso.parsers.winreg_plugins': ['*.yaml'] + }, + zip_safe=False, + scripts=glob.glob(os.path.join('tools', '[a-z]*.py')), + data_files=[ + ('share/plaso', glob.glob( + os.path.join('data', '*.*'))), + ('share/plaso/formatters', glob.glob( + os.path.join('data', 'formatters', '*.yaml'))), + ('share/doc/plaso', [ + 'ACKNOWLEDGEMENTS', 'AUTHORS', 'LICENSE', 'README']), + ], +) diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/100_sub_keys.hiv b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/100_sub_keys.hiv new file mode 100644 index 0000000000000000000000000000000000000000..9acf792159b9440f1edfc373d67556910f0b0378 Binary files /dev/null and b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/100_sub_keys.hiv differ diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv new file mode 100644 index 0000000000000000000000000000000000000000..2f7d51c25a21197479096ac27163504546570495 Binary files /dev/null and b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv differ diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/tests/parsers/winreg_plugins/interface.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/tests/parsers/winreg_plugins/interface.py new file mode 100644 index 0000000000000000000000000000000000000000..d9b3a7aa0b09be4c704ee749a8007f3b672c60b7 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/tests/parsers/winreg_plugins/interface.py @@ -0,0 +1,221 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- +"""Tests for the Windows Registry plugin interface.""" + +import unittest + +from dfwinreg import definitions as dfwinreg_definitions +from dfwinreg import fake as dfwinreg_fake + +from plaso.parsers.winreg_plugins import interface + +from tests.parsers.winreg_plugins import test_lib + + +class BaseWindowsRegistryKeyFilterTest(test_lib.RegistryPluginTestCase): + """Tests for the Windows Registry key filter interface.""" + + def testKeyPaths(self): + """Tests the key_paths property.""" + path_filter = interface.BaseWindowsRegistryKeyFilter() + self.assertEqual(path_filter.key_paths, []) + + +class WindowsRegistryKeyPathFilterTest(test_lib.RegistryPluginTestCase): + """Tests for the Windows Registry key path filter.""" + + def testInitialize(self): + """Tests the __init__ function.""" + path_filter = interface.WindowsRegistryKeyPathFilter( + 'HKEY_LOCAL_MACHINE\\System') + self.assertIsNotNone(path_filter) + + def testKeyPaths(self): + """Tests the key_paths property.""" + path_filter = interface.WindowsRegistryKeyPathFilter( + 'HKEY_LOCAL_MACHINE\\System') + self.assertEqual(path_filter.key_paths, ['HKEY_LOCAL_MACHINE\\System']) + + path_filter = interface.WindowsRegistryKeyPathFilter( + 'HKEY_CURRENT_USER\\Software\\Microsoft') + self.assertEqual(path_filter.key_paths, [ + 'HKEY_CURRENT_USER\\Software\\Microsoft', + 'HKEY_CURRENT_USER\\Software\\Wow6432Node\\Microsoft']) + + def testMatch(self): + """Tests the Match function.""" + path_filter = interface.WindowsRegistryKeyPathFilter( + 'HKEY_LOCAL_MACHINE\\System') + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'System', key_path='HKEY_LOCAL_MACHINE\\System') + + result = path_filter.Match(registry_key) + self.assertTrue(result) + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Select', key_path='HKEY_LOCAL_MACHINE\\System\\Select') + + result = path_filter.Match(registry_key) + self.assertFalse(result) + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Software', key_path='HKEY_LOCAL_MACHINE\\Software') + + result = path_filter.Match(registry_key) + self.assertFalse(result) + + +class WindowsRegistryKeyPathPrefixFilterTest(test_lib.RegistryPluginTestCase): + """Tests for Windows Registry key path prefix filter.""" + + def testInitialize(self): + """Tests the __init__ function.""" + path_filter = interface.WindowsRegistryKeyPathPrefixFilter( + 'HKEY_LOCAL_MACHINE\\System') + self.assertIsNotNone(path_filter) + + def testKeyPaths(self): + """Tests the key_paths property.""" + path_filter = interface.WindowsRegistryKeyPathPrefixFilter( + 'HKEY_LOCAL_MACHINE\\System') + self.assertEqual(path_filter.key_paths, []) + + def testMatch(self): + """Tests the Match function.""" + path_filter = interface.WindowsRegistryKeyPathPrefixFilter( + 'HKEY_LOCAL_MACHINE\\System') + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'System', key_path='HKEY_LOCAL_MACHINE\\System') + + result = path_filter.Match(registry_key) + self.assertTrue(result) + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Select', key_path='HKEY_LOCAL_MACHINE\\System\\Select') + + result = path_filter.Match(registry_key) + self.assertTrue(result) + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Software', key_path='HKEY_LOCAL_MACHINE\\Software') + + result = path_filter.Match(registry_key) + self.assertFalse(result) + + +class WindowsRegistryKeyPathSuffixFilterTest(test_lib.RegistryPluginTestCase): + """Tests for Windows Registry key path suffix filter.""" + + def testInitialize(self): + """Tests the __init__ function.""" + path_filter = interface.WindowsRegistryKeyPathSuffixFilter( + 'Windows\\Explorer') + self.assertIsNotNone(path_filter) + + def testKeyPaths(self): + """Tests the key_paths property.""" + path_filter = interface.WindowsRegistryKeyPathSuffixFilter( + 'Windows\\Explorer') + self.assertEqual(path_filter.key_paths, []) + + def testMatch(self): + """Tests the Match function.""" + path_filter = interface.WindowsRegistryKeyPathSuffixFilter( + 'Windows\\Explorer') + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Explorer', key_path='HKEY_LOCAL_MACHINE\\Software\\Windows\\Explorer') + + result = path_filter.Match(registry_key) + self.assertTrue(result) + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Windows', key_path='HKEY_LOCAL_MACHINE\\Software\\Windows') + + result = path_filter.Match(registry_key) + self.assertFalse(result) + + key_path = 'HKEY_LOCAL_MACHINE\\Software\\Windows\\Explorer\\Zones' + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Explorer', key_path=key_path) + + result = path_filter.Match(registry_key) + self.assertFalse(result) + + +class WindowsRegistryKeyWithValuesFilterTest(test_lib.RegistryPluginTestCase): + """Tests for Windows Registry key with values filter.""" + + def testInitialize(self): + """Tests the __init__ function.""" + path_filter = interface.WindowsRegistryKeyWithValuesFilter( + ('a', 'MRUList')) + self.assertIsNotNone(path_filter) + + def testKeyPaths(self): + """Tests the key_paths property.""" + path_filter = interface.WindowsRegistryKeyWithValuesFilter( + ('a', 'MRUList')) + self.assertEqual(path_filter.key_paths, []) + + def testMatch(self): + """Tests the Match function.""" + path_filter = interface.WindowsRegistryKeyWithValuesFilter( + ('a', 'MRUList')) + + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Explorer', key_path='HKEY_LOCAL_MACHINE\\Software\\Windows\\MRU') + + result = path_filter.Match(registry_key) + self.assertFalse(result) + + registry_value = dfwinreg_fake.FakeWinRegistryValue( + 'MRUList', data_type=dfwinreg_definitions.REG_BINARY) + registry_key.AddValue(registry_value) + + result = path_filter.Match(registry_key) + self.assertFalse(result) + + registry_value = dfwinreg_fake.FakeWinRegistryValue( + 'a', data_type=dfwinreg_definitions.REG_SZ) + registry_key.AddValue(registry_value) + + result = path_filter.Match(registry_key) + self.assertTrue(result) + + +class WindowsRegistryPluginTest(test_lib.RegistryPluginTestCase): + """Tests for the Windows Registry plugin interface.""" + + # pylint: disable=protected-access + + def testGetValuesFromKey(self): + """Tests the _GetValuesFromKey function.""" + registry_key = dfwinreg_fake.FakeWinRegistryKey( + 'Explorer', key_path='HKEY_LOCAL_MACHINE\\Software\\Windows\\MRU') + + value_data = b'a\x00' + registry_value = dfwinreg_fake.FakeWinRegistryValue( + 'MRUList', data=value_data, data_type=dfwinreg_definitions.REG_BINARY) + registry_key.AddValue(registry_value) + + value_data = b'o\x00n\x00e\x00' + registry_value = dfwinreg_fake.FakeWinRegistryValue( + 'a', data=value_data, data_type=dfwinreg_definitions.REG_SZ) + registry_key.AddValue(registry_value) + + plugin = interface.WindowsRegistryPlugin() + + expected_value_dict = { + 'a': '[REG_SZ] one', + 'MRUList': '[REG_BINARY] (2 bytes)'} + + values_dict = plugin._GetValuesFromKey(registry_key) + self.assertEqual( + sorted(values_dict.items()), sorted(expected_value_dict.items())) + + +if __name__ == '__main__': + unittest.main() diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/__init__.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/run_case.py b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/run_case.py new file mode 100644 index 0000000000000000000000000000000000000000..1b9f3ce55ff1e6fd8cd61c15226663b16c508602 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine-other/vendor/plaso/tools/run_case.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python3 +import json +import os +import sys +import types + +ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if ROOT not in sys.path: + sys.path.insert(0, ROOT) + +from dfwinreg import errors + + +class FakeDateTime: + is_local_time = False + + def GetPlasoTimestamp(self): + return 1700000000000000 + + +class FakeValue: + def __init__(self, name, data_type, data, kind, decoded=None): + self.name = name + self.data_type_string = data_type + self.data = data + self._kind = kind + self._decoded = decoded + + def GetDataAsObject(self): + if self._kind == 'corrupt': + raise errors.WinRegistryValueError('invalid UTF-16 payload') + return self._decoded + + def DataIsMultiString(self): + return self._kind == 'multi' + + def DataIsInteger(self): + return self._kind == 'integer' + + def DataIsString(self): + return self._kind == 'string' + + +class FakeKey: + def __init__(self, name, path, values, subkeys=None): + self.name = name + self.path = path + self.last_written_time = FakeDateTime() + self._values = values + self._subkeys = subkeys or {} + + def GetValues(self): + return self._values + + def GetValueByName(self, name): + for value in self._values: + if value.name == name: + return value + return None + + def GetSubkeyByName(self, name): + return self._subkeys.get(name) + + +class Mediator: + def __init__(self): + self.events = [] + self.warnings = [] + + def ProduceEventWithEventData(self, event, event_data): + self.events.append({'event': event, 'data': event_data}) + + def ProduceExtractionWarning(self, warning): + self.warnings.append(str(warning)) + + +def build_case(): + common_values = [ + FakeValue('Start', 'REG_DWORD', b'\x02\x00\x00\x00', 'integer', 2), + FakeValue('Type', 'REG_DWORD', b'\x10\x00\x00\x00', 'integer', 16), + FakeValue('DisplayName', 'REG_SZ', b'Svc\x00', 'string', 'Svc'), + FakeValue('Dependencies', 'REG_MULTI_SZ', b'A\x00', 'multi', ['A', 'B']), + FakeValue('Blob', 'REG_BINARY', b'\x01\x02\x03', 'binary', b'\x01\x02\x03'), + FakeValue('Empty', 'REG_BINARY', None, 'binary'), + ] + default_values = common_values + [ + FakeValue('Broken', 'REG_SZ', b'\xff\xfe', 'corrupt')] + service = FakeKey( + 'DemoService', + r'HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\DemoService', + common_values) + default = FakeKey( + 'Forensics', r'HKEY_LOCAL_MACHINE\Software\Forensics', default_values) + return default, service + + +def install_parser_stub(): + module = types.ModuleType('plaso.parsers.winreg_parser') + + class WinRegistryParser: + @classmethod + def RegisterPlugin(cls, plugin_class): + return plugin_class + + module.WinRegistryParser = WinRegistryParser + sys.modules['plaso.parsers.winreg_parser'] = module + + +def run(): + install_parser_stub() + from plaso.parsers.winreg_plugins import interface, services + + default_key, service_key = build_case() + mediator = Mediator() + interface.WindowsRegistryPlugin()._ProduceDefaultWindowsRegistryEvent( + mediator, default_key) + services.ServicesPlugin().ExtractEvents(mediator, service_key) + + result = { + 'schema_version': 'registry-forensics.v1', + 'output_schema_version': 'registry-forensics.v1', + 'event_count': len(mediator.events), + 'warning_count': len(mediator.warnings), + 'warnings': mediator.warnings, + 'default_values': mediator.events[0]['data'].values, + 'service': { + 'name': mediator.events[1]['data'].name, + 'service_type': mediator.events[1]['data'].service_type, + 'start_type': mediator.events[1]['data'].start_type, + 'values': mediator.events[1]['data'].values, + }, + } + output = sys.argv[1] if len(sys.argv) > 1 else '/app/output.json' + with open(output, 'w', encoding='utf-8') as file_object: + json.dump(result, file_object, indent=2, sort_keys=True) + + +if __name__ == '__main__': + run() diff --git a/components/mimo-code/source_bundle/pristine/Dockerfile b/components/mimo-code/source_bundle/pristine/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..73b9ed6d2d4a98f9982673b64d6c5691b0f5e39d --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/Dockerfile @@ -0,0 +1,18 @@ +# 自包含的 terminal_bench 候选镜像,build context 就是本目录。 + +FROM python:3.12-slim-bookworm + +ARG PIP_INDEX_URL=https://pypi.org/simple + +ENV DEBIAN_FRONTEND=noninteractive \ + PIP_DISABLE_PIP_VERSION_CHECK=1 \ + PYTHONDONTWRITEBYTECODE=1 \ + PIP_INDEX_URL=${PIP_INDEX_URL} + +# 先装 pip 依赖 —— 单独一层,candidate 代码变更时不用重跑 +COPY requirements-shared.txt /tmp/requirements-shared.txt +RUN python -m pip install --no-cache-dir -r /tmp/requirements-shared.txt + +# 再拷任务本体(含仓库自带 tests / vendor / probe 脚本) +WORKDIR /app +COPY . /app diff --git a/components/mimo-code/source_bundle/pristine/requirements-shared.txt b/components/mimo-code/source_bundle/pristine/requirements-shared.txt new file mode 100644 index 0000000000000000000000000000000000000000..8e246544a95f38a208a39fe85c212adcb63fa407 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/requirements-shared.txt @@ -0,0 +1,31 @@ +# 65 个 terminal_bench candidate 镜像共用的 pip 依赖。 +pytest==9.1.1 +pytest-json-ctrf==0.5.2 +numpy==2.2.6 +scipy +pandas +lxml +requests +attrs +pyyaml +pillow +networkx +shapely +patsy +statsmodels +lazy-loader +numpydoc +mido +miditoolkit +music21 +xmlschema +csvw +clldutils +termcolor +pybtex +frictionless +scikit-image +scikit-learn +fast-simplification +manifold3d +colorlog diff --git a/components/mimo-code/source_bundle/pristine/tools/run_regression.py b/components/mimo-code/source_bundle/pristine/tools/run_regression.py new file mode 100644 index 0000000000000000000000000000000000000000..cc4421d3846e8af13a4fcb78f73d4b8dfc01a05c --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/tools/run_regression.py @@ -0,0 +1,111 @@ +#!/usr/bin/env python3 +from __future__ import annotations + +import argparse +import hashlib +import json +from io import BytesIO, StringIO +from pathlib import Path + +from requests import Request +from requests._types import has_read + +OUTPUT_SCHEMA_VERSION = "requests.stream_proxy.repair.v1" + + +class ReadProxy: + def __init__(self, wrapped: object) -> None: + self._wrapped = wrapped + + def __getattr__(self, name: str) -> object: + if name == "__iter__": + raise AttributeError(name) + return getattr(self._wrapped, name) + + +class NonCallableReadMapping(dict[str, str]): + read = "metadata" + + +def digest(value: bytes) -> str: + return hashlib.sha256(value).hexdigest() + + +def main() -> int: + parser = argparse.ArgumentParser() + parser.add_argument("--output", required=True) + args = parser.parse_args() + + raw_payload = b"delegated-body\x00offline\n" + raw_proxy = ReadProxy(BytesIO(raw_payload)) + prepared_raw = Request("POST", "https://example.invalid/upload", data=raw_proxy).prepare() + + file_payload = b"multipart-delegated\x00payload\n" + file_proxy = ReadProxy(BytesIO(file_payload)) + prepared_file = Request( + "POST", + "https://example.invalid/upload", + files={"asset": ("payload.bin", file_proxy, "application/octet-stream")}, + ).prepare() + + text_payload = "delegated text π" + text_proxy = ReadProxy(StringIO(text_payload)) + prepared_text = Request( + "POST", + "https://example.invalid/upload", + files={"note": ("note.txt", text_proxy, "text/plain; charset=utf-8")}, + ).prepare() + + form = NonCallableReadMapping(alpha="x y", beta="2") + prepared_form = Request("POST", "https://example.invalid/form", data=form).prepare() + + checks = { + "proxy_body": { + "readable": has_read(raw_proxy), + "same_object": prepared_raw.body is raw_proxy, + "content_type": prepared_raw.headers.get("Content-Type"), + "payload_sha256": digest(raw_payload), + }, + "proxy_multipart_bytes": { + "readable": has_read(file_proxy), + "content_type_prefix": prepared_file.headers.get("Content-Type", "").split(";", 1)[0], + "contains_payload": file_payload in prepared_file.body, + "payload_sha256": digest(file_payload), + }, + "proxy_multipart_text": { + "readable": has_read(text_proxy), + "contains_payload": text_payload.encode() in prepared_text.body, + }, + "mapping_noncallable_read": { + "readable": has_read(form), + "body": prepared_form.body, + "content_type": prepared_form.headers.get("Content-Type"), + }, + } + passed = all( + [ + checks["proxy_body"]["readable"], + checks["proxy_body"]["same_object"], + checks["proxy_body"]["content_type"] is None, + checks["proxy_multipart_bytes"]["readable"], + checks["proxy_multipart_bytes"]["content_type_prefix"] == "multipart/form-data", + checks["proxy_multipart_bytes"]["contains_payload"], + checks["proxy_multipart_text"]["readable"], + checks["proxy_multipart_text"]["contains_payload"], + not checks["mapping_noncallable_read"]["readable"], + checks["mapping_noncallable_read"]["body"] == "alpha=x+y&beta=2", + checks["mapping_noncallable_read"]["content_type"] == "application/x-www-form-urlencoded", + ] + ) + output = { + "output_schema_version": OUTPUT_SCHEMA_VERSION, + "passed": passed, + "checks": checks, + } + path = Path(args.output) + path.write_text(json.dumps(output, indent=2, sort_keys=True) + "\n") + return 0 if passed else 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/LICENSE b/components/mimo-code/source_bundle/pristine/vendor/requests/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..67db8588217f266eb561f75fae738656325deac9 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/LICENSE @@ -0,0 +1,175 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/pyproject.toml b/components/mimo-code/source_bundle/pristine/vendor/requests/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..e7a1e015e09765802f6ac8d98b5ca5f0daabefb7 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/pyproject.toml @@ -0,0 +1,125 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "requests" +description = "Python HTTP for Humans." +readme = "README.md" +license = {text = "Apache-2.0"} +authors = [ + { name = "Kenneth Reitz", email = "me@kennethreitz.org" }, +] +maintainers = [ + {name = "Ian Stapleton Cordasco", email="graffatcolmingov@gmail.com"}, + {name = "Nate Prewitt", email="nate.prewitt@gmail.com"} +] +requires-python = ">=3.10" +dependencies = [ + "charset_normalizer>=2,<4", + "idna>=2.5,<4", + "urllib3>=1.26,<3", + "certifi>=2023.5.7" +] +dynamic = ["version"] + +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "License :: OSI Approved :: Apache Software License", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", + "Programming Language :: Python :: 3.15", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Programming Language :: Python :: Free Threading :: 2 - Beta", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Software Development :: Libraries" +] + +[project.urls] +Documentation = "https://requests.readthedocs.io" +Source = "https://github.com/psf/requests" + +[project.optional-dependencies] +security = [] +socks = ["PySocks>=1.5.6, !=1.5.7"] +use_chardet_on_py3 = ["chardet>=3.0.2,<8"] + +[dependency-groups] +test = [ + "requests[socks]", + "pytest-httpbin==2.1.0", + "httpbin~=0.10.0", + "pytest-cov", + "pytest-mock", + "pytest-xdist", + "pytest>=3", + "trustme", +] +typecheck = [ + "pyright", + "typing_extensions", + "chardet", + "cryptography", + "PyOpenSSL", +] + +[tool.setuptools] +license-files = ["LICENSE", "NOTICE"] + +[tool.setuptools.dynamic] +version = {attr = "requests.__version__.__version__"} + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.ruff] +target-version = "py310" +src = ["src/requests", "tests"] +exclude = ["docs/", "ext/"] + +[tool.ruff.lint] +select = [ + "E", # pycodestyle errors + "W", # pycodestyle warnings + "F", # pyflakes + "I", # isort + "UP", # pyupgrade + "T10", # flake8-debugger (replaces debug-statements hook) +] +ignore = ["E203", "E501", "UP031"] +per-file-ignores = {"src/requests/__init__.py" = ["E402", "F401"], "src/requests/compat.py" = ["E402", "F401"], "tests/compat.py" = ["F401"]} + +[tool.ruff.lint.isort] +known-first-party = ["requests"] + +[tool.ruff.format] +# Use black-compatible formatting +quote-style = "double" +indent-style = "space" + +[tool.pytest.ini_options] +addopts = "--doctest-modules" +doctest_optionflags = "NORMALIZE_WHITESPACE ELLIPSIS" +minversion = "6.2" +testpaths = ["tests"] + + +[tool.pyright] +include = ["src/requests"] +typeCheckingMode = "strict" +# linting rules unrelated to type checking +reportPrivateUsage = false +reportPrivateImportUsage = false +reportUnnecessaryIsInstance = false +reportUnusedImport = false # duplicate of Ruff's F401 rule diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__init__.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..1093ff8bf67184ecb0f83d7015026b624a583d3d --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__init__.py @@ -0,0 +1,219 @@ +# __ +# /__) _ _ _ _ _/ _ +# / ( (- (/ (/ (- _) / _) +# / + +""" +Requests HTTP Library +~~~~~~~~~~~~~~~~~~~~~ + +Requests is an HTTP library, written in Python, for human beings. +Basic GET usage: + + >>> import requests + >>> r = requests.get('https://www.python.org') + >>> r.status_code + 200 + >>> b'Python is a programming language' in r.content + True + +... or POST: + + >>> payload = dict(key1='value1', key2='value2') + >>> r = requests.post('https://httpbin.org/post', data=payload) + >>> print(r.text) + { + ... + "form": { + "key1": "value1", + "key2": "value2" + }, + ... + } + +The other HTTP methods are supported - see `requests.api`. Full documentation +is at . + +:copyright: (c) 2017 by Kenneth Reitz. +:license: Apache 2.0, see LICENSE for more details. +""" + +from __future__ import annotations + +import warnings + +import urllib3 + +from .exceptions import RequestsDependencyWarning + +try: + from charset_normalizer import __version__ as charset_normalizer_version +except ImportError: + charset_normalizer_version = None + +try: + from chardet import __version__ as chardet_version +except ImportError: + chardet_version = None + + +def check_compatibility( + urllib3_version: str, + chardet_version: str | None, + charset_normalizer_version: str | None, +) -> None: + urllib3_version_list = urllib3_version.split(".")[:3] + assert urllib3_version_list != ["dev"] # Verify urllib3 isn't installed from git. + + # Sometimes, urllib3 only reports its version as 16.1. + if len(urllib3_version_list) == 2: + urllib3_version_list.append("0") + + # Check urllib3 for compatibility. + major, minor, patch = urllib3_version_list # noqa: F811 + major, minor, patch = int(major), int(minor), int(patch) + # urllib3 >= 1.21.1 + assert major >= 1 + if major == 1: + assert minor >= 21 + + # Check charset_normalizer for compatibility. + if chardet_version: + major, minor, patch = chardet_version.split(".")[:3] + major, minor, patch = int(major), int(minor), int(patch) + # chardet_version >= 3.0.2, < 8.0.0 + assert (3, 0, 2) <= (major, minor, patch) < (8, 0, 0) + elif charset_normalizer_version: + major, minor, patch = charset_normalizer_version.split(".")[:3] + major, minor, patch = int(major), int(minor), int(patch) + # charset_normalizer >= 2.0.0 < 4.0.0 + assert (2, 0, 0) <= (major, minor, patch) < (4, 0, 0) + else: + warnings.warn( + "Unable to find acceptable character detection dependency " + "(chardet or charset_normalizer).", + RequestsDependencyWarning, + ) + + +def _check_cryptography(cryptography_version: str) -> None: + # cryptography < 1.3.4 + try: + cryptography_version_list = list(map(int, cryptography_version.split("."))) + except ValueError: + return + + if cryptography_version_list < [1, 3, 4]: + warning = f"Old version of cryptography ({cryptography_version_list}) may cause slowdown." + warnings.warn(warning, RequestsDependencyWarning) + + +# Check imported dependencies for compatibility. +try: + check_compatibility( + urllib3.__version__, + chardet_version, + charset_normalizer_version, + ) +except (AssertionError, ValueError): + warnings.warn( + f"urllib3 ({urllib3.__version__}) or chardet " + f"({chardet_version})/charset_normalizer ({charset_normalizer_version}) " + "doesn't match a supported version!", + RequestsDependencyWarning, + ) + +# Attempt to enable urllib3's fallback for SNI support +# if the standard library doesn't support SNI or the +# 'ssl' library isn't available. +try: + try: + import ssl + except ImportError: + ssl = None + + if not getattr(ssl, "HAS_SNI", False): + from urllib3.contrib import pyopenssl + + pyopenssl.inject_into_urllib3() + + # Check cryptography version + from cryptography import ( + __version__ as cryptography_version, + ) + + _check_cryptography(cryptography_version) +except ImportError: + pass + +# urllib3's DependencyWarnings should be silenced. +from urllib3.exceptions import DependencyWarning + +warnings.simplefilter("ignore", DependencyWarning) + +# Set default logging handler to avoid "No handler found" warnings. +import logging +from logging import NullHandler + +from . import packages, utils +from .__version__ import ( + __author__, + __author_email__, + __build__, + __cake__, + __copyright__, + __description__, + __license__, + __title__, + __url__, + __version__, +) +from .api import delete, get, head, options, patch, post, put, request +from .exceptions import ( + ConnectionError, + ConnectTimeout, + FileModeWarning, + HTTPError, + JSONDecodeError, + ReadTimeout, + RequestException, + Timeout, + TooManyRedirects, + URLRequired, +) +from .models import PreparedRequest, Request, Response +from .sessions import Session, session +from .status_codes import codes + +__all__ = ( + "ConnectionError", + "ConnectTimeout", + "HTTPError", + "JSONDecodeError", + "PreparedRequest", + "ReadTimeout", + "Request", + "RequestException", + "Response", + "Session", + "Timeout", + "TooManyRedirects", + "URLRequired", + "codes", + "delete", + "get", + "head", + "options", + "packages", + "patch", + "post", + "put", + "request", + "session", + "utils", +) + +logging.getLogger(__name__).addHandler(NullHandler()) + +# FileModeWarnings go off per the default. +warnings.simplefilter("default", FileModeWarning, append=True) diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__version__.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__version__.py new file mode 100644 index 0000000000000000000000000000000000000000..fea814e58271ecb7a1088ce9ac636791a2cc1289 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/__version__.py @@ -0,0 +1,14 @@ +# .-. .-. .-. . . .-. .-. .-. .-. +# |( |- |.| | | |- `-. | `-. +# ' ' `-' `-`.`-' `-' `-' ' `-' + +__title__ = "requests" +__description__ = "Python HTTP for Humans." +__url__ = "https://requests.readthedocs.io" +__version__ = "2.34.2" +__build__ = 0x023402 +__author__ = "Kenneth Reitz" +__author_email__ = "me@kennethreitz.org" +__license__ = "Apache-2.0" +__copyright__ = "Copyright Kenneth Reitz" +__cake__ = "\u2728 \U0001f370 \u2728" diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_internal_utils.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_internal_utils.py new file mode 100644 index 0000000000000000000000000000000000000000..0466a7d347db4ed34a37db51b75fc8e80bc06055 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_internal_utils.py @@ -0,0 +1,51 @@ +""" +requests._internal_utils +~~~~~~~~~~~~~~ + +Provides utility functions that are consumed internally by Requests +which depend on extremely few external helpers (such as compat) +""" + +import re + +from .compat import builtin_str + +_VALID_HEADER_NAME_RE_BYTE = re.compile(rb"^[^:\s][^:\r\n]*\Z") +_VALID_HEADER_NAME_RE_STR = re.compile(r"^[^:\s][^:\r\n]*\Z") +_VALID_HEADER_VALUE_RE_BYTE = re.compile(rb"^\S[^\r\n]*\Z|^\Z") +_VALID_HEADER_VALUE_RE_STR = re.compile(r"^\S[^\r\n]*\Z|^\Z") + +_HEADER_VALIDATORS_STR = (_VALID_HEADER_NAME_RE_STR, _VALID_HEADER_VALUE_RE_STR) +_HEADER_VALIDATORS_BYTE = (_VALID_HEADER_NAME_RE_BYTE, _VALID_HEADER_VALUE_RE_BYTE) +HEADER_VALIDATORS = { + bytes: _HEADER_VALIDATORS_BYTE, + str: _HEADER_VALIDATORS_STR, +} + + +def to_native_string(string: str | bytes, encoding: str = "ascii") -> str: + """Given a string object, regardless of type, returns a representation of + that string in the native string type, encoding and decoding where + necessary. This assumes ASCII unless told otherwise. + """ + if isinstance(string, builtin_str): + out = string + else: + out = string.decode(encoding) + + return out + + +def unicode_is_ascii(u_string: str) -> bool: + """Determine if unicode string only contains ASCII characters. + + :param str u_string: unicode string to check. Must be unicode + and not Python 2 `str`. + :rtype: bool + """ + assert isinstance(u_string, str) + try: + u_string.encode("ascii") + return True + except UnicodeEncodeError: + return False diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_types.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_types.py new file mode 100644 index 0000000000000000000000000000000000000000..b2273d612b17726609afb45a29058625b79eae60 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/_types.py @@ -0,0 +1,183 @@ +""" +requests._types +~~~~~~~~~~~~~~~ + +This module contains type aliases used internally by the Requests library. +These types are not part of the public API and must not be relied upon +by external code. +""" + +from __future__ import annotations + +from collections.abc import Callable, Iterable, Mapping, MutableMapping, Sequence +from typing import ( + TYPE_CHECKING, + Any, + Protocol, + TypeAlias, + TypeVar, + runtime_checkable, +) + +_T_co = TypeVar("_T_co", covariant=True) +_KT_co = TypeVar("_KT_co", covariant=True) +_VT_co = TypeVar("_VT_co", covariant=True) + + +@runtime_checkable +class SupportsRead(Protocol[_T_co]): + def read(self, length: int = ..., /) -> _T_co: ... + + +@runtime_checkable +class SupportsItems(Protocol[_KT_co, _VT_co]): + def items(self) -> Iterable[tuple[_KT_co, _VT_co]]: ... + + +# These are needed at runtime for default_hooks() return type +HookType: TypeAlias = Callable[["Response"], Any] +HooksInputType: TypeAlias = Mapping[str, Iterable[HookType] | HookType] + + +def is_prepared(request: PreparedRequest) -> TypeIs[_ValidatedRequest]: + """Verify a PreparedRequest has been fully prepared.""" + if TYPE_CHECKING: + return request.url is not None and request.method is not None + # noop at runtime to avoid AssertionError + return True + + +if TYPE_CHECKING: + from http.cookiejar import CookieJar + from typing import TypeAlias, TypedDict + + from typing_extensions import ( + Buffer, # TODO: move to collections.abc when Python >= 3.12 + TypeIs, # TODO: move to typing when Python >= 3.13 + ) + + from .auth import AuthBase + from .cookies import RequestsCookieJar + from .models import PreparedRequest, Response + from .structures import CaseInsensitiveDict + + class _ValidatedRequest(PreparedRequest): + """Subtype asserting a PreparedRequest has been fully prepared before calling. + + The override suppression is required because mutable attribute types are + invariant (Liskov), but we only narrow after preparation is complete. This + is the explicit contract for Requests but Python's typing doesn't have a + better way to represent the requirement. + """ + + url: str # type: ignore[reportIncompatibleVariableOverride] + method: str # type: ignore[reportIncompatibleVariableOverride] + + # Type aliases for core API concepts (ordered by request() signature) + UriType: TypeAlias = str | bytes + + _ParamsMappingKeyType: TypeAlias = str | bytes | int | float + _ParamsMappingValueType: TypeAlias = ( + str | bytes | int | float | Iterable[str | bytes | int | float] | None + ) + ParamsType: TypeAlias = ( + SupportsItems[_ParamsMappingKeyType, _ParamsMappingValueType] + | tuple[tuple[_ParamsMappingKeyType, _ParamsMappingValueType], ...] + | Iterable[tuple[_ParamsMappingKeyType, _ParamsMappingValueType]] + | str + | bytes + | None + ) + + KVDataType: TypeAlias = Iterable[tuple[Any, Any]] | SupportsItems[Any, Any] + + RawDataType: TypeAlias = KVDataType | str | bytes + StreamDataType: TypeAlias = SupportsRead[str | bytes] + EncodableDataType: TypeAlias = RawDataType | StreamDataType + + DataType: TypeAlias = ( + KVDataType + | Iterable[bytes | str] + | str + | bytes + | Buffer + | SupportsRead[str | bytes] + | None + ) + + BodyType: TypeAlias = ( + bytes | str | Iterable[bytes | str] | SupportsRead[bytes | str] | None + ) + + HeadersType: TypeAlias = Mapping[str, str | bytes] | None + + CookiesType: TypeAlias = RequestsCookieJar | Mapping[str, str] + + # Building blocks for FilesType + _FileName: TypeAlias = str | None + _FileContent: TypeAlias = SupportsRead[str | bytes] | str | bytes + _FileSpecBasic: TypeAlias = tuple[_FileName, _FileContent] + _FileSpecWithContentType: TypeAlias = tuple[_FileName, _FileContent, str] + _FileSpecWithHeaders: TypeAlias = tuple[ + _FileName, _FileContent, str, CaseInsensitiveDict[str] | Mapping[str, str] + ] + _FileSpec: TypeAlias = ( + _FileContent | _FileSpecBasic | _FileSpecWithContentType | _FileSpecWithHeaders + ) + FilesType: TypeAlias = ( + Mapping[str, _FileSpec] | Iterable[tuple[str, _FileSpec]] | None + ) + + AuthType: TypeAlias = ( + tuple[str, str] | AuthBase | Callable[[PreparedRequest], PreparedRequest] | None + ) + + TimeoutType: TypeAlias = float | tuple[float | None, float | None] | None + ProxiesType: TypeAlias = MutableMapping[str, str] + HooksType: TypeAlias = dict[str, list[HookType]] | None + VerifyType: TypeAlias = bool | str + CertType: TypeAlias = str | tuple[str, str] | None + JsonType: TypeAlias = ( + None + | bool + | int + | float + | str + | Sequence["JsonType"] + | Mapping[str, "JsonType"] + ) + + # TypedDicts for Unpack kwargs (PEP 692) + + class BaseRequestKwargs(TypedDict, total=False): + headers: HeadersType + cookies: RequestsCookieJar | CookieJar | dict[str, str] | None + files: FilesType + auth: AuthType + timeout: TimeoutType + allow_redirects: bool + proxies: dict[str, str] | None + hooks: HooksInputType | None + stream: bool | None + verify: VerifyType | None + cert: CertType + + class RequestKwargs(BaseRequestKwargs, total=False): + """kwargs for request(), options(), head(), delete().""" + + params: ParamsType + data: DataType + json: JsonType + + class GetKwargs(BaseRequestKwargs, total=False): + data: DataType + json: JsonType + + class PostKwargs(BaseRequestKwargs, total=False): + params: ParamsType + + class DataKwargs(BaseRequestKwargs, total=False): + """kwargs for put(), patch().""" + + params: ParamsType + json: JsonType diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/adapters.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/adapters.py new file mode 100644 index 0000000000000000000000000000000000000000..79ed426566a482698dce24aac3fbfa4211a80d76 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/adapters.py @@ -0,0 +1,748 @@ +""" +requests.adapters +~~~~~~~~~~~~~~~~~ + +This module contains the transport adapters that Requests uses to define +and maintain connections. +""" + +from __future__ import annotations + +import os.path +import socket # noqa: F401 +import typing +import warnings +from typing import Any + +from urllib3.exceptions import ( + ClosedPoolError, + ConnectTimeoutError, + LocationValueError, + MaxRetryError, + NewConnectionError, + ProtocolError, + ReadTimeoutError, + ResponseError, +) +from urllib3.exceptions import HTTPError as _HTTPError +from urllib3.exceptions import InvalidHeader as _InvalidHeader +from urllib3.exceptions import ProxyError as _ProxyError +from urllib3.exceptions import SSLError as _SSLError +from urllib3.poolmanager import PoolManager, proxy_from_url +from urllib3.util import Timeout as TimeoutSauce +from urllib3.util import parse_url +from urllib3.util.retry import Retry + +from .auth import _basic_auth_str +from .compat import basestring, urlparse +from .cookies import extract_cookies_to_jar +from .exceptions import ( + ConnectionError, + ConnectTimeout, + InvalidHeader, + InvalidProxyURL, + InvalidSchema, + InvalidURL, + ProxyError, + ReadTimeout, + RetryError, + SSLError, +) +from .models import Response +from .structures import CaseInsensitiveDict +from .utils import ( + DEFAULT_CA_BUNDLE_PATH, + get_auth_from_url, + get_encoding_from_headers, + prepend_scheme_if_needed, + select_proxy, + urldefragauth, +) + +try: + from urllib3.contrib.socks import SOCKSProxyManager # type: ignore[assignment] +except ImportError: + + def SOCKSProxyManager(*args: Any, **kwargs: Any) -> None: + raise InvalidSchema("Missing dependencies for SOCKS support.") + + +if typing.TYPE_CHECKING: + from urllib3.connectionpool import HTTPConnectionPool + from urllib3.poolmanager import PoolManager as _PoolManager + + from . import _types as _t + from .models import PreparedRequest + +from ._types import is_prepared as _is_prepared + +DEFAULT_POOLBLOCK = False +DEFAULT_POOLSIZE = 10 +DEFAULT_RETRIES = 0 +DEFAULT_POOL_TIMEOUT = None + + +def _urllib3_request_context( + request: PreparedRequest, + verify: bool | str | None, + client_cert: tuple[str, str] | str | None, + poolmanager: PoolManager, +) -> tuple[dict[str, Any], dict[str, Any]]: + host_params: dict[str, Any] = {} + pool_kwargs: dict[str, Any] = {} + parsed_request_url = urlparse(request.url) + scheme = parsed_request_url.scheme.lower() + port = parsed_request_url.port + + cert_reqs = "CERT_REQUIRED" + if verify is False: + cert_reqs = "CERT_NONE" + elif isinstance(verify, str): + if not os.path.isdir(verify): + pool_kwargs["ca_certs"] = verify + else: + pool_kwargs["ca_cert_dir"] = verify + pool_kwargs["cert_reqs"] = cert_reqs + if client_cert is not None: + if isinstance(client_cert, tuple) and len(client_cert) == 2: + pool_kwargs["cert_file"] = client_cert[0] + pool_kwargs["key_file"] = client_cert[1] + else: + # According to our docs, we allow users to specify just the client + # cert path + pool_kwargs["cert_file"] = client_cert + host_params = { + "scheme": scheme, + "host": parsed_request_url.hostname, + "port": port, + } + return host_params, pool_kwargs + + +class BaseAdapter: + """The Base Transport Adapter""" + + def __init__(self) -> None: + super().__init__() + + def send( + self, + request: PreparedRequest, + stream: bool = False, + timeout: _t.TimeoutType = None, + verify: _t.VerifyType = True, + cert: _t.CertType = None, + proxies: dict[str, str] | None = None, + ) -> Response: + """Sends PreparedRequest object. Returns Response object. + + :param request: The :class:`PreparedRequest ` being sent. + :param stream: (optional) Whether to stream the request content. + :param timeout: (optional) How long to wait for the server to send + data before giving up, as a float, or a :ref:`(connect timeout, + read timeout) ` tuple. + :type timeout: float or tuple + :param verify: (optional) Either a boolean, in which case it controls whether we verify + the server's TLS certificate, or a string, in which case it must be a path + to a CA bundle to use + :param cert: (optional) Any user-provided SSL certificate to be trusted. + :param proxies: (optional) The proxies dictionary to apply to the request. + """ + raise NotImplementedError + + def close(self) -> None: + """Cleans up adapter specific items.""" + raise NotImplementedError + + +class HTTPAdapter(BaseAdapter): + """The built-in HTTP Adapter for urllib3. + + Provides a general-case interface for Requests sessions to contact HTTP and + HTTPS urls by implementing the Transport Adapter interface. This class will + usually be created by the :class:`Session ` class under the + covers. + + :param pool_connections: The number of urllib3 connection pools to cache. + :param pool_maxsize: The maximum number of connections to save in the pool. + :param max_retries: The maximum number of retries each connection + should attempt. Note, this applies only to failed DNS lookups, socket + connections and connection timeouts, never to requests where data has + made it to the server. By default, Requests does not retry failed + connections. If you need granular control over the conditions under + which we retry a request, import urllib3's ``Retry`` class and pass + that instead. + :param pool_block: Whether the connection pool should block for connections. + + Usage:: + + >>> import requests + >>> s = requests.Session() + >>> a = requests.adapters.HTTPAdapter(max_retries=3) + >>> s.mount('http://', a) + """ + + __attrs__: list[str] = [ + "max_retries", + "config", + "_pool_connections", + "_pool_maxsize", + "_pool_block", + ] + + max_retries: Retry + config: dict[str, Any] + proxy_manager: dict[str, Any] + _pool_connections: int + _pool_maxsize: int + _pool_block: bool + poolmanager: _PoolManager + + def __init__( + self, + pool_connections: int = DEFAULT_POOLSIZE, + pool_maxsize: int = DEFAULT_POOLSIZE, + max_retries: int | Retry = DEFAULT_RETRIES, + pool_block: bool = DEFAULT_POOLBLOCK, + ) -> None: + if max_retries == DEFAULT_RETRIES: + self.max_retries = Retry(0, read=False) + else: + self.max_retries = Retry.from_int(max_retries) + self.config = {} + self.proxy_manager = {} + + super().__init__() + + self._pool_connections = pool_connections + self._pool_maxsize = pool_maxsize + self._pool_block = pool_block + + self.init_poolmanager(pool_connections, pool_maxsize, block=pool_block) + + def __getstate__(self) -> dict[str, Any]: + return {attr: getattr(self, attr, None) for attr in self.__attrs__} + + def __setstate__(self, state: dict[str, Any]) -> None: + # Can't handle by adding 'proxy_manager' to self.__attrs__ because + # self.poolmanager uses a lambda function, which isn't pickleable. + self.proxy_manager = {} + self.config = {} + + for attr, value in state.items(): + setattr(self, attr, value) + + self.init_poolmanager( + self._pool_connections, self._pool_maxsize, block=self._pool_block + ) + + def init_poolmanager( + self, + connections: int, + maxsize: int, + block: bool = DEFAULT_POOLBLOCK, + **pool_kwargs: Any, + ) -> None: + """Initializes a urllib3 PoolManager. + + This method should not be called from user code, and is only + exposed for use when subclassing the + :class:`HTTPAdapter `. + + :param connections: The number of urllib3 connection pools to cache. + :param maxsize: The maximum number of connections to save in the pool. + :param block: Block when no free connections are available. + :param pool_kwargs: Extra keyword arguments used to initialize the Pool Manager. + """ + # save these values for pickling + self._pool_connections = connections + self._pool_maxsize = maxsize + self._pool_block = block + + self.poolmanager = PoolManager( + num_pools=connections, + maxsize=maxsize, + block=block, + **pool_kwargs, + ) + + def proxy_manager_for(self, proxy: str, **proxy_kwargs: Any) -> Any: + """Return urllib3 ProxyManager for the given proxy. + + This method should not be called from user code, and is only + exposed for use when subclassing the + :class:`HTTPAdapter `. + + :param proxy: The proxy to return a urllib3 ProxyManager for. + :param proxy_kwargs: Extra keyword arguments used to configure the Proxy Manager. + :returns: ProxyManager + :rtype: urllib3.ProxyManager + """ + if proxy in self.proxy_manager: + manager = self.proxy_manager[proxy] + elif proxy.lower().startswith("socks"): + username, password = get_auth_from_url(proxy) + manager = self.proxy_manager[proxy] = SOCKSProxyManager( + proxy, + username=username, + password=password, + num_pools=self._pool_connections, + maxsize=self._pool_maxsize, + block=self._pool_block, + **proxy_kwargs, + ) + else: + proxy_headers = self.proxy_headers(proxy) + manager = self.proxy_manager[proxy] = proxy_from_url( + proxy, + proxy_headers=proxy_headers, + num_pools=self._pool_connections, + maxsize=self._pool_maxsize, + block=self._pool_block, + **proxy_kwargs, + ) + + return manager + + def cert_verify( + self, conn: Any, url: str, verify: _t.VerifyType, cert: _t.CertType + ) -> None: + """Verify a SSL certificate. This method should not be called from user + code, and is only exposed for use when subclassing the + :class:`HTTPAdapter `. + + :param conn: The urllib3 connection object associated with the cert. + :param url: The requested URL. + :param verify: Either a boolean, in which case it controls whether we verify + the server's TLS certificate, or a string, in which case it must be a path + to a CA bundle to use + :param cert: The SSL certificate to verify. + """ + if url.lower().startswith("https") and verify: + cert_loc = None + + # Allow self-specified cert location. + if verify is not True: + cert_loc = verify + + if not cert_loc: + cert_loc = DEFAULT_CA_BUNDLE_PATH + + if not cert_loc or not os.path.exists(cert_loc): + raise OSError( + f"Could not find a suitable TLS CA certificate bundle, " + f"invalid path: {cert_loc}" + ) + + conn.cert_reqs = "CERT_REQUIRED" + + if not os.path.isdir(cert_loc): + conn.ca_certs = cert_loc + else: + conn.ca_cert_dir = cert_loc + else: + conn.cert_reqs = "CERT_NONE" + conn.ca_certs = None + conn.ca_cert_dir = None + + if cert: + if not isinstance(cert, basestring): + conn.cert_file = cert[0] + conn.key_file = cert[1] + else: + conn.cert_file = cert + conn.key_file = None + if conn.cert_file and not os.path.exists(conn.cert_file): + raise OSError( + f"Could not find the TLS certificate file, " + f"invalid path: {conn.cert_file}" + ) + if conn.key_file and not os.path.exists(conn.key_file): + raise OSError( + f"Could not find the TLS key file, invalid path: {conn.key_file}" + ) + + def build_response(self, req: PreparedRequest, resp: Any) -> Response: + """Builds a :class:`Response ` object from a urllib3 + response. This should not be called from user code, and is only exposed + for use when subclassing the + :class:`HTTPAdapter ` + + :param req: The :class:`PreparedRequest ` used to generate the response. + :param resp: The urllib3 response object. + :rtype: requests.Response + """ + assert _is_prepared(req) + response = Response() + + # Fallback to None if there's no status_code, for whatever reason. + response.status_code = getattr(resp, "status", None) # type: ignore[assignment] + + # Make headers case-insensitive. + response.headers = CaseInsensitiveDict(getattr(resp, "headers", {})) + + # Set encoding. + response.encoding = get_encoding_from_headers(response.headers) + response.raw = resp + response.reason = response.raw.reason + + if isinstance(req.url, bytes): + response.url = req.url.decode("utf-8") + else: + response.url = req.url + + # Add new cookies from the server. + extract_cookies_to_jar(response.cookies, req, resp) + + # Give the Response some context. + response.request = req + response.connection = self + + return response + + def build_connection_pool_key_attributes( + self, request: PreparedRequest, verify: _t.VerifyType, cert: _t.CertType = None + ) -> tuple[dict[str, Any], dict[str, Any]]: + """Build the PoolKey attributes used by urllib3 to return a connection. + + This looks at the PreparedRequest, the user-specified verify value, + and the value of the cert parameter to determine what PoolKey values + to use to select a connection from a given urllib3 Connection Pool. + + The SSL related pool key arguments are not consistently set. As of + this writing, use the following to determine what keys may be in that + dictionary: + + * If ``verify`` is ``True``, ``"ssl_context"`` will be set and will be the + default Requests SSL Context + * If ``verify`` is ``False``, ``"ssl_context"`` will not be set but + ``"cert_reqs"`` will be set + * If ``verify`` is a string, (i.e., it is a user-specified trust bundle) + ``"ca_certs"`` will be set if the string is not a directory recognized + by :py:func:`os.path.isdir`, otherwise ``"ca_cert_dir"`` will be + set. + * If ``"cert"`` is specified, ``"cert_file"`` will always be set. If + ``"cert"`` is a tuple with a second item, ``"key_file"`` will also + be present + + To override these settings, one may subclass this class, call this + method and use the above logic to change parameters as desired. For + example, if one wishes to use a custom :py:class:`ssl.SSLContext` one + must both set ``"ssl_context"`` and based on what else they require, + alter the other keys to ensure the desired behaviour. + + :param request: + The PreparedRequest being sent over the connection. + :type request: + :class:`~requests.models.PreparedRequest` + :param verify: + Either a boolean, in which case it controls whether + we verify the server's TLS certificate, or a string, in which case it + must be a path to a CA bundle to use. + :param cert: + (optional) Any user-provided SSL certificate for client + authentication (a.k.a., mTLS). This may be a string (i.e., just + the path to a file which holds both certificate and key) or a + tuple of length 2 with the certificate file path and key file + path. + :returns: + A tuple of two dictionaries. The first is the "host parameters" + portion of the Pool Key including scheme, hostname, and port. The + second is a dictionary of SSLContext related parameters. + """ + return _urllib3_request_context(request, verify, cert, self.poolmanager) + + def get_connection_with_tls_context( + self, + request: PreparedRequest, + verify: _t.VerifyType, + proxies: dict[str, str] | None = None, + cert: _t.CertType = None, + ) -> HTTPConnectionPool: + """Returns a urllib3 connection for the given request and TLS settings. + This should not be called from user code, and is only exposed for use + when subclassing the :class:`HTTPAdapter `. + + :param request: + The :class:`PreparedRequest ` object to be sent + over the connection. + :param verify: + Either a boolean, in which case it controls whether we verify the + server's TLS certificate, or a string, in which case it must be a + path to a CA bundle to use. + :param proxies: + (optional) The proxies dictionary to apply to the request. + :param cert: + (optional) Any user-provided SSL certificate to be used for client + authentication (a.k.a., mTLS). + :rtype: + urllib3.HTTPConnectionPool + """ + assert _is_prepared(request) + + proxy = select_proxy(request.url, proxies) + try: + host_params, pool_kwargs = self.build_connection_pool_key_attributes( + request, + verify, + cert, + ) + except ValueError as e: + raise InvalidURL(e, request=request) + if proxy: + proxy = prepend_scheme_if_needed(proxy, "http") + proxy_url = parse_url(proxy) + if not proxy_url.host: + raise InvalidProxyURL( + "Please check proxy URL. It is malformed " + "and could be missing the host." + ) + proxy_manager = self.proxy_manager_for(proxy) + conn = proxy_manager.connection_from_host( + **host_params, pool_kwargs=pool_kwargs + ) + else: + # Only scheme should be lower case + conn = self.poolmanager.connection_from_host( + **host_params, pool_kwargs=pool_kwargs + ) + + return conn + + def get_connection( + self, url: str, proxies: dict[str, str] | None = None + ) -> HTTPConnectionPool: + """DEPRECATED: Users should move to `get_connection_with_tls_context` + for all subclasses of HTTPAdapter using Requests>=2.32.2. + + Returns a urllib3 connection for the given URL. This should not be + called from user code, and is only exposed for use when subclassing the + :class:`HTTPAdapter `. + + :param url: The URL to connect to. + :param proxies: (optional) A Requests-style dictionary of proxies used on this request. + :rtype: urllib3.HTTPConnectionPool + """ + warnings.warn( + ( + "`get_connection` has been deprecated in favor of " + "`get_connection_with_tls_context`. Custom HTTPAdapter subclasses " + "will need to migrate for Requests>=2.32.2. Please see " + "https://github.com/psf/requests/pull/6710 for more details." + ), + DeprecationWarning, + ) + proxy = select_proxy(url, proxies) + + if proxy: + proxy = prepend_scheme_if_needed(proxy, "http") + proxy_url = parse_url(proxy) + if not proxy_url.host: + raise InvalidProxyURL( + "Please check proxy URL. It is malformed " + "and could be missing the host." + ) + proxy_manager = self.proxy_manager_for(proxy) + conn = proxy_manager.connection_from_url(url) + else: + # Only scheme should be lower case + parsed = urlparse(url) + url = parsed.geturl() + conn = self.poolmanager.connection_from_url(url) + + return conn + + def close(self) -> None: + """Disposes of any internal state. + + Currently, this closes the PoolManager and any active ProxyManager, + which closes any pooled connections. + """ + self.poolmanager.clear() + for proxy in self.proxy_manager.values(): + proxy.clear() + + def request_url( + self, request: PreparedRequest, proxies: dict[str, str] | None + ) -> str: + """Obtain the url to use when making the final request. + + If the message is being sent through a HTTP proxy, the full URL has to + be used. Otherwise, we should only use the path portion of the URL. + + This should not be called from user code, and is only exposed for use + when subclassing the + :class:`HTTPAdapter `. + + :param request: The :class:`PreparedRequest ` being sent. + :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs. + :rtype: str + """ + assert _is_prepared(request) + + proxy = select_proxy(request.url, proxies) + scheme = urlparse(request.url).scheme + + is_proxied_http_request = proxy and scheme != "https" + using_socks_proxy = False + if proxy: + proxy_scheme = urlparse(proxy).scheme.lower() + using_socks_proxy = proxy_scheme.startswith("socks") + + url = request.path_url + + if is_proxied_http_request and not using_socks_proxy: + url = urldefragauth(request.url) + + return url + + def add_headers(self, request: PreparedRequest, **kwargs: Any) -> None: + """Add any headers needed by the connection. As of v2.0 this does + nothing by default, but is left for overriding by users that subclass + the :class:`HTTPAdapter `. + + This should not be called from user code, and is only exposed for use + when subclassing the + :class:`HTTPAdapter `. + + :param request: The :class:`PreparedRequest ` to add headers to. + :param kwargs: The keyword arguments from the call to send(). + """ + pass + + def proxy_headers(self, proxy: str) -> dict[str, str]: + """Returns a dictionary of the headers to add to any request sent + through a proxy. This works with urllib3 magic to ensure that they are + correctly sent to the proxy, rather than in a tunnelled request if + CONNECT is being used. + + This should not be called from user code, and is only exposed for use + when subclassing the + :class:`HTTPAdapter `. + + :param proxy: The url of the proxy being used for this request. + :rtype: dict + """ + headers: dict[str, str] = {} + username, password = get_auth_from_url(proxy) + + if username: + headers["Proxy-Authorization"] = _basic_auth_str(username, password) + + return headers + + def send( + self, + request: PreparedRequest, + stream: bool = False, + timeout: _t.TimeoutType = None, + verify: _t.VerifyType = True, + cert: _t.CertType = None, + proxies: dict[str, str] | None = None, + ) -> Response: + """Sends PreparedRequest object. Returns Response object. + + :param request: The :class:`PreparedRequest ` being sent. + :param stream: (optional) Whether to stream the request content. + :param timeout: (optional) How long to wait for the server to send + data before giving up, as a float, or a :ref:`(connect timeout, + read timeout) ` tuple. + :type timeout: float or tuple or urllib3 Timeout object + :param verify: (optional) Either a boolean, in which case it controls whether + we verify the server's TLS certificate, or a string, in which case it + must be a path to a CA bundle to use + :param cert: (optional) Any user-provided SSL certificate to be trusted. + :param proxies: (optional) The proxies dictionary to apply to the request. + :rtype: requests.Response + """ + + assert _is_prepared(request) + + try: + conn = self.get_connection_with_tls_context( + request, verify, proxies=proxies, cert=cert + ) + except LocationValueError as e: + raise InvalidURL(e, request=request) + + self.cert_verify(conn, request.url, verify, cert) + url = self.request_url(request, proxies) + self.add_headers( + request, + stream=stream, + timeout=timeout, + verify=verify, + cert=cert, + proxies=proxies, + ) + + chunked = not (request.body is None or "Content-Length" in request.headers) + + if isinstance(timeout, tuple): + try: + connect, read = timeout + resolved_timeout = TimeoutSauce(connect=connect, read=read) + except ValueError: + raise ValueError( + f"Invalid timeout {timeout}. Pass a (connect, read) timeout tuple, " + f"or a single float to set both timeouts to the same value." + ) + elif isinstance(timeout, TimeoutSauce): + resolved_timeout = timeout + else: + resolved_timeout = TimeoutSauce(connect=timeout, read=timeout) + + try: + resp = conn.urlopen( + method=request.method, + url=url, + body=request.body, # type: ignore[arg-type] # urllib3 stubs don't accept Iterable[bytes | str] + headers=request.headers, # type: ignore[arg-type] # urllib3#3072 + redirect=False, + assert_same_host=False, + preload_content=False, + decode_content=False, + retries=self.max_retries, + timeout=resolved_timeout, + chunked=chunked, + ) + + except (ProtocolError, OSError) as err: + raise ConnectionError(err, request=request) + + except MaxRetryError as e: + if isinstance(e.reason, ConnectTimeoutError): + # TODO: Remove this in 3.0.0: see #2811 + if not isinstance(e.reason, NewConnectionError): + raise ConnectTimeout(e, request=request) + + if isinstance(e.reason, ResponseError): + raise RetryError(e, request=request) + + if isinstance(e.reason, _ProxyError): + raise ProxyError(e, request=request) + + if isinstance(e.reason, _SSLError): + # This branch is for urllib3 v1.22 and later. + raise SSLError(e, request=request) + + raise ConnectionError(e, request=request) + + except ClosedPoolError as e: + raise ConnectionError(e, request=request) + + except _ProxyError as e: + raise ProxyError(e) + + except (_SSLError, _HTTPError) as e: + if isinstance(e, _SSLError): + # This branch is for urllib3 versions earlier than v1.22 + raise SSLError(e, request=request) + elif isinstance(e, ReadTimeoutError): + raise ReadTimeout(e, request=request) + elif isinstance(e, _InvalidHeader): + raise InvalidHeader(e, request=request) + else: + raise + + return self.build_response(request, resp) diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/api.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/api.py new file mode 100644 index 0000000000000000000000000000000000000000..eeb3b54d7f27e2c843080dfe81dfdb0d460c2b31 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/api.py @@ -0,0 +1,180 @@ +""" +requests.api +~~~~~~~~~~~~ + +This module implements the Requests API. + +:copyright: (c) 2012 by Kenneth Reitz. +:license: Apache2, see LICENSE for more details. +""" + +from __future__ import annotations + +from typing import TYPE_CHECKING + +from . import sessions +from .models import Response + +if TYPE_CHECKING: + from typing_extensions import Unpack + + from . import _types as _t + + +def request( + method: str, url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs] +) -> Response: + """Constructs and sends a :class:`Request `. + + :param method: method for the new :class:`Request` object: ``GET``, ``OPTIONS``, ``HEAD``, ``POST``, ``PUT``, ``PATCH``, or ``DELETE``. + :param url: URL for the new :class:`Request` object. + :param params: (optional) Dictionary, list of tuples or bytes to send + in the query string for the :class:`Request`. + :param data: (optional) Dictionary, list of tuples, bytes, or file-like + object to send in the body of the :class:`Request`. + :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`. + :param headers: (optional) Dictionary of HTTP Headers to send with the :class:`Request`. + :param cookies: (optional) Dict or CookieJar object to send with the :class:`Request`. + :param files: (optional) Dictionary of ``'name': file-like-objects`` (or ``{'name': file-tuple}``) for multipart encoding upload. + ``file-tuple`` can be a 2-tuple ``('filename', fileobj)``, 3-tuple ``('filename', fileobj, 'content_type')`` + or a 4-tuple ``('filename', fileobj, 'content_type', custom_headers)``, where ``'content_type'`` is a string + defining the content type of the given file and ``custom_headers`` a dict-like object containing additional headers + to add for the file. + :param auth: (optional) Auth tuple to enable Basic/Digest/Custom HTTP Auth. + :param timeout: (optional) How many seconds to wait for the server to send data + before giving up, as a float, or a :ref:`(connect timeout, read + timeout) ` tuple. + :type timeout: float or tuple + :param allow_redirects: (optional) Boolean. Enable/disable GET/OPTIONS/POST/PUT/PATCH/DELETE/HEAD redirection. Defaults to ``True``. + :type allow_redirects: bool + :param proxies: (optional) Dictionary mapping protocol to the URL of the proxy. + :param verify: (optional) Either a boolean, in which case it controls whether we verify + the server's TLS certificate, or a string, in which case it must be a path + to a CA bundle to use. Defaults to ``True``. + :param stream: (optional) if ``False``, the response content will be immediately downloaded. + :param cert: (optional) if String, path to ssl client cert file (.pem). If Tuple, ('cert', 'key') pair. + :return: :class:`Response ` object + :rtype: requests.Response + + Usage:: + + >>> import requests + >>> req = requests.request('GET', 'https://httpbin.org/get') + >>> req + + """ + + # By using the 'with' statement we are sure the session is closed, thus we + # avoid leaving sockets open which can trigger a ResourceWarning in some + # cases, and look like a memory leak in others. + with sessions.Session() as session: + return session.request(method=method, url=url, **kwargs) + + +def get( + url: _t.UriType, params: _t.ParamsType = None, **kwargs: Unpack[_t.GetKwargs] +) -> Response: + r"""Sends a GET request. + + :param url: URL for the new :class:`Request` object. + :param params: (optional) Dictionary, list of tuples or bytes to send + in the query string for the :class:`Request`. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :return: :class:`Response ` object + :rtype: requests.Response + """ + + return request("get", url, params=params, **kwargs) + + +def options(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response: + r"""Sends an OPTIONS request. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :return: :class:`Response ` object + :rtype: requests.Response + """ + + return request("options", url, **kwargs) + + +def head(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response: + r"""Sends a HEAD request. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. If + `allow_redirects` is not provided, it will be set to `False` (as + opposed to the default :meth:`request` behavior). + :return: :class:`Response ` object + :rtype: requests.Response + """ + + kwargs.setdefault("allow_redirects", False) + return request("head", url, **kwargs) + + +def post( + url: _t.UriType, + data: _t.DataType = None, + json: _t.JsonType = None, + **kwargs: Unpack[_t.PostKwargs], +) -> Response: + r"""Sends a POST request. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, list of tuples, bytes, or file-like + object to send in the body of the :class:`Request`. + :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :return: :class:`Response ` object + :rtype: requests.Response + """ + + return request("post", url, data=data, json=json, **kwargs) + + +def put( + url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs] +) -> Response: + r"""Sends a PUT request. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, list of tuples, bytes, or file-like + object to send in the body of the :class:`Request`. + :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :return: :class:`Response ` object + :rtype: requests.Response + """ + + return request("put", url, data=data, **kwargs) + + +def patch( + url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs] +) -> Response: + r"""Sends a PATCH request. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, list of tuples, bytes, or file-like + object to send in the body of the :class:`Request`. + :param json: (optional) A JSON serializable Python object to send in the body of the :class:`Request`. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :return: :class:`Response ` object + :rtype: requests.Response + """ + + return request("patch", url, data=data, **kwargs) + + +def delete(url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response: + r"""Sends a DELETE request. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :return: :class:`Response ` object + :rtype: requests.Response + """ + + return request("delete", url, **kwargs) diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/auth.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/auth.py new file mode 100644 index 0000000000000000000000000000000000000000..aff9b5ba2a53260d5daea5b5e4a595f439103368 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/auth.py @@ -0,0 +1,354 @@ +""" +requests.auth +~~~~~~~~~~~~~ + +This module contains the authentication handlers for Requests. +""" + +from __future__ import annotations + +import hashlib +import os +import re +import threading +import time +import warnings +from base64 import b64encode +from typing import TYPE_CHECKING, Any, Final, cast, overload + +from ._internal_utils import to_native_string +from .compat import basestring, str, urlparse +from .cookies import extract_cookies_to_jar +from .utils import parse_dict_header + +if TYPE_CHECKING: + from http.cookiejar import CookieJar + from typing import Any + + from .models import PreparedRequest, Response + +CONTENT_TYPE_FORM_URLENCODED: Final = "application/x-www-form-urlencoded" +CONTENT_TYPE_MULTI_PART: Final = "multipart/form-data" + + +def _basic_auth_str(username: bytes | str, password: bytes | str) -> str: + """Returns a Basic Auth string.""" + + # "I want us to put a big-ol' comment on top of it that + # says that this behaviour is dumb but we need to preserve + # it because people are relying on it." + # - Lukasa + # + # These are here solely to maintain backwards compatibility + # for things like ints. This will be removed in 3.0.0. + if not isinstance(username, basestring): # runtime guard for non-str/bytes + warnings.warn( + "Non-string usernames will no longer be supported in Requests " + f"3.0.0. Please convert the object you've passed in ({username!r}) to " + "a string or bytes object in the near future to avoid " + "problems.", + category=DeprecationWarning, + ) + username = str(username) + + if not isinstance(password, basestring): # runtime guard for non-str/bytes + warnings.warn( + "Non-string passwords will no longer be supported in Requests " + f"3.0.0. Please convert the object you've passed in ({type(password)!r}) to " + "a string or bytes object in the near future to avoid " + "problems.", + category=DeprecationWarning, + ) + password = str(password) + # -- End Removal -- + + if isinstance(username, str): + username = username.encode("latin1") + + if isinstance(password, str): + password = password.encode("latin1") + + authstr = "Basic " + to_native_string( + b64encode(b":".join((username, password))).strip() + ) + + return authstr + + +class AuthBase: + """Base class that all auth implementations derive from""" + + def __call__(self, r: PreparedRequest) -> PreparedRequest: + raise NotImplementedError("Auth hooks must be callable.") + + +class HTTPBasicAuth(AuthBase): + """Attaches HTTP Basic Authentication to the given Request object.""" + + username: bytes | str + password: bytes | str + + @overload + def __init__(self, username: str, password: str) -> None: ... + @overload + def __init__(self, username: bytes, password: bytes) -> None: ... + + def __init__(self, username: bytes | str, password: bytes | str) -> None: + self.username = username + self.password = password + + def __eq__(self, other: object) -> bool: + return all( + [ + self.username == getattr(other, "username", None), + self.password == getattr(other, "password", None), + ] + ) + + def __ne__(self, other: Any) -> bool: + return not self == other + + def __call__(self, r: PreparedRequest) -> PreparedRequest: + r.headers["Authorization"] = _basic_auth_str(self.username, self.password) + return r + + +class HTTPProxyAuth(HTTPBasicAuth): + """Attaches HTTP Proxy Authentication to a given Request object.""" + + def __call__(self, r: PreparedRequest) -> PreparedRequest: + r.headers["Proxy-Authorization"] = _basic_auth_str(self.username, self.password) + return r + + +class HTTPDigestAuth(AuthBase): + """Attaches HTTP Digest Authentication to the given Request object.""" + + username: bytes | str + password: bytes | str + _thread_local: threading.local + last_nonce: str + nonce_count: int + chal: dict[str, str] + pos: int | None + num_401_calls: int | None + + @overload + def __init__(self, username: str, password: str) -> None: ... + @overload + def __init__(self, username: bytes, password: bytes) -> None: ... + + def __init__(self, username: bytes | str, password: bytes | str) -> None: + self.username = username + self.password = password + # Keep state in per-thread local storage + self._thread_local = threading.local() + + def init_per_thread_state(self) -> None: + # Ensure state is initialized just once per-thread + if not hasattr(self._thread_local, "init"): + self._thread_local.init = True + self._thread_local.last_nonce = "" + self._thread_local.nonce_count = 0 + self._thread_local.chal = {} + self._thread_local.pos = None + self._thread_local.num_401_calls = None + + def build_digest_header(self, method: str, url: str) -> str | None: + """ + :rtype: str + """ + + realm = self._thread_local.chal["realm"] + nonce = self._thread_local.chal["nonce"] + qop = self._thread_local.chal.get("qop") + algorithm = self._thread_local.chal.get("algorithm") + opaque = self._thread_local.chal.get("opaque") + hash_utf8 = None + + if algorithm is None: + _algorithm = "MD5" + else: + _algorithm = algorithm.upper() + # lambdas assume digest modules are imported at the top level + if _algorithm == "MD5" or _algorithm == "MD5-SESS": + + def md5_utf8(x: str | bytes) -> str: + if isinstance(x, str): + x = x.encode("utf-8") + return hashlib.md5(x, usedforsecurity=False).hexdigest() + + hash_utf8 = md5_utf8 + elif _algorithm == "SHA": + + def sha_utf8(x: str | bytes) -> str: + if isinstance(x, str): + x = x.encode("utf-8") + return hashlib.sha1(x, usedforsecurity=False).hexdigest() + + hash_utf8 = sha_utf8 + elif _algorithm == "SHA-256": + + def sha256_utf8(x: str | bytes) -> str: + if isinstance(x, str): + x = x.encode("utf-8") + return hashlib.sha256(x, usedforsecurity=False).hexdigest() + + hash_utf8 = sha256_utf8 + elif _algorithm == "SHA-512": + + def sha512_utf8(x: str | bytes) -> str: + if isinstance(x, str): + x = x.encode("utf-8") + return hashlib.sha512(x, usedforsecurity=False).hexdigest() + + hash_utf8 = sha512_utf8 + + if hash_utf8 is None: + return None + + def KD(s: str, d: str) -> str: + return hash_utf8(f"{s}:{d}") + + # XXX not implemented yet + entdig = None + p_parsed = urlparse(url) + #: path is request-uri defined in RFC 2616 which should not be empty + path = p_parsed.path or "/" + if p_parsed.query: + path += f"?{p_parsed.query}" + + A1 = f"{self.username}:{realm}:{self.password}" + A2 = f"{method}:{path}" + + HA1 = hash_utf8(A1) + HA2 = hash_utf8(A2) + + if nonce == self._thread_local.last_nonce: + self._thread_local.nonce_count += 1 + else: + self._thread_local.nonce_count = 1 + ncvalue = f"{self._thread_local.nonce_count:08x}" + s = str(self._thread_local.nonce_count).encode("utf-8") + s += nonce.encode("utf-8") + s += time.ctime().encode("utf-8") + s += os.urandom(8) + + cnonce = hashlib.sha1(s, usedforsecurity=False).hexdigest()[:16] + if _algorithm == "MD5-SESS": + HA1 = hash_utf8(f"{HA1}:{nonce}:{cnonce}") # type: ignore[reportConstantRedefinition] # RFC 2617 terminology + + if not qop: + respdig = KD(HA1, f"{nonce}:{HA2}") + elif qop == "auth" or "auth" in qop.split(","): + noncebit = f"{nonce}:{ncvalue}:{cnonce}:auth:{HA2}" + respdig = KD(HA1, noncebit) + else: + # XXX handle auth-int. + return None + + self._thread_local.last_nonce = nonce + + # XXX should the partial digests be encoded too? + base = ( + f'username="{self.username}", realm="{realm}", nonce="{nonce}", ' + f'uri="{path}", response="{respdig}"' + ) + if opaque: + base += f', opaque="{opaque}"' + if algorithm: + base += f', algorithm="{algorithm}"' + if entdig: + base += f', digest="{entdig}"' + if qop: + base += f', qop="auth", nc={ncvalue}, cnonce="{cnonce}"' + + return f"Digest {base}" + + def handle_redirect(self, r: Response, **kwargs: Any) -> None: + """Reset num_401_calls counter on redirects.""" + if r.is_redirect: + self._thread_local.num_401_calls = 1 + + def handle_401(self, r: Response, **kwargs: Any) -> Response: + """ + Takes the given response and tries digest-auth, if needed. + + :rtype: requests.Response + """ + + # If response is not 4xx, do not auth + # See https://github.com/psf/requests/issues/3772 + if not 400 <= r.status_code < 500: + self._thread_local.num_401_calls = 1 + return r + + if self._thread_local.pos is not None: + # Rewind the file position indicator of the body to where + # it was to resend the request. + if (seek := getattr(r.request.body, "seek", None)) is not None: + seek(self._thread_local.pos) + s_auth = r.headers.get("www-authenticate", "") + + if "digest" in s_auth.lower() and self._thread_local.num_401_calls < 2: + self._thread_local.num_401_calls += 1 + pat = re.compile(r"digest ", flags=re.IGNORECASE) + self._thread_local.chal = parse_dict_header(pat.sub("", s_auth, count=1)) + + # Consume content and release the original connection + # to allow our new request to reuse the same one. + r.content + r.close() + prep = r.request.copy() + cookie_jar = cast("CookieJar", prep._cookies) + extract_cookies_to_jar(cookie_jar, r.request, r.raw) + prep.prepare_cookies(cookie_jar) + + _digest_auth = self.build_digest_header( + cast(str, prep.method), cast(str, prep.url) + ) + if _digest_auth: + prep.headers["Authorization"] = _digest_auth + _r = r.connection.send(prep, **kwargs) + _r.history.append(r) + _r.request = prep + + return _r + + self._thread_local.num_401_calls = 1 + return r + + def __call__(self, r: PreparedRequest) -> PreparedRequest: + # Initialize per-thread state, if needed + self.init_per_thread_state() + # If we have a saved nonce, skip the 401 + if self._thread_local.last_nonce: + _digest_auth = self.build_digest_header( + cast(str, r.method), cast(str, r.url) + ) + if _digest_auth: + r.headers["Authorization"] = _digest_auth + if (tell := getattr(r.body, "tell", None)) is not None: + self._thread_local.pos = tell() + else: + # In the case of HTTPDigestAuth being reused and the body of + # the previous request was a file-like object, pos has the + # file position of the previous body. Ensure it's set to + # None. + self._thread_local.pos = None + r.register_hook("response", self.handle_401) + r.register_hook("response", self.handle_redirect) + self._thread_local.num_401_calls = 1 + + return r + + def __eq__(self, other: object) -> bool: + return all( + [ + self.username == getattr(other, "username", None), + self.password == getattr(other, "password", None), + ] + ) + + def __ne__(self, other: Any) -> bool: + return not self == other diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/certs.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/certs.py new file mode 100644 index 0000000000000000000000000000000000000000..4f85ac070bc0230af8155bcadfaa96165268cede --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/certs.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python + +""" +requests.certs +~~~~~~~~~~~~~~ + +This module returns the preferred default CA certificate bundle. There is +only one — the one from the certifi package. + +If you are packaging Requests, e.g., for a Linux distribution or a managed +environment, you can change the definition of where() to return a separately +packaged CA bundle. +""" + +from certifi import where + +if __name__ == "__main__": + print(where()) diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/compat.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/compat.py new file mode 100644 index 0000000000000000000000000000000000000000..6f5b0dd239ba8ed4d31b8f994ace59b8548a0388 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/compat.py @@ -0,0 +1,115 @@ +""" +requests.compat +~~~~~~~~~~~~~~~ + +This module previously handled import compatibility issues +between Python 2 and Python 3. It remains for backwards +compatibility until the next major version. +""" + +# pyright: reportUnusedImport=false + +from __future__ import annotations + +import importlib +import sys +from types import ModuleType +from typing import TYPE_CHECKING + +# ------- +# urllib3 +# ------- +from urllib3 import __version__ as urllib3_version + +# Detect which major version of urllib3 is being used. +try: + is_urllib3_1 = int(urllib3_version.split(".")[0]) == 1 +except (TypeError, AttributeError): + # If we can't discern a version, prefer old functionality. + is_urllib3_1 = True + +# ------------------- +# Character Detection +# ------------------- + + +def _resolve_char_detection() -> ModuleType | None: + """Find supported character detection libraries.""" + chardet = None + for lib in ("chardet", "charset_normalizer"): + if chardet is None: + try: + chardet = importlib.import_module(lib) + except ImportError: + pass + return chardet + + +if TYPE_CHECKING: + import chardet +else: + chardet = _resolve_char_detection() + +# ------- +# Pythons +# ------- + +# Syntax sugar. +_ver = sys.version_info + +#: Python 2.x? +is_py2 = _ver[0] == 2 + +#: Python 3.x? +is_py3 = _ver[0] == 3 + +# json/simplejson module import resolution +has_simplejson = False +try: + import simplejson as json # type: ignore[import-not-found] + + has_simplejson = True +except ImportError: + import json + +if has_simplejson: + from simplejson import JSONDecodeError # type: ignore[import-not-found] +else: + from json import JSONDecodeError + +# Keep OrderedDict for backwards compatibility. +from collections import OrderedDict +from collections.abc import Callable, Mapping, MutableMapping +from http import cookiejar as cookielib +from http.cookies import Morsel +from io import StringIO + +# -------------- +# Legacy Imports +# -------------- +from urllib.parse import ( + quote, + quote_plus, + unquote, + unquote_plus, + urldefrag, + urlencode, + urljoin, + urlparse, + urlsplit, + urlunparse, +) +from urllib.request import ( + getproxies, + getproxies_environment, + parse_http_list, + proxy_bypass, + proxy_bypass_environment, # type: ignore[attr-defined] # https://github.com/python/cpython/issues/145331 +) + +builtin_str = str +str = str +bytes = bytes +basestring = (str, bytes) +numeric_types = (int, float) +integer_types = (int,) diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/cookies.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/cookies.py new file mode 100644 index 0000000000000000000000000000000000000000..24dd9a7829e3b26cdc0dee4147c4fa435b4b8387 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/cookies.py @@ -0,0 +1,625 @@ +""" +requests.cookies +~~~~~~~~~~~~~~~~ + +Compatibility code to be able to use `http.cookiejar.CookieJar` with requests. + +requests.utils imports from here, so be careful with imports. +""" + +from __future__ import annotations + +import calendar +import copy +import time +from collections.abc import Iterator, MutableMapping +from http.cookiejar import Cookie, CookieJar, CookiePolicy +from typing import TYPE_CHECKING, Any, TypeVar, overload + +from ._internal_utils import to_native_string +from ._types import is_prepared as _is_prepared +from .compat import Morsel, cookielib, urlparse, urlunparse + +if TYPE_CHECKING: + from _typeshed import SupportsKeysAndGetItem + + from .models import PreparedRequest + +import threading + + +class MockRequest: + """Wraps a `requests.PreparedRequest` to mimic a `urllib2.Request`. + + The code in `http.cookiejar.CookieJar` expects this interface in order to correctly + manage cookie policies, i.e., determine whether a cookie can be set, given the + domains of the request and the cookie. + + The original request object is read-only. The client is responsible for collecting + the new headers via `get_new_headers()` and interpreting them appropriately. You + probably want `get_cookie_header`, defined below. + """ + + type: str + + def __init__(self, request: PreparedRequest) -> None: + assert _is_prepared(request) + self._r = request + self._new_headers: dict[str, str] = {} + self.type = urlparse(self._r.url).scheme + + def get_type(self) -> str: + return self.type + + def get_host(self) -> str: + return urlparse(self._r.url).netloc + + def get_origin_req_host(self) -> str: + return self.get_host() + + def get_full_url(self) -> str: + # Only return the response's URL if the user hadn't set the Host + # header + if not self._r.headers.get("Host"): + return self._r.url + # If they did set it, retrieve it and reconstruct the expected domain + host = to_native_string(self._r.headers["Host"], encoding="utf-8") + parsed = urlparse(self._r.url) + # Reconstruct the URL as we expect it + return urlunparse( + [ + parsed.scheme, + host, + parsed.path, + parsed.params, + parsed.query, + parsed.fragment, + ] + ) + + def is_unverifiable(self) -> bool: + return True + + def has_header(self, name: str) -> bool: + return name in self._r.headers or name in self._new_headers + + def get_header(self, name: str, default: str | None = None) -> str | None: + return self._r.headers.get(name, self._new_headers.get(name, default)) # type: ignore[return-value] + + def add_header(self, key: str, val: str) -> None: + """cookiejar has no legitimate use for this method; add it back if you find one.""" + raise NotImplementedError( + "Cookie headers should be added with add_unredirected_header()" + ) + + def add_unredirected_header(self, name: str, value: str) -> None: + self._new_headers[name] = value + + def get_new_headers(self) -> dict[str, str]: + return self._new_headers + + @property + def unverifiable(self) -> bool: + return self.is_unverifiable() + + @property + def origin_req_host(self) -> str: + return self.get_origin_req_host() + + @property + def host(self) -> str: + return self.get_host() + + +class MockResponse: + """Wraps a `httplib.HTTPMessage` to mimic a `urllib.addinfourl`. + + ...what? Basically, expose the parsed HTTP headers from the server response + the way `http.cookiejar` expects to see them. + """ + + def __init__(self, headers: Any) -> None: + """Make a MockResponse for `cookiejar` to read. + + :param headers: a httplib.HTTPMessage or analogous carrying the headers + """ + self._headers = headers + + def info(self) -> Any: + return self._headers + + def getheaders(self, name: str) -> Any: + self._headers.getheaders(name) + + +def extract_cookies_to_jar( + jar: CookieJar, request: PreparedRequest, response: Any +) -> None: + """Extract the cookies from the response into a CookieJar. + + :param jar: http.cookiejar.CookieJar (not necessarily a RequestsCookieJar) + :param request: our own requests.Request object + :param response: urllib3.HTTPResponse object + """ + if not (hasattr(response, "_original_response") and response._original_response): + return + # the _original_response field is the wrapped httplib.HTTPResponse object, + req = MockRequest(request) + # pull out the HTTPMessage with the headers and put it in the mock: + res = MockResponse(response._original_response.msg) + jar.extract_cookies(res, req) # type: ignore[arg-type] + + +def get_cookie_header(jar: CookieJar, request: PreparedRequest) -> str | None: + """ + Produce an appropriate Cookie header string to be sent with `request`, or None. + + :rtype: str + """ + r = MockRequest(request) + jar.add_cookie_header(r) # type: ignore[arg-type] + return r.get_new_headers().get("Cookie") + + +def remove_cookie_by_name( + cookiejar: CookieJar, name: str, domain: str | None = None, path: str | None = None +) -> None: + """Unsets a cookie by name, by default over all domains and paths. + + Wraps CookieJar.clear(), is O(n). + """ + clearables: list[tuple[str, str, str]] = [] + for cookie in cookiejar: + if cookie.name != name: + continue + if domain is not None and domain != cookie.domain: + continue + if path is not None and path != cookie.path: + continue + clearables.append((cookie.domain, cookie.path, cookie.name)) + + for domain, path, name in clearables: + cookiejar.clear(domain, path, name) + + +class CookieConflictError(RuntimeError): + """There are two cookies that meet the criteria specified in the cookie jar. + Use .get and .set and include domain and path args in order to be more specific. + """ + + +class RequestsCookieJar(CookieJar, MutableMapping[str, str | None]): # type: ignore[misc] + """Compatibility class; is a http.cookiejar.CookieJar, but exposes a dict + interface. + + This is the CookieJar we create by default for requests and sessions that + don't specify one, since some clients may expect response.cookies and + session.cookies to support dict operations. + + Requests does not use the dict interface internally; it's just for + compatibility with external client code. All requests code should work + out of the box with externally provided instances of ``CookieJar``, e.g. + ``LWPCookieJar`` and ``FileCookieJar``. + + Unlike a regular CookieJar, this class is pickleable. + + .. warning:: dictionary operations that are normally O(1) may be O(n). + """ + + _policy: CookiePolicy + + def get( # type: ignore[override] + self, + name: str, + default: str | None = None, + domain: str | None = None, + path: str | None = None, + ) -> str | None: + """Dict-like get() that also supports optional domain and path args in + order to resolve naming collisions from using one cookie jar over + multiple domains. + + .. warning:: operation is O(n), not O(1). + """ + try: + return self._find_no_duplicates(name, domain, path) + except KeyError: + return default + + def set( + self, name: str, value: str | Morsel[dict[str, str]] | None, **kwargs: Any + ) -> Cookie | None: + """Dict-like set() that also supports optional domain and path args in + order to resolve naming collisions from using one cookie jar over + multiple domains. + """ + # support client code that unsets cookies by assignment of a None value: + if value is None: + remove_cookie_by_name( + self, name, domain=kwargs.get("domain"), path=kwargs.get("path") + ) + return + + if isinstance(value, Morsel): + c = morsel_to_cookie(value) + else: + c = create_cookie(name, value, **kwargs) + self.set_cookie(c) + return c + + def iterkeys(self) -> Iterator[str]: + """Dict-like iterkeys() that returns an iterator of names of cookies + from the jar. + + .. seealso:: itervalues() and iteritems(). + """ + for cookie in iter(self): + yield cookie.name + + def keys(self) -> list[str]: # type: ignore[override] + """Dict-like keys() that returns a list of names of cookies from the + jar. + + .. seealso:: values() and items(). + """ + return list(self.iterkeys()) + + def itervalues(self) -> Iterator[str | None]: + """Dict-like itervalues() that returns an iterator of values of cookies + from the jar. + + .. seealso:: iterkeys() and iteritems(). + """ + for cookie in iter(self): + yield cookie.value + + def values(self) -> list[str | None]: # type: ignore[override] + """Dict-like values() that returns a list of values of cookies from the + jar. + + .. seealso:: keys() and items(). + """ + return list(self.itervalues()) + + def iteritems(self) -> Iterator[tuple[str, str | None]]: + """Dict-like iteritems() that returns an iterator of name-value tuples + from the jar. + + .. seealso:: iterkeys() and itervalues(). + """ + for cookie in iter(self): + yield cookie.name, cookie.value + + def items(self) -> list[tuple[str, str | None]]: # type: ignore[override] + """Dict-like items() that returns a list of name-value tuples from the + jar. Allows client-code to call ``dict(RequestsCookieJar)`` and get a + vanilla python dict of key value pairs. + + .. seealso:: keys() and values(). + """ + return list(self.iteritems()) + + def list_domains(self) -> list[str]: + """Utility method to list all the domains in the jar.""" + domains: list[str] = [] + for cookie in iter(self): + if cookie.domain not in domains: + domains.append(cookie.domain) + return domains + + def list_paths(self) -> list[str]: + """Utility method to list all the paths in the jar.""" + paths: list[str] = [] + for cookie in iter(self): + if cookie.path not in paths: + paths.append(cookie.path) + return paths + + def multiple_domains(self) -> bool: + """Returns True if there are multiple domains in the jar. + Returns False otherwise. + + :rtype: bool + """ + domains: list[str] = [] + for cookie in iter(self): + if cookie.domain is not None and cookie.domain in domains: # type: ignore[reportUnnecessaryComparison] # defensive check + return True + domains.append(cookie.domain) + return False # there is only one domain in jar + + def get_dict( + self, domain: str | None = None, path: str | None = None + ) -> dict[str, str | None]: + """Takes as an argument an optional domain and path and returns a plain + old Python dict of name-value pairs of cookies that meet the + requirements. + + :rtype: dict + """ + dictionary: dict[str, str | None] = {} + for cookie in iter(self): + if (domain is None or cookie.domain == domain) and ( + path is None or cookie.path == path + ): + dictionary[cookie.name] = cookie.value + return dictionary + + def __iter__(self) -> Iterator[Cookie]: # type: ignore[override] + """RequestCookieJar's __iter__ comes from CookieJar not MutableMapping.""" + return super().__iter__() + + def __contains__(self, name: object) -> bool: + try: + return super().__contains__(name) + except CookieConflictError: + return True + + def __getitem__(self, name: str) -> str | None: + """Dict-like __getitem__() for compatibility with client code. Throws + exception if there are more than one cookie with name. In that case, + use the more explicit get() method instead. + + .. warning:: operation is O(n), not O(1). + """ + return self._find_no_duplicates(name) + + def __setitem__( + self, name: str, value: str | Morsel[dict[str, str]] | None + ) -> None: + """Dict-like __setitem__ for compatibility with client code. Throws + exception if there is already a cookie of that name in the jar. In that + case, use the more explicit set() method instead. + """ + self.set(name, value) + + def __delitem__(self, name: str) -> None: + """Deletes a cookie given a name. Wraps ``http.cookiejar.CookieJar``'s + ``remove_cookie_by_name()``. + """ + remove_cookie_by_name(self, name) + + def set_cookie(self, cookie: Cookie, *args: Any, **kwargs: Any) -> None: + if ( + (value := cookie.value) is not None + and value.startswith('"') + and value.endswith('"') + ): + cookie.value = value.replace('\\"', "") + return super().set_cookie(cookie, *args, **kwargs) + + def update( # type: ignore[override] + self, other: CookieJar | SupportsKeysAndGetItem[str, str] + ) -> None: + """Updates this jar with cookies from another CookieJar or dict-like""" + if isinstance(other, cookielib.CookieJar): + for cookie in other: + self.set_cookie(copy.copy(cookie)) + else: + super().update(other) + + def _find( + self, name: str, domain: str | None = None, path: str | None = None + ) -> str | None: + """Requests uses this method internally to get cookie values. + + If there are conflicting cookies, _find arbitrarily chooses one. + See _find_no_duplicates if you want an exception thrown if there are + conflicting cookies. + + :param name: a string containing name of cookie + :param domain: (optional) string containing domain of cookie + :param path: (optional) string containing path of cookie + :return: cookie.value + """ + for cookie in iter(self): + if cookie.name == name: + if domain is None or cookie.domain == domain: + if path is None or cookie.path == path: + return cookie.value + + raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}") + + def _find_no_duplicates( + self, name: str, domain: str | None = None, path: str | None = None + ) -> str: + """Both ``__get_item__`` and ``get`` call this function: it's never + used elsewhere in Requests. + + :param name: a string containing name of cookie + :param domain: (optional) string containing domain of cookie + :param path: (optional) string containing path of cookie + :raises KeyError: if cookie is not found + :raises CookieConflictError: if there are multiple cookies + that match name and optionally domain and path + :return: cookie.value + """ + toReturn = None + for cookie in iter(self): + if cookie.name == name: + if domain is None or cookie.domain == domain: + if path is None or cookie.path == path: + if toReturn is not None: + # if there are multiple cookies that meet passed in criteria + raise CookieConflictError( + f"There are multiple cookies with name, {name!r}" + ) + # we will eventually return this as long as no cookie conflict + toReturn = cookie.value + + if toReturn is not None: + return toReturn + raise KeyError(f"name={name!r}, domain={domain!r}, path={path!r}") + + def __getstate__(self) -> dict[str, Any]: + """Unlike a normal CookieJar, this class is pickleable.""" + state = self.__dict__.copy() + # remove the unpickleable RLock object + state.pop("_cookies_lock") + return state + + def __setstate__(self, state: dict[str, Any]) -> None: + """Unlike a normal CookieJar, this class is pickleable.""" + self.__dict__.update(state) + if "_cookies_lock" not in self.__dict__: + self._cookies_lock = threading.RLock() + + def copy(self) -> RequestsCookieJar: + """Return a copy of this RequestsCookieJar.""" + new_cj = RequestsCookieJar() + new_cj.set_policy(self.get_policy()) + new_cj.update(self) + return new_cj + + def get_policy(self) -> CookiePolicy: + """Return the CookiePolicy instance used.""" + return self._policy + + +def _copy_cookie_jar(jar: CookieJar | None) -> CookieJar | None: # type: ignore[reportUnusedFunction] # cross-module usage in models.py + if jar is None: + return None + + if copy_method := getattr(jar, "copy", None): + # We're dealing with an instance of RequestsCookieJar + return copy_method() + # We're dealing with a generic CookieJar instance + new_jar = copy.copy(jar) + new_jar.clear() + for cookie in jar: + new_jar.set_cookie(copy.copy(cookie)) + return new_jar + + +def create_cookie(name: str, value: str, **kwargs: Any) -> Cookie: + """Make a cookie from underspecified parameters. + + By default, the pair of `name` and `value` will be set for the domain '' + and sent on every request (this is sometimes called a "supercookie"). + """ + result: dict[str, Any] = { + "version": 0, + "name": name, + "value": value, + "port": None, + "domain": "", + "path": "/", + "secure": False, + "expires": None, + "discard": True, + "comment": None, + "comment_url": None, + "rest": {"HttpOnly": None}, + "rfc2109": False, + } + + badargs = set(kwargs) - set(result) + if badargs: + raise TypeError( + f"create_cookie() got unexpected keyword arguments: {list(badargs)}" + ) + + result.update(kwargs) + result["port_specified"] = bool(result["port"]) + result["domain_specified"] = bool(result["domain"]) + result["domain_initial_dot"] = result["domain"].startswith(".") + result["path_specified"] = bool(result["path"]) + + return cookielib.Cookie(**result) + + +def morsel_to_cookie(morsel: Morsel[Any]) -> Cookie: + """Convert a Morsel object into a Cookie containing the one k/v pair.""" + + expires: int | None = None + if morsel["max-age"]: + try: + expires = int(time.time() + int(morsel["max-age"])) + except ValueError: + raise TypeError(f"max-age: {morsel['max-age']} must be integer") + elif morsel["expires"]: + time_template = "%a, %d-%b-%Y %H:%M:%S GMT" + expires = calendar.timegm(time.strptime(morsel["expires"], time_template)) + return create_cookie( + comment=morsel["comment"], + comment_url=bool(morsel["comment"]), + discard=False, + domain=morsel["domain"], + expires=expires, + name=morsel.key, + path=morsel["path"], + port=None, + rest={"HttpOnly": morsel["httponly"]}, + rfc2109=False, + secure=bool(morsel["secure"]), + value=morsel.value, + version=morsel["version"] or 0, + ) + + +_CookieJarT = TypeVar("_CookieJarT", bound=CookieJar) + + +@overload +def cookiejar_from_dict( + cookie_dict: dict[str, str] | None, + cookiejar: None = None, + overwrite: bool = True, +) -> RequestsCookieJar: ... + + +@overload +def cookiejar_from_dict( + cookie_dict: dict[str, str] | None, + cookiejar: _CookieJarT, + overwrite: bool = True, +) -> _CookieJarT: ... + + +def cookiejar_from_dict( + cookie_dict: dict[str, str] | None, + cookiejar: CookieJar | None = None, + overwrite: bool = True, +) -> CookieJar: + """Returns a CookieJar from a key/value dictionary. + + :param cookie_dict: Dict of key/values to insert into CookieJar. + :param cookiejar: (optional) A cookiejar to add the cookies to. + :param overwrite: (optional) If False, will not replace cookies + already in the jar with new ones. + :rtype: CookieJar + """ + if cookiejar is None: + cookiejar = RequestsCookieJar() + + if cookie_dict is not None: + names_from_jar = [cookie.name for cookie in cookiejar] + for name in cookie_dict: + if overwrite or (name not in names_from_jar): + cookiejar.set_cookie(create_cookie(name, cookie_dict[name])) + + return cookiejar + + +def merge_cookies( + cookiejar: CookieJar, cookies: dict[str, str] | CookieJar | None +) -> CookieJar: + """Add cookies to cookiejar and returns a merged CookieJar. + + :param cookiejar: CookieJar object to add the cookies to. + :param cookies: Dictionary or CookieJar object to be added. + :rtype: CookieJar + """ + if not isinstance(cookiejar, cookielib.CookieJar): # runtime guard + raise ValueError("You can only merge into CookieJar") + + if isinstance(cookies, dict): + cookiejar = cookiejar_from_dict(cookies, cookiejar=cookiejar, overwrite=False) + elif isinstance(cookies, cookielib.CookieJar): + if update_method := getattr(cookiejar, "update", None): + update_method(cookies) + else: + for cookie_in_jar in cookies: + cookiejar.set_cookie(cookie_in_jar) + + return cookiejar diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/exceptions.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..cb5e9510e3b1cf4804ac6091fd7fdb55e9f2745b --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/exceptions.py @@ -0,0 +1,162 @@ +""" +requests.exceptions +~~~~~~~~~~~~~~~~~~~ + +This module contains the set of Requests' exceptions. +""" + +from __future__ import annotations + +from typing import TYPE_CHECKING, Any + +from urllib3.exceptions import HTTPError as BaseHTTPError + +from .compat import JSONDecodeError as CompatJSONDecodeError + +if TYPE_CHECKING: + from .models import PreparedRequest, Request, Response + + +class RequestException(IOError): + """There was an ambiguous exception that occurred while handling your + request. + """ + + response: Response | None + request: Request | PreparedRequest | None + + def __init__(self, *args: Any, **kwargs: Any) -> None: + """Initialize RequestException with `request` and `response` objects.""" + response: Response | None = kwargs.pop("response", None) + self.response = response + self.request = kwargs.pop("request", None) + if response is not None and not self.request and hasattr(response, "request"): + self.request = response.request + super().__init__(*args, **kwargs) + + +class InvalidJSONError(RequestException): + """A JSON error occurred.""" + + +class JSONDecodeError(InvalidJSONError, CompatJSONDecodeError): + """Couldn't decode the text into json""" + + def __init__(self, *args: Any, **kwargs: Any) -> None: + """ + Construct the JSONDecodeError instance first with all + args. Then use it's args to construct the IOError so that + the json specific args aren't used as IOError specific args + and the error message from JSONDecodeError is preserved. + """ + CompatJSONDecodeError.__init__(self, *args) + InvalidJSONError.__init__(self, *self.args, **kwargs) + + def __reduce__(self) -> tuple[Any, ...] | str: + """ + The __reduce__ method called when pickling the object must + be the one from the JSONDecodeError (be it json/simplejson) + as it expects all the arguments for instantiation, not just + one like the IOError, and the MRO would by default call the + __reduce__ method from the IOError due to the inheritance order. + """ + return CompatJSONDecodeError.__reduce__(self) + + +class HTTPError(RequestException): + """An HTTP error occurred.""" + + +class ConnectionError(RequestException): + """A Connection error occurred.""" + + +class ProxyError(ConnectionError): + """A proxy error occurred.""" + + +class SSLError(ConnectionError): + """An SSL error occurred.""" + + +class Timeout(RequestException): + """The request timed out. + + Catching this error will catch both + :exc:`~requests.exceptions.ConnectTimeout` and + :exc:`~requests.exceptions.ReadTimeout` errors. + """ + + +class ConnectTimeout(ConnectionError, Timeout): + """The request timed out while trying to connect to the remote server. + + Requests that produced this error are safe to retry. + """ + + +class ReadTimeout(Timeout): + """The server did not send any data in the allotted amount of time.""" + + +class URLRequired(RequestException): + """A valid URL is required to make a request.""" + + +class TooManyRedirects(RequestException): + """Too many redirects.""" + + +class MissingSchema(RequestException, ValueError): + """The URL scheme (e.g. http or https) is missing.""" + + +class InvalidSchema(RequestException, ValueError): + """The URL scheme provided is either invalid or unsupported.""" + + +class InvalidURL(RequestException, ValueError): + """The URL provided was somehow invalid.""" + + +class InvalidHeader(RequestException, ValueError): + """The header value provided was somehow invalid.""" + + +class InvalidProxyURL(InvalidURL): + """The proxy URL provided is invalid.""" + + +class ChunkedEncodingError(RequestException): + """The server declared chunked encoding but sent an invalid chunk.""" + + +class ContentDecodingError(RequestException, BaseHTTPError): + """Failed to decode response content.""" + + +class StreamConsumedError(RequestException, TypeError): + """The content for this response was already consumed.""" + + +class RetryError(RequestException): + """Custom retries logic failed""" + + +class UnrewindableBodyError(RequestException): + """Requests encountered an error when trying to rewind a body.""" + + +# Warnings + + +class RequestsWarning(Warning): + """Base warning for Requests.""" + + +class FileModeWarning(RequestsWarning, DeprecationWarning): + """A file was opened in text mode, but Requests determined its binary length.""" + + +class RequestsDependencyWarning(RequestsWarning): + """An imported dependency doesn't match the expected version range.""" diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/help.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/help.py new file mode 100644 index 0000000000000000000000000000000000000000..f0fced253420c6de85d2332fa206c2dd550cd028 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/help.py @@ -0,0 +1,132 @@ +"""Module containing bug report helper(s).""" + +import json +import platform +import ssl +import sys +from typing import Any + +import idna +import urllib3 + +from . import __version__ as requests_version + +try: + import charset_normalizer +except ImportError: + charset_normalizer = None + +try: + import chardet +except ImportError: + chardet = None + +try: + from urllib3.contrib import pyopenssl +except ImportError: + pyopenssl = None + OpenSSL = None + cryptography = None +else: + import cryptography + import OpenSSL + + +def _implementation(): + """Return a dict with the Python implementation and version. + + Provide both the name and the version of the Python implementation + currently running. For example, on CPython 3.10.3 it will return + {'name': 'CPython', 'version': '3.10.3'}. + + This function works best on CPython and PyPy: in particular, it probably + doesn't work for Jython or IronPython. Future investigation should be done + to work out the correct shape of the code for those platforms. + """ + implementation = platform.python_implementation() + + if implementation == "CPython": + implementation_version = platform.python_version() + elif implementation == "PyPy": + pypy = sys.pypy_version_info # type: ignore[attr-defined] + implementation_version = f"{pypy.major}.{pypy.minor}.{pypy.micro}" # pyright: ignore[reportUnknownMemberType] + if sys.pypy_version_info.releaselevel != "final": # type: ignore[attr-defined] + implementation_version = "".join( + [implementation_version, sys.pypy_version_info.releaselevel] # type: ignore[attr-defined] + ) + elif implementation == "Jython": + implementation_version = platform.python_version() # Complete Guess + elif implementation == "IronPython": + implementation_version = platform.python_version() # Complete Guess + else: + implementation_version = "Unknown" + + return {"name": implementation, "version": implementation_version} + + +def info() -> dict[str, Any]: + """Generate information for a bug report.""" + try: + platform_info = { + "system": platform.system(), + "release": platform.release(), + } + except OSError: + platform_info = { + "system": "Unknown", + "release": "Unknown", + } + + implementation_info = _implementation() + urllib3_info = {"version": urllib3.__version__} + charset_normalizer_info = {"version": None} + chardet_info: dict[str, str | None] = {"version": None} + if charset_normalizer: + charset_normalizer_info = {"version": charset_normalizer.__version__} + if chardet: + chardet_info = {"version": chardet.__version__} + + pyopenssl_info: dict[str, str | None] = { + "version": None, + "openssl_version": "", + } + if OpenSSL: + pyopenssl_info = { + "version": OpenSSL.__version__, + "openssl_version": f"{OpenSSL.SSL.OPENSSL_VERSION_NUMBER:x}", + } + cryptography_info = { + "version": getattr(cryptography, "__version__", ""), + } + idna_info = { + "version": getattr(idna, "__version__", ""), + } + + system_ssl = ssl.OPENSSL_VERSION_NUMBER + system_ssl_info = {"version": f"{system_ssl:x}" if system_ssl is not None else ""} # type: ignore[reportUnnecessaryComparison] + + return { + "platform": platform_info, + "implementation": implementation_info, + "system_ssl": system_ssl_info, + "using_pyopenssl": pyopenssl is not None, + "using_charset_normalizer": chardet is None, + "pyOpenSSL": pyopenssl_info, + "urllib3": urllib3_info, + "chardet": chardet_info, + "charset_normalizer": charset_normalizer_info, + "cryptography": cryptography_info, + "idna": idna_info, + "requests": { + "version": requests_version, + }, + } + + +def main(): + """Pretty-print the bug information as JSON.""" + print(json.dumps(info(), sort_keys=True, indent=2)) + + +if __name__ == "__main__": + main() diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/hooks.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/hooks.py new file mode 100644 index 0000000000000000000000000000000000000000..11ff9e9f27e76f5ef6b9b609e88c2f418d655e16 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/hooks.py @@ -0,0 +1,48 @@ +""" +requests.hooks +~~~~~~~~~~~~~~ + +This module provides the capabilities for the Requests hooks system. + +Available hooks: + +``response``: + The response generated from a Request. +""" + +from __future__ import annotations + +from collections.abc import Callable, Iterable +from typing import TYPE_CHECKING, Any + +if TYPE_CHECKING: + from . import _types as _t + from .models import Response + +HOOKS: list[str] = ["response"] + + +def default_hooks() -> dict[str, list[_t.HookType]]: + return {event: [] for event in HOOKS} + + +# TODO: response is the only one + + +def dispatch_hook( + key: str, + hooks: _t.HooksInputType | None, + hook_data: Response, + **kwargs: Any, +) -> Response: + """Dispatches a hook dictionary on a given piece of data.""" + hooks_dict = hooks or {} + hook_list: Iterable[_t.HookType] | _t.HookType | None = hooks_dict.get(key) + if hook_list: + if isinstance(hook_list, Callable): + hook_list = [hook_list] + for hook in hook_list: + _hook_data = hook(hook_data, **kwargs) + if _hook_data is not None: + hook_data = _hook_data + return hook_data diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/models.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/models.py new file mode 100644 index 0000000000000000000000000000000000000000..ebeba1e39fc549a1e6dafc2cf74f372dc01e819c --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/models.py @@ -0,0 +1,1187 @@ +""" +requests.models +~~~~~~~~~~~~~~~ + +This module contains the primary objects that power Requests. +""" + +from __future__ import annotations + +import datetime + +# Import encoding now, to avoid implicit import later. +# Implicit import within threads may cause LookupError when standard library is in a ZIP, +# such as in Embedded Python. See https://github.com/psf/requests/issues/3578. +import encodings.idna # noqa: F401 +from collections.abc import Callable, Generator, Iterable, Iterator, Mapping +from io import UnsupportedOperation +from typing import ( + TYPE_CHECKING, + Any, + Final, + Literal, + cast, + overload, +) + +from urllib3.exceptions import ( + DecodeError, + LocationParseError, + ProtocolError, + ReadTimeoutError, + SSLError, +) +from urllib3.fields import RequestField +from urllib3.filepost import encode_multipart_formdata +from urllib3.util import parse_url + +from ._internal_utils import to_native_string, unicode_is_ascii +from ._types import SupportsRead as _SupportsRead +from .auth import HTTPBasicAuth +from .compat import ( + JSONDecodeError, + basestring, + builtin_str, + chardet, + cookielib, + urlencode, + urlsplit, + urlunparse, +) +from .compat import json as complexjson +from .cookies import ( + _copy_cookie_jar, + cookiejar_from_dict, + get_cookie_header, +) +from .exceptions import ( + ChunkedEncodingError, + ConnectionError, + ContentDecodingError, + HTTPError, + InvalidJSONError, + InvalidURL, + MissingSchema, + StreamConsumedError, +) +from .exceptions import JSONDecodeError as RequestsJSONDecodeError +from .exceptions import SSLError as RequestsSSLError +from .hooks import default_hooks +from .status_codes import codes +from .structures import CaseInsensitiveDict +from .utils import ( + check_header_validity, + get_auth_from_url, + guess_filename, + guess_json_utf, + iter_slices, + parse_header_links, + requote_uri, + stream_decode_response_unicode, + super_len, + to_key_val_list, +) + +if TYPE_CHECKING: + from http.cookiejar import CookieJar + + from typing_extensions import Self + + from . import _types as _t + from .adapters import HTTPAdapter + from .cookies import RequestsCookieJar + +#: The set of HTTP status codes that indicate an automatically +#: processable redirect. +REDIRECT_STATI: Final[tuple[int, ...]] = ( # type: ignore[assignment] + codes.moved, # 301 + codes.found, # 302 + codes.other, # 303 + codes.temporary_redirect, # 307 + codes.permanent_redirect, # 308 +) + +DEFAULT_REDIRECT_LIMIT: int = 30 +CONTENT_CHUNK_SIZE: int = 10 * 1024 +ITER_CHUNK_SIZE: int = 512 + + +class RequestEncodingMixin: + url: str | None + + @property + def path_url(self) -> str: + """Build the path URL to use.""" + + url: list[str] = [] + + p = urlsplit(cast(str, self.url)) + + path = p.path + if not path: + path = "/" + + url.append(path) + + query = p.query + if query: + url.append("?") + url.append(query) + + return "".join(url) + + @overload + @staticmethod + def _encode_params(data: str) -> str: ... + + @overload + @staticmethod + def _encode_params(data: bytes) -> bytes: ... + + @overload + @staticmethod + def _encode_params( + data: _t.SupportsRead[str | bytes], + ) -> _t.SupportsRead[str | bytes]: ... + + @overload + @staticmethod + def _encode_params(data: _t.KVDataType) -> str: ... + + @staticmethod + def _encode_params( + data: _t.EncodableDataType, + ) -> str | bytes | _t.SupportsRead[str | bytes]: + """Encode parameters in a piece of data. + + Will successfully encode parameters when passed as a dict or a list of + 2-tuples. Order is retained if data is a list of 2-tuples but arbitrary + if parameters are supplied as a dict. + """ + + if isinstance(data, (str, bytes)): + return data + elif isinstance(data, _SupportsRead): + return data + elif hasattr(data, "__iter__"): + result: list[tuple[bytes, bytes]] = [] + for k, vs in to_key_val_list(data): + if isinstance(vs, basestring) or not hasattr(vs, "__iter__"): + vs = [vs] + for v in vs: + if v is not None: + result.append( + ( + k.encode("utf-8") if isinstance(k, str) else k, + v.encode("utf-8") if isinstance(v, str) else v, + ) + ) + return urlencode(result, doseq=True) + else: + return data # type: ignore[return-value] # unreachable for valid _t.DataType + + @staticmethod + def _encode_files( + files: _t.FilesType, data: _t.RawDataType | None + ) -> tuple[bytes, str]: + """Build the body for a multipart/form-data request. + + Will successfully encode files when passed as a dict or a list of + tuples. Order is retained if data is a list of tuples but arbitrary + if parameters are supplied as a dict. + The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype) + or 4-tuples (filename, fileobj, contentype, custom_headers). + """ + if not files: + raise ValueError("Files must be provided.") + elif isinstance(data, basestring): + raise ValueError("Data must not be a string.") + + new_fields: list[RequestField | tuple[str, bytes]] = [] + fields = to_key_val_list(data or {}) + files = to_key_val_list(files or {}) + + for field, val in fields: + if isinstance(val, basestring) or not hasattr(val, "__iter__"): + val = [val] + for v in val: + if v is not None: + # Don't call str() on bytestrings: in Py3 it all goes wrong. + if not isinstance(v, bytes): + v = str(v) + + new_fields.append( + ( + field.decode("utf-8") + if isinstance(field, bytes) + else field, + v.encode("utf-8") if isinstance(v, str) else v, + ) + ) + + for k, v in files: + # support for explicit filename + ft = None + fh = None + if isinstance(v, (tuple, list)): + if len(v) == 2: + fn, fp = v + elif len(v) == 3: + fn, fp, ft = v + else: + fn, fp, ft, fh = v + else: + fn = guess_filename(v) or k + fp = v + + if isinstance(fp, (str, bytes, bytearray)): + fdata = fp + # data that proxies attributes to underlying objects needs hasattr + # defensive check for untyped callers + elif isinstance(fp, _SupportsRead) or hasattr(fp, "read"): + fdata = fp.read() + elif fp is None: # defensive check for untyped callers + continue + else: + fdata = fp + + rf = RequestField(name=k, data=fdata, filename=fn, headers=fh) + rf.make_multipart(content_type=ft) + new_fields.append(rf) + + body, content_type = encode_multipart_formdata(new_fields) + + return body, content_type + + +class RequestHooksMixin: + hooks: dict[str, list[_t.HookType]] + + def register_hook( + self, event: str, hook: Iterable[_t.HookType] | _t.HookType + ) -> None: + """Properly register a hook.""" + + if event not in self.hooks: + raise ValueError(f'Unsupported event specified, with event name "{event}"') + + if isinstance(hook, Callable): + self.hooks[event].append(hook) + elif hasattr(hook, "__iter__"): + self.hooks[event].extend( + h for h in hook if isinstance(h, Callable) + ) # defensive runtime filter + + def deregister_hook(self, event: str, hook: _t.HookType) -> bool: + """Deregister a previously registered hook. + Returns True if the hook existed, False if not. + """ + + try: + self.hooks[event].remove(hook) + return True + except ValueError: + return False + + +class Request(RequestHooksMixin): + """A user-created :class:`Request ` object. + + Used to prepare a :class:`PreparedRequest `, which is sent to the server. + + :param method: HTTP method to use. + :param url: URL to send. + :param headers: dictionary of headers to send. + :param files: dictionary of {filename: fileobject} files to multipart upload. + :param data: the body to attach to the request. If a dictionary or + list of tuples ``[(key, value)]`` is provided, form-encoding will + take place. + :param json: json for the body to attach to the request (if files or data is not specified). + :param params: URL parameters to append to the URL. If a dictionary or + list of tuples ``[(key, value)]`` is provided, form-encoding will + take place. + :param auth: Auth handler or (user, pass) tuple. + :param cookies: dictionary or CookieJar of cookies to attach to this request. + :param hooks: dictionary of callback hooks, for internal usage. + + Usage:: + + >>> import requests + >>> req = requests.Request('GET', 'https://httpbin.org/get') + >>> req.prepare() + + """ + + hooks: dict[str, list[_t.HookType]] + method: str | None + url: _t.UriType | None + headers: Mapping[str, str | bytes] + files: _t.FilesType + data: _t.DataType + json: _t.JsonType + params: _t.ParamsType + auth: _t.AuthType + cookies: RequestsCookieJar | CookieJar | dict[str, str] | None + + def __init__( + self, + method: str | None = None, + url: _t.UriType | None = None, + headers: _t.HeadersType = None, + files: _t.FilesType = None, + data: _t.DataType = None, + params: _t.ParamsType = None, + auth: _t.AuthType = None, + cookies: RequestsCookieJar | CookieJar | dict[str, str] | None = None, + hooks: _t.HooksInputType | None = None, + json: _t.JsonType = None, + ) -> None: + # Default empty dicts for dict params. + data = [] if data is None else data + files = [] if files is None else files + headers = {} if headers is None else headers + params = {} if params is None else params + hooks = {} if hooks is None else hooks + + self.hooks = default_hooks() + for k, v in list(hooks.items()): + self.register_hook(event=k, hook=v) + + self.method = method + self.url = url + self.headers = headers + self.files = files + self.data = data + self.json = json + self.params = params + self.auth = auth + self.cookies = cookies + + def __repr__(self) -> str: + return f"" + + def prepare(self) -> PreparedRequest: + """Constructs a :class:`PreparedRequest ` for transmission and returns it.""" + p = PreparedRequest() + p.prepare( + method=self.method, + url=self.url, + headers=self.headers, + files=self.files, + data=self.data, + json=self.json, + params=self.params, + auth=self.auth, + cookies=self.cookies, + hooks=self.hooks, + ) + return p + + +class PreparedRequest(RequestEncodingMixin, RequestHooksMixin): + """The fully mutable :class:`PreparedRequest ` object, + containing the exact bytes that will be sent to the server. + + Instances are generated from a :class:`Request ` object, and + should not be instantiated manually; doing so may produce undesirable + effects. + + Usage:: + + >>> import requests + >>> req = requests.Request('GET', 'https://httpbin.org/get') + >>> r = req.prepare() + >>> r + + + >>> s = requests.Session() + >>> s.send(r) + + """ + + method: str | None + url: str | None + headers: CaseInsensitiveDict[str | bytes] + _cookies: RequestsCookieJar | CookieJar | None + body: _t.BodyType + hooks: dict[str, list[_t.HookType]] + _body_position: int | object | None + + def __init__(self) -> None: + #: HTTP verb to send to the server. + self.method = None + #: HTTP URL to send the request to. + self.url = None + #: dictionary of HTTP headers. + self.headers = None # type: ignore[assignment] + # The `CookieJar` used to create the Cookie header will be stored here + # after prepare_cookies is called + self._cookies = None + #: request body to send to the server. + self.body = None + #: dictionary of callback hooks, for internal usage. + self.hooks = default_hooks() + #: integer denoting starting position of a readable file-like body. + self._body_position = None + + def prepare( + self, + method: str | None = None, + url: _t.UriType | None = None, + headers: Mapping[str, str | bytes] | None = None, + files: _t.FilesType = None, + data: _t.DataType = None, + params: _t.ParamsType = None, + auth: _t.AuthType = None, + cookies: RequestsCookieJar | CookieJar | dict[str, str] | None = None, + hooks: _t.HooksInputType | None = None, + json: _t.JsonType = None, + ) -> None: + """Prepares the entire request with the given parameters.""" + + url = cast("_t.UriType", url) + self.prepare_method(method) + self.prepare_url(url, params) + self.prepare_headers(headers) + self.prepare_cookies(cookies) + self.prepare_body(data, files, json) + self.prepare_auth(auth, url) + + # Note that prepare_auth must be last to enable authentication schemes + # such as OAuth to work on a fully prepared request. + + # This MUST go after prepare_auth. Authenticators could add a hook + self.prepare_hooks(hooks) + + def __repr__(self) -> str: + return f"" + + def copy(self) -> PreparedRequest: + p = PreparedRequest() + p.method = self.method + p.url = self.url + p.headers = self.headers.copy() if self.headers is not None else None # type: ignore[assignment] + p._cookies = _copy_cookie_jar(self._cookies) + p.body = self.body + p.hooks = self.hooks + p._body_position = self._body_position + return p + + def prepare_method(self, method: str | None) -> None: + """Prepares the given HTTP method.""" + self.method = method + if self.method is not None: + self.method = to_native_string(self.method.upper()) + + @staticmethod + def _get_idna_encoded_host(host: str) -> str: + import idna + + try: + host = idna.encode(host, uts46=True).decode("utf-8") + except idna.IDNAError: + raise UnicodeError + return host + + def prepare_url( + self, + url: _t.UriType, + params: _t.ParamsType, + ) -> None: + """Prepares the given HTTP URL.""" + #: Accept objects that have string representations. + #: We're unable to blindly call unicode/str functions + #: as this will include the bytestring indicator (b'') + #: on python 3.x. + #: https://github.com/psf/requests/pull/2238 + if isinstance(url, bytes): + url = url.decode("utf8") + else: + url = str(url) + + # Remove leading whitespaces from url + url = url.lstrip() + + # Don't do any URL preparation for non-HTTP schemes like `mailto`, + # `data` etc to work around exceptions from `url_parse`, which + # handles RFC 3986 only. + if ":" in url and not url.lower().startswith("http"): + self.url = url + return + + # Support for unicode domain names and paths. + try: + scheme, auth, host, port, path, query, fragment = parse_url(url) + except LocationParseError as e: + raise InvalidURL(*e.args) + + if not scheme: + raise MissingSchema( + f"Invalid URL {url!r}: No scheme supplied. " + f"Perhaps you meant https://{url}?" + ) + + if not host: + raise InvalidURL(f"Invalid URL {url!r}: No host supplied") + + # In general, we want to try IDNA encoding the hostname if the string contains + # non-ASCII characters. This allows users to automatically get the correct IDNA + # behaviour. For strings containing only ASCII characters, we need to also verify + # it doesn't start with a wildcard (*), before allowing the unencoded hostname. + if not unicode_is_ascii(host): + try: + host = self._get_idna_encoded_host(host) + except UnicodeError: + raise InvalidURL("URL has an invalid label.") + elif host.startswith(("*", ".")): + raise InvalidURL("URL has an invalid label.") + + # Carefully reconstruct the network location + netloc = auth or "" + if netloc: + netloc += "@" + netloc += host + if port: + netloc += f":{port}" + + # Bare domains aren't valid URLs. + if not path: + path = "/" + + if isinstance(params, (str, bytes)): + params = to_native_string(params) + + if params is not None: + enc_params = self._encode_params(params) + else: + enc_params = "" + + if enc_params: + if query: + query = f"{query}&{enc_params}" + else: + query = enc_params + + url = requote_uri(urlunparse((scheme, netloc, path, "", query, fragment))) + self.url = url + + def prepare_headers(self, headers: Mapping[str, str | bytes] | None) -> None: + """Prepares the given HTTP headers.""" + + self.headers = CaseInsensitiveDict() + if headers: + for header in headers.items(): + # Raise exception on invalid header value. + check_header_validity(header) + name, value = header + self.headers[to_native_string(name)] = value + + def prepare_body( + self, data: _t.DataType, files: _t.FilesType, json: _t.JsonType = None + ) -> None: + """Prepares the given HTTP body data.""" + + # Check if file, fo, generator, iterator. + # If not, run through normal process. + + # Nottin' on you. + body = None + content_type = None + + if not data and json is not None: + # urllib3 requires a bytes-like body. Python 2's json.dumps + # provides this natively, but Python 3 gives a Unicode string. + content_type = "application/json" + + try: + body = complexjson.dumps(json, allow_nan=False) + except ValueError as ve: + raise InvalidJSONError(ve, request=self) + + if not isinstance(body, bytes): + body = body.encode("utf-8") + + # data that proxies attributes to underlying objects needs hasattr + is_iterable = isinstance(data, Iterable) or hasattr(data, "__iter__") + if is_iterable and not isinstance(data, (str, bytes, list, tuple, Mapping)): + try: + length = super_len(data) + except (TypeError, AttributeError, UnsupportedOperation): + length = None + + body = data + + if getattr(body, "tell", None) is not None: + # Record the current file position before reading. + # This will allow us to rewind a file in the event + # of a redirect. + try: + self._body_position = body.tell() # type: ignore[union-attr] # guarded by getattr check + except OSError: + # This differentiates from None, allowing us to catch + # a failed `tell()` later when trying to rewind the body + self._body_position = object() + + if files: + raise NotImplementedError( + "Streamed bodies and files are mutually exclusive." + ) + + if length: + self.headers["Content-Length"] = builtin_str(length) + else: + self.headers["Transfer-Encoding"] = "chunked" + else: + # After is_stream filtering, remaining data is raw (not streamed) + raw_data = cast("_t.RawDataType | None", data) + + # Multi-part file uploads. + if files: + (body, content_type) = self._encode_files(files, raw_data) + else: + if raw_data: + body = self._encode_params(raw_data) + if isinstance(data, basestring) or isinstance(data, _SupportsRead): + content_type = None + else: + content_type = "application/x-www-form-urlencoded" + + self.prepare_content_length(body) + + # Add content-type if it wasn't explicitly provided. + if content_type and ("content-type" not in self.headers): + self.headers["Content-Type"] = content_type + + self.body = body # type: ignore[assignment] # body transforms from DataType to BodyType + + def prepare_content_length(self, body: _t.BodyType) -> None: + """Prepare Content-Length header based on request method and body""" + if body is not None: + length = super_len(body) + if length: + # If length exists, set it. Otherwise, we fallback + # to Transfer-Encoding: chunked. + self.headers["Content-Length"] = builtin_str(length) + elif ( + self.method not in ("GET", "HEAD") + and self.headers.get("Content-Length") is None + ): + # Set Content-Length to 0 for methods that can have a body + # but don't provide one. (i.e. not GET or HEAD) + self.headers["Content-Length"] = "0" + + def prepare_auth( + self, + auth: _t.AuthType, + url: _t.UriType = "", + ) -> None: + """Prepares the given HTTP auth data.""" + + # If no Auth is explicitly provided, extract it from the URL first. + if auth is None: + url_auth = get_auth_from_url(cast(str, self.url)) + auth = url_auth if any(url_auth) else None + + if auth: + if isinstance(auth, tuple) and len(auth) == 2: # type: ignore[arg-type] # pyright widens tuple from Callable in AuthType + # special-case basic HTTP auth + auth_handler = HTTPBasicAuth(*auth) # type: ignore[arg-type] # pyright widens tuple from Callable in AuthType + else: + # TODO: can be fixed by flipping the conditionals + auth_handler = cast("Callable[..., PreparedRequest]", auth) + + # Allow auth to make its changes. + r = auth_handler(self) + + # Update self to reflect the auth changes. + self.__dict__.update(r.__dict__) + + # Recompute Content-Length + self.prepare_content_length(self.body) + + def prepare_cookies( + self, cookies: RequestsCookieJar | CookieJar | dict[str, str] | None + ) -> None: + """Prepares the given HTTP cookie data. + + This function eventually generates a ``Cookie`` header from the + given cookies using cookielib. Due to cookielib's design, the header + will not be regenerated if it already exists, meaning this function + can only be called once for the life of the + :class:`PreparedRequest ` object. Any subsequent calls + to ``prepare_cookies`` will have no actual effect, unless the "Cookie" + header is removed beforehand. + """ + if isinstance(cookies, cookielib.CookieJar): + self._cookies = cookies + else: + self._cookies = cookiejar_from_dict(cookies) + + cookies_jar = cast("CookieJar", self._cookies) + cookie_header = get_cookie_header(cookies_jar, self) + if cookie_header is not None: + self.headers["Cookie"] = cookie_header + + def prepare_hooks(self, hooks: _t.HooksInputType | None) -> None: + """Prepares the given hooks.""" + # hooks can be passed as None to the prepare method and to this + # method. To prevent iterating over None, simply use an empty list + # if hooks is False-y + hooks = hooks or {} + for event in hooks: + self.register_hook(event, hooks[event]) + + +class Response: + """The :class:`Response ` object, which contains a + server's response to an HTTP request. + """ + + _content: bytes | Literal[False] | None + _content_consumed: bool + _next: PreparedRequest | None + status_code: int + headers: CaseInsensitiveDict[str] + raw: Any + url: str + encoding: str | None + history: list[Response] + reason: str + cookies: RequestsCookieJar + elapsed: datetime.timedelta + request: PreparedRequest + connection: HTTPAdapter + + __attrs__: list[str] = [ + "_content", + "status_code", + "headers", + "url", + "history", + "encoding", + "reason", + "cookies", + "elapsed", + "request", + ] + + def __init__(self) -> None: + self._content = False + self._content_consumed = False + self._next = None + + #: Integer Code of responded HTTP Status, e.g. 404 or 200. + self.status_code = None # type: ignore[assignment] + + #: Case-insensitive Dictionary of Response Headers. + #: For example, ``headers['content-encoding']`` will return the + #: value of a ``'Content-Encoding'`` response header. + self.headers = CaseInsensitiveDict() + + #: File-like object representation of response (for advanced usage). + #: Use of ``raw`` requires that ``stream=True`` be set on the request. + #: This requirement does not apply for use internally to Requests. + self.raw = None + + #: Final URL location of Response. + self.url = None # type: ignore[assignment] + + #: Encoding to decode with when accessing r.text. + self.encoding = None + + #: A list of :class:`Response ` objects from + #: the history of the Request. Any redirect responses will end + #: up here. The list is sorted from the oldest to the most recent request. + self.history = [] + + #: Textual reason of responded HTTP Status, e.g. "Not Found" or "OK". + self.reason = None # type: ignore[assignment] + + #: A CookieJar of Cookies the server sent back. + self.cookies = cookiejar_from_dict({}) + + #: The amount of time elapsed between sending the request + #: and the arrival of the response (as a timedelta). + #: This property specifically measures the time taken between sending + #: the first byte of the request and finishing parsing the headers. It + #: is therefore unaffected by consuming the response content or the + #: value of the ``stream`` keyword argument. + self.elapsed = datetime.timedelta(0) + + #: The :class:`PreparedRequest ` object to which this + #: is a response. + self.request = None # type: ignore[assignment] + + def __enter__(self) -> Self: + return self + + def __exit__(self, *args: Any) -> None: + self.close() + + def __getstate__(self) -> dict[str, Any]: + # Consume everything; accessing the content attribute makes + # sure the content has been fully read. + if not self._content_consumed: + self.content + + return {attr: getattr(self, attr, None) for attr in self.__attrs__} + + def __setstate__(self, state: dict[str, Any]) -> None: + for name, value in state.items(): + setattr(self, name, value) + + # pickled objects do not have .raw + setattr(self, "_content_consumed", True) + setattr(self, "raw", None) + + def __repr__(self) -> str: + return f"" + + def __bool__(self) -> bool: + """Returns True if :attr:`status_code` is less than 400. + + This attribute checks if the status code of the response is between + 400 and 600 to see if there was a client error or a server error. If + the status code, is between 200 and 400, this will return True. This + is **not** a check to see if the response code is ``200 OK``. + """ + return self.ok + + def __nonzero__(self) -> bool: + """Returns True if :attr:`status_code` is less than 400. + + This attribute checks if the status code of the response is between + 400 and 600 to see if there was a client error or a server error. If + the status code, is between 200 and 400, this will return True. This + is **not** a check to see if the response code is ``200 OK``. + """ + return self.ok + + def __iter__(self) -> Iterator[bytes]: + """Allows you to use a response as an iterator.""" + return self.iter_content(128) + + @property + def ok(self) -> bool: + """Returns True if :attr:`status_code` is less than 400, False if not. + + This attribute checks if the status code of the response is between + 400 and 600 to see if there was a client error or a server error. If + the status code is between 200 and 400, this will return True. This + is **not** a check to see if the response code is ``200 OK``. + """ + try: + self.raise_for_status() + except HTTPError: + return False + return True + + @property + def is_redirect(self) -> bool: + """True if this Response is a well-formed HTTP redirect that could have + been processed automatically (by :meth:`Session.resolve_redirects`). + """ + return "location" in self.headers and self.status_code in REDIRECT_STATI + + @property + def is_permanent_redirect(self) -> bool: + """True if this Response one of the permanent versions of redirect.""" + return "location" in self.headers and self.status_code in ( + codes.moved_permanently, + codes.permanent_redirect, + ) + + @property + def next(self) -> PreparedRequest | None: + """Returns a PreparedRequest for the next request in a redirect chain, if there is one.""" + return self._next + + @property + def apparent_encoding(self) -> str | None: + """The apparent encoding, provided by the charset_normalizer or chardet libraries.""" + if chardet is not None: + return chardet.detect(self.content)["encoding"] + else: + # If no character detection library is available, we'll fall back + # to a standard Python utf-8 str. + return "utf-8" + + @overload + def iter_content( + self, chunk_size: int | None = 1, decode_unicode: Literal[False] = False + ) -> Iterator[bytes]: ... + @overload + def iter_content( + self, chunk_size: int | None = 1, *, decode_unicode: Literal[True] + ) -> Iterator[str | bytes]: ... + def iter_content( + self, chunk_size: int | None = 1, decode_unicode: bool = False + ) -> Iterator[str | bytes]: + """Iterates over the response data. When stream=True is set on the + request, this avoids reading the content at once into memory for + large responses. The chunk size is the number of bytes it should + read into memory. This is not necessarily the length of each item + returned as decoding can take place. + + chunk_size must be of type int or None. A value of None will + function differently depending on the value of `stream`. + stream=True will read data as it arrives in whatever size the + chunks are received. If stream=False, data is returned as + a single chunk. + + If decode_unicode is True, content will be decoded using encoding + information from the response. If no encoding information is available, + bytes will be returned. This can be bypassed by manually setting + `encoding` on the response. + """ + + def generate() -> Generator[bytes, None, None]: + # Special case for urllib3. + if hasattr(self.raw, "stream"): + try: + yield from self.raw.stream(chunk_size, decode_content=True) + except ProtocolError as e: + raise ChunkedEncodingError(e) + except DecodeError as e: + raise ContentDecodingError(e) + except ReadTimeoutError as e: + raise ConnectionError(e) + except SSLError as e: + raise RequestsSSLError(e) + else: + # Standard file-like object. + while True: + chunk = self.raw.read(chunk_size) + if not chunk: + break + yield chunk + + self._content_consumed = True + + if self._content_consumed and isinstance(self._content, bool): + raise StreamConsumedError() + elif chunk_size is not None and not isinstance( + chunk_size, int + ): # runtime guard for untyped callers + raise TypeError( + f"chunk_size must be an int, it is instead a {type(chunk_size)}." + ) + + if self._content_consumed: + # simulate reading small chunks of the content + content = cast(bytes, self._content) + chunks = iter_slices(content, chunk_size) + else: + chunks = generate() + + if decode_unicode: + chunks = stream_decode_response_unicode(chunks, self) + + return chunks + + @overload + def iter_lines( + self, + chunk_size: int = ITER_CHUNK_SIZE, + decode_unicode: Literal[False] = False, + delimiter: bytes | None = None, + ) -> Iterator[bytes]: ... + @overload + def iter_lines( + self, + chunk_size: int = ITER_CHUNK_SIZE, + *, + decode_unicode: Literal[True], + delimiter: str | bytes | None = None, + ) -> Iterator[str | bytes]: ... + def iter_lines( + self, + chunk_size: int = ITER_CHUNK_SIZE, + decode_unicode: bool = False, + delimiter: str | bytes | None = None, + ) -> Iterator[str | bytes]: + """Iterates over the response data, one line at a time. When + stream=True is set on the request, this avoids reading the + content at once into memory for large responses. + + The decode_unicode param works the same as in `iter_content`, with the + same caveats. + + .. note:: This method is not reentrant safe. + """ + + pending: str | bytes | None = None + + for chunk in self.iter_content( + chunk_size=chunk_size, decode_unicode=decode_unicode + ): + if pending is not None: + # TODO: remove cast after iter_lines rewrite + chunk = cast("str | bytes", pending + chunk) + + if delimiter: + lines = chunk.split(delimiter) # type: ignore[arg-type] + else: + lines = chunk.splitlines() + + if lines and lines[-1] and chunk and lines[-1][-1] == chunk[-1]: + pending = lines.pop() + else: + pending = None + + yield from lines + + if pending is not None: + yield pending + + @property + def content(self) -> bytes: + """Content of the response, in bytes.""" + + if self._content is False: + # Read the contents. + if self._content_consumed: + raise RuntimeError("The content for this response was already consumed") + + if self.status_code == 0 or self.raw is None: + self._content = None + else: + self._content = b"".join(self.iter_content(CONTENT_CHUNK_SIZE)) or b"" + + self._content_consumed = True + # don't need to release the connection; that's been handled by urllib3 + # since we exhausted the data. + return self._content # type: ignore[return-value] + + @property + def text(self) -> str: + """Content of the response, in unicode. + + If Response.encoding is None, encoding will be guessed using + ``charset_normalizer`` or ``chardet``. + + The encoding of the response content is determined based solely on HTTP + headers, following RFC 2616 to the letter. If you can take advantage of + non-HTTP knowledge to make a better guess at the encoding, you should + set ``r.encoding`` appropriately before accessing this property. + """ + + # Try charset from content-type + content = None + encoding = self.encoding + + if not self.content: + return "" + + # Fallback to auto-detected encoding. + if self.encoding is None: + encoding = self.apparent_encoding + + # Decode unicode from given encoding. + try: + content = str(self.content, encoding or "utf-8", errors="replace") + except (LookupError, TypeError): + # A LookupError is raised if the encoding was not found which could + # indicate a misspelling or similar mistake. + # + # A TypeError can be raised if encoding is None + # + # So we try blindly encoding. + content = str(self.content, errors="replace") + + return content + + def json(self, **kwargs: Any) -> Any: + r"""Decodes the JSON response body (if any) as a Python object. + + This may return a dictionary, list, etc. depending on what is in the response. + + :param \*\*kwargs: Optional arguments that ``json.loads`` takes. + :raises requests.exceptions.JSONDecodeError: If the response body does not + contain valid json. + """ + + if not self.encoding and self.content and len(self.content) > 3: + # No encoding set. JSON RFC 4627 section 3 states we should expect + # UTF-8, -16 or -32. Detect which one to use; If the detection or + # decoding fails, fall back to `self.text` (using charset_normalizer to make + # a best guess). + encoding = guess_json_utf(self.content) + if encoding is not None: + try: + return complexjson.loads(self.content.decode(encoding), **kwargs) + except UnicodeDecodeError: + # Wrong UTF codec detected; usually because it's not UTF-8 + # but some other 8-bit codec. This is an RFC violation, + # and the server didn't bother to tell us what codec *was* + # used. + pass + except JSONDecodeError as e: + raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) + + try: + return complexjson.loads(self.text, **kwargs) + except JSONDecodeError as e: + # Catch JSON-related errors and raise as requests.JSONDecodeError + # This aliases json.JSONDecodeError and simplejson.JSONDecodeError + raise RequestsJSONDecodeError(e.msg, e.doc, e.pos) + + @property + def links(self) -> dict[str, dict[str, str]]: + """Returns the parsed header links of the response, if any.""" + + header = self.headers.get("link") + + resolved_links: dict[str, dict[str, str]] = {} + + if header: + links = parse_header_links(header) + + for link in links: + key = link.get("rel") or link.get("url") + if key is not None: + resolved_links[key] = link + + return resolved_links + + def raise_for_status(self) -> None: + """Raises :class:`HTTPError`, if one occurred.""" + + http_error_msg = "" + if isinstance(self.reason, bytes): + # We attempt to decode utf-8 first because some servers + # choose to localize their reason strings. If the string + # isn't utf-8, we fall back to iso-8859-1 for all other + # encodings. (See PR #3538) + try: + reason = self.reason.decode("utf-8") + except UnicodeDecodeError: + reason = self.reason.decode("iso-8859-1") + else: + reason = self.reason + + if 400 <= self.status_code < 500: + http_error_msg = ( + f"{self.status_code} Client Error: {reason} for url: {self.url}" + ) + + elif 500 <= self.status_code < 600: + http_error_msg = ( + f"{self.status_code} Server Error: {reason} for url: {self.url}" + ) + + if http_error_msg: + raise HTTPError(http_error_msg, response=self) + + def close(self) -> None: + """Releases the connection back to the pool. Once this method has been + called the underlying ``raw`` object must not be accessed again. + + *Note: Should not normally need to be called explicitly.* + """ + if not self._content_consumed: + self.raw.close() + + release_conn = getattr(self.raw, "release_conn", None) + if release_conn is not None: + release_conn() diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/packages.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/packages.py new file mode 100644 index 0000000000000000000000000000000000000000..5ab3d8e250de8475cb22553f564e5444e02c7460 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/packages.py @@ -0,0 +1,23 @@ +import sys + +from .compat import chardet + +# This code exists for backwards compatibility reasons. +# I don't like it either. Just look the other way. :) + +for package in ("urllib3", "idna"): + locals()[package] = __import__(package) + # This traversal is apparently necessary such that the identities are + # preserved (requests.packages.urllib3.* is urllib3.*) + for mod in list(sys.modules): + if mod == package or mod.startswith(f"{package}."): + sys.modules[f"requests.packages.{mod}"] = sys.modules[mod] + +if chardet is not None: + target = chardet.__name__ + for mod in list(sys.modules): + if mod == target or mod.startswith(f"{target}."): + imported_mod = sys.modules[mod] + sys.modules[f"requests.packages.{mod}"] = imported_mod + mod = mod.replace(target, "chardet") + sys.modules[f"requests.packages.{mod}"] = imported_mod diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/py.typed b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/py.typed new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/sessions.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/sessions.py new file mode 100644 index 0000000000000000000000000000000000000000..d11355be668b2dc03da02feb83c61ff24cc741f5 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/sessions.py @@ -0,0 +1,920 @@ +""" +requests.sessions +~~~~~~~~~~~~~~~~~ + +This module provides a Session object to manage and persist settings across +requests (cookies, auth, proxies). +""" + +from __future__ import annotations + +import os +import sys +import time +from collections import OrderedDict +from collections.abc import Generator, Mapping, MutableMapping +from datetime import timedelta +from typing import TYPE_CHECKING, Any, cast + +from ._internal_utils import to_native_string +from ._types import is_prepared as _is_prepared +from .adapters import HTTPAdapter +from .auth import _basic_auth_str +from .compat import cookielib, urljoin, urlparse +from .cookies import ( + RequestsCookieJar, + cookiejar_from_dict, + extract_cookies_to_jar, + merge_cookies, +) +from .exceptions import ( + ChunkedEncodingError, + ContentDecodingError, + InvalidSchema, + TooManyRedirects, +) +from .hooks import default_hooks, dispatch_hook + +# formerly defined here, reexposed here for backward compatibility +from .models import ( # noqa: F401 + DEFAULT_REDIRECT_LIMIT, + REDIRECT_STATI, + PreparedRequest, + Request, + Response, +) +from .status_codes import codes +from .structures import CaseInsensitiveDict +from .utils import ( # noqa: F401 + DEFAULT_PORTS, + default_headers, + get_auth_from_url, + get_environ_proxies, + get_netrc_auth, + requote_uri, + resolve_proxies, + rewind_body, + should_bypass_proxies, # re-export for external consumers + to_key_val_list, +) + +if TYPE_CHECKING: + from http.cookiejar import CookieJar + + from typing_extensions import Self, Unpack + + from . import _types as _t + from .adapters import BaseAdapter + +# Preferred clock, based on which one is more accurate on a given system. +if sys.platform == "win32": + preferred_clock = time.perf_counter +else: + preferred_clock = time.time + + +def merge_setting( + request_setting: Any, session_setting: Any, dict_class: type = OrderedDict +) -> Any: + """Determines appropriate setting for a given request, taking into account + the explicit setting on that request, and the setting in the session. If a + setting is a dictionary, they will be merged together using `dict_class` + """ + + if session_setting is None: + return request_setting + + if request_setting is None: + return session_setting + + # Bypass if not a dictionary (e.g. verify) + if not ( + isinstance(session_setting, Mapping) and isinstance(request_setting, Mapping) + ): + return request_setting + + merged_setting = dict_class(to_key_val_list(session_setting)) # type: ignore[arg-type] # isinstance narrows Any to Mapping[Unknown] + merged_setting.update(to_key_val_list(request_setting)) # type: ignore[arg-type] + + # Remove keys that are set to None. Extract keys first to avoid altering + # the dictionary during iteration. + none_keys = [k for (k, v) in merged_setting.items() if v is None] + for key in none_keys: + del merged_setting[key] + + return merged_setting + + +def merge_hooks( + request_hooks: _t.HooksType, + session_hooks: _t.HooksType, + dict_class: type = OrderedDict, +) -> _t.HooksType: + """Properly merges both requests and session hooks. + + This is necessary because when request_hooks == {'response': []}, the + merge breaks Session hooks entirely. + """ + if session_hooks is None or session_hooks.get("response") == []: + return request_hooks + + if request_hooks is None or request_hooks.get("response") == []: + return session_hooks + + return merge_setting(request_hooks, session_hooks, dict_class) + + +class SessionRedirectMixin: + max_redirects: int + trust_env: bool + cookies: RequestsCookieJar + + def send(self, request: PreparedRequest, **kwargs: Any) -> Response: ... + + def get_redirect_target(self, resp: Response) -> str | None: + """Receives a Response. Returns a redirect URI or ``None``""" + # Due to the nature of how requests processes redirects this method will + # be called at least once upon the original response and at least twice + # on each subsequent redirect response (if any). + # If a custom mixin is used to handle this logic, it may be advantageous + # to cache the redirect location onto the response object as a private + # attribute. + if resp.is_redirect: + location = resp.headers["location"] + # Currently the underlying http module on py3 decode headers + # in latin1, but empirical evidence suggests that latin1 is very + # rarely used with non-ASCII characters in HTTP headers. + # It is more likely to get UTF8 header rather than latin1. + # This causes incorrect handling of UTF8 encoded location headers. + # To solve this, we re-encode the location in latin1. + location = location.encode("latin1") + return to_native_string(location, "utf8") + return None + + def should_strip_auth(self, old_url: str, new_url: str) -> bool: + """Decide whether Authorization header should be removed when redirecting""" + old_parsed = urlparse(old_url) + new_parsed = urlparse(new_url) + if old_parsed.hostname != new_parsed.hostname: + return True + # Special case: allow http -> https redirect when using the standard + # ports. This isn't specified by RFC 7235, but is kept to avoid + # breaking backwards compatibility with older versions of requests + # that allowed any redirects on the same host. + if ( + old_parsed.scheme == "http" + and old_parsed.port in (80, None) + and new_parsed.scheme == "https" + and new_parsed.port in (443, None) + ): + return False + + # Handle default port usage corresponding to scheme. + changed_port = old_parsed.port != new_parsed.port + changed_scheme = old_parsed.scheme != new_parsed.scheme + default_port = (DEFAULT_PORTS.get(old_parsed.scheme, None), None) + if ( + not changed_scheme + and old_parsed.port in default_port + and new_parsed.port in default_port + ): + return False + + # Standard case: root URI must match + return changed_port or changed_scheme + + def resolve_redirects( + self, + resp: Response, + req: PreparedRequest, + stream: bool = False, + timeout: _t.TimeoutType = None, + verify: _t.VerifyType = True, + cert: _t.CertType = None, + proxies: dict[str, str] | None = None, + yield_requests: bool = False, + **adapter_kwargs: Any, + ) -> Generator[Response, None, None]: + """Receives a Response. Returns a generator of Responses or Requests.""" + + hist: list[Response] = [] # keep track of history + + url = self.get_redirect_target(resp) + previous_fragment = urlparse(req.url).fragment + while url: + prepared_request = req.copy() + + # Update history and keep track of redirects. + resp.history = hist[:] + hist.append(resp) + + try: + resp.content # Consume socket so it can be released + except (ChunkedEncodingError, ContentDecodingError, RuntimeError): + resp.raw.read(decode_content=False) + + if len(resp.history) >= self.max_redirects: + raise TooManyRedirects( + f"Exceeded {self.max_redirects} redirects.", response=resp + ) + + # Release the connection back into the pool. + resp.close() + + # Handle redirection without scheme (see: RFC 1808 Section 4) + if url.startswith("//"): + parsed_rurl = urlparse(resp.url) + url = ":".join([to_native_string(parsed_rurl.scheme), url]) + + # Normalize url case and attach previous fragment if needed (RFC 7231 7.1.2) + parsed = urlparse(url) + if parsed.fragment == "" and previous_fragment: + parsed = parsed._replace(fragment=previous_fragment) + elif parsed.fragment: + previous_fragment = parsed.fragment + url = parsed.geturl() + + # Facilitate relative 'location' headers, as allowed by RFC 7231. + # (e.g. '/path/to/resource' instead of 'http://domain.tld/path/to/resource') + # Compliant with RFC3986, we percent encode the url. + if not parsed.netloc: + url = urljoin(resp.url, requote_uri(url)) + else: + url = requote_uri(url) + + prepared_request.url = to_native_string(url) + + self.rebuild_method(prepared_request, resp) + + # https://github.com/psf/requests/issues/1084 + if resp.status_code not in ( + codes.temporary_redirect, + codes.permanent_redirect, + ): + # https://github.com/psf/requests/issues/3490 + purged_headers = ("Content-Length", "Content-Type", "Transfer-Encoding") + for header in purged_headers: + prepared_request.headers.pop(header, None) + prepared_request.body = None + + headers = prepared_request.headers + headers.pop("Cookie", None) + + # Extract any cookies sent on the response to the cookiejar + # in the new request. Because we've mutated our copied prepared + # request, use the old one that we haven't yet touched. + cookie_jar = cast("CookieJar", prepared_request._cookies) + extract_cookies_to_jar(cookie_jar, req, resp.raw) + merge_cookies(cookie_jar, self.cookies) + prepared_request.prepare_cookies(cookie_jar) + + # Rebuild auth and proxy information. + proxies = self.rebuild_proxies(prepared_request, proxies) + self.rebuild_auth(prepared_request, resp) + + # A failed tell() sets `_body_position` to `object()`. This non-None + # value ensures `rewindable` will be True, allowing us to raise an + # UnrewindableBodyError, instead of hanging the connection. + rewindable = prepared_request._body_position is not None and ( + "Content-Length" in headers or "Transfer-Encoding" in headers + ) + + # Attempt to rewind consumed file-like object. + if rewindable: + rewind_body(prepared_request) + + # Override the original request. + req = prepared_request + + if yield_requests: + yield req # type: ignore[misc] # Internal use only, returns PreparedRequest + else: + resp = self.send( + req, + stream=stream, + timeout=timeout, + verify=verify, + cert=cert, + proxies=proxies, + allow_redirects=False, + **adapter_kwargs, + ) + + extract_cookies_to_jar(self.cookies, prepared_request, resp.raw) + + # extract redirect url, if any, for the next loop + url = self.get_redirect_target(resp) + yield resp + + def rebuild_auth( + self, prepared_request: PreparedRequest, response: Response + ) -> None: + """When being redirected we may want to strip authentication from the + request to avoid leaking credentials. This method intelligently removes + and reapplies authentication where possible to avoid credential loss. + """ + original_request = response.request + assert _is_prepared(original_request) + assert _is_prepared(prepared_request) + + headers = prepared_request.headers + original_url = original_request.url + url = prepared_request.url + + if "Authorization" in headers and self.should_strip_auth(original_url, url): + # If we get redirected to a new host, we should strip out any + # authentication headers. + del headers["Authorization"] + + # .netrc might have more auth for us on our new host. + new_auth = get_netrc_auth(url) if self.trust_env else None + if new_auth is not None: + prepared_request.prepare_auth(new_auth) + + def rebuild_proxies( + self, + prepared_request: PreparedRequest, + proxies: dict[str, str] | None, + ) -> dict[str, str]: + """This method re-evaluates the proxy configuration by considering the + environment variables. If we are redirected to a URL covered by + NO_PROXY, we strip the proxy configuration. Otherwise, we set missing + proxy keys for this URL (in case they were stripped by a previous + redirect). + + This method also replaces the Proxy-Authorization header where + necessary. + + :rtype: dict + """ + assert _is_prepared(prepared_request) + headers = prepared_request.headers + scheme = urlparse(prepared_request.url).scheme + new_proxies = resolve_proxies(prepared_request, proxies, self.trust_env) + + if "Proxy-Authorization" in headers: + del headers["Proxy-Authorization"] + + try: + username, password = get_auth_from_url(new_proxies[scheme]) + except KeyError: + username, password = None, None + + # urllib3 handles proxy authorization for us in the standard adapter. + # Avoid appending this to TLS tunneled requests where it may be leaked. + if not scheme.startswith("https") and username and password: + headers["Proxy-Authorization"] = _basic_auth_str(username, password) + + return new_proxies + + def rebuild_method( + self, prepared_request: PreparedRequest, response: Response + ) -> None: + """When being redirected we may want to change the method of the request + based on certain specs or browser behavior. + """ + method = prepared_request.method + + # https://tools.ietf.org/html/rfc7231#section-6.4.4 + if response.status_code == codes.see_other and method != "HEAD": + method = "GET" + + # Do what the browsers do, despite standards... + # First, turn 302s into GETs. + if response.status_code == codes.found and method != "HEAD": + method = "GET" + + # Second, if a POST is responded to with a 301, turn it into a GET. + # This bizarre behaviour is explained in Issue 1704. + if response.status_code == codes.moved and method == "POST": + method = "GET" + + prepared_request.method = method + + +class Session(SessionRedirectMixin): + """A Requests session. + + Provides cookie persistence, connection-pooling, and configuration. + + Basic Usage:: + + >>> import requests + >>> s = requests.Session() + >>> s.get('https://httpbin.org/get') + + + Or as a context manager:: + + >>> with requests.Session() as s: + ... s.get('https://httpbin.org/get') + + """ + + headers: CaseInsensitiveDict[str] + auth: _t.AuthType + proxies: dict[str, str] + hooks: dict[str, list[_t.HookType]] + params: MutableMapping[str, Any] + stream: bool + verify: _t.VerifyType + cert: _t.CertType + max_redirects: int + trust_env: bool + cookies: RequestsCookieJar + adapters: MutableMapping[str, BaseAdapter] + + __attrs__: list[str] = [ + "headers", + "cookies", + "auth", + "proxies", + "hooks", + "params", + "verify", + "cert", + "adapters", + "stream", + "trust_env", + "max_redirects", + ] + + def __init__(self) -> None: + #: A case-insensitive dictionary of headers to be sent on each + #: :class:`Request ` sent from this + #: :class:`Session `. + self.headers = default_headers() + + #: Default Authentication tuple or object to attach to + #: :class:`Request `. + self.auth = None + + #: Dictionary mapping protocol or protocol and host to the URL of the proxy + #: (e.g. {'http': 'foo.bar:3128', 'http://host.name': 'foo.bar:4012'}) to + #: be used on each :class:`Request `. + self.proxies = {} + + #: Event-handling hooks. + self.hooks = default_hooks() + + #: Dictionary of querystring data to attach to each + #: :class:`Request `. The dictionary values may be lists for + #: representing multivalued query parameters. + self.params = {} + + #: Stream response content default. + self.stream = False + + #: SSL Verification default. + #: Defaults to `True`, requiring requests to verify the TLS certificate at the + #: remote end. + #: If verify is set to `False`, requests will accept any TLS certificate + #: presented by the server, and will ignore hostname mismatches and/or + #: expired certificates, which will make your application vulnerable to + #: man-in-the-middle (MitM) attacks. + #: Only set this to `False` for testing. + #: If verify is set to a string, it must be the path to a CA bundle file + #: that will be used to verify the TLS certificate. + self.verify = True + + #: SSL client certificate default, if String, path to ssl client + #: cert file (.pem). If Tuple, ('cert', 'key') pair. + self.cert = None + + #: Maximum number of redirects allowed. If the request exceeds this + #: limit, a :class:`TooManyRedirects` exception is raised. + #: This defaults to requests.models.DEFAULT_REDIRECT_LIMIT, which is + #: 30. + self.max_redirects = DEFAULT_REDIRECT_LIMIT + + #: Trust environment settings for proxy configuration, default + #: authentication and similar. + self.trust_env = True + + #: A CookieJar containing all currently outstanding cookies set on this + #: session. By default it is a + #: :class:`RequestsCookieJar `, but + #: may be any other ``cookielib.CookieJar`` compatible object. + self.cookies = cookiejar_from_dict({}) + + # Default connection adapters. + self.adapters = OrderedDict() + self.mount("https://", HTTPAdapter()) + self.mount("http://", HTTPAdapter()) + + def __enter__(self) -> Self: + return self + + def __exit__(self, *args: Any) -> None: + self.close() + + def prepare_request(self, request: Request) -> PreparedRequest: + """Constructs a :class:`PreparedRequest ` for + transmission and returns it. The :class:`PreparedRequest` has settings + merged from the :class:`Request ` instance and those of the + :class:`Session`. + + :param request: :class:`Request` instance to prepare with this + session's settings. + :rtype: requests.PreparedRequest + """ + url = cast("_t.UriType", request.url) + method = cast(str, request.method) + + cookies = request.cookies or {} + + # Bootstrap CookieJar. + if not isinstance(cookies, cookielib.CookieJar): + cookies = cookiejar_from_dict(cookies) + + # Merge with session cookies + merged_cookies = merge_cookies( + merge_cookies(RequestsCookieJar(), self.cookies), cookies + ) + + # Set environment's basic authentication if not explicitly set. + auth = request.auth + if self.trust_env and not auth and not self.auth: + auth = get_netrc_auth(url) + + p = PreparedRequest() + p.prepare( + method=method.upper(), + url=url, + files=request.files, + data=request.data, + json=request.json, + headers=merge_setting( + request.headers, self.headers, dict_class=CaseInsensitiveDict + ), + params=merge_setting(request.params, self.params), + auth=merge_setting(auth, self.auth), + cookies=merged_cookies, + hooks=merge_hooks(request.hooks, self.hooks), + ) + return p + + def request( + self, + method: str, + url: _t.UriType, + params: _t.ParamsType = None, + data: _t.DataType = None, + headers: _t.HeadersType = None, + cookies: RequestsCookieJar | CookieJar | dict[str, str] | None = None, + files: _t.FilesType = None, + auth: _t.AuthType = None, + timeout: _t.TimeoutType = None, + allow_redirects: bool = True, + proxies: dict[str, str] | None = None, + hooks: _t.HooksInputType | None = None, + stream: bool | None = None, + verify: _t.VerifyType | None = None, + cert: _t.CertType = None, + json: _t.JsonType = None, + ) -> Response: + """Constructs a :class:`Request `, prepares it and sends it. + Returns :class:`Response ` object. + + :param method: method for the new :class:`Request` object. + :param url: URL for the new :class:`Request` object. + :param params: (optional) Dictionary or bytes to be sent in the query + string for the :class:`Request`. + :param data: (optional) Dictionary, list of tuples, bytes, or file-like + object to send in the body of the :class:`Request`. + :param json: (optional) json to send in the body of the + :class:`Request`. + :param headers: (optional) Dictionary of HTTP Headers to send with the + :class:`Request`. + :param cookies: (optional) Dict or CookieJar object to send with the + :class:`Request`. + :param files: (optional) Dictionary of ``'filename': file-like-objects`` + for multipart encoding upload. + :param auth: (optional) Auth tuple or callable to enable + Basic/Digest/Custom HTTP Auth. + :param timeout: (optional) How many seconds to wait for the server to send + data before giving up, as a float, or a :ref:`(connect timeout, + read timeout) ` tuple. + :type timeout: float or tuple + :param allow_redirects: (optional) Set to True by default. + :type allow_redirects: bool + :param proxies: (optional) Dictionary mapping protocol or protocol and + hostname to the URL of the proxy. + :param hooks: (optional) Dictionary mapping hook name to one event or + list of events, event must be callable. + :param stream: (optional) whether to immediately download the response + content. Defaults to ``False``. + :param verify: (optional) Either a boolean, in which case it controls whether we verify + the server's TLS certificate, or a string, in which case it must be a path + to a CA bundle to use. Defaults to ``True``. When set to + ``False``, requests will accept any TLS certificate presented by + the server, and will ignore hostname mismatches and/or expired + certificates, which will make your application vulnerable to + man-in-the-middle (MitM) attacks. Setting verify to ``False`` + may be useful during local development or testing. + :param cert: (optional) if String, path to ssl client cert file (.pem). + If Tuple, ('cert', 'key') pair. + :rtype: requests.Response + """ + if isinstance(url, bytes): + url = url.decode("utf-8") + + # Create the Request. + req = Request( + method=method.upper(), + url=url, + headers=headers, + files=files, + data=data or {}, + json=json, + params=params or {}, + auth=auth, + cookies=cookies, + hooks=hooks, + ) + prep = self.prepare_request(req) + + assert _is_prepared(prep) + + proxies = proxies or {} + + settings = self.merge_environment_settings( + prep.url, proxies, stream, verify, cert + ) + + # Send the request. + send_kwargs = { + "timeout": timeout, + "allow_redirects": allow_redirects, + } + send_kwargs.update(settings) + resp = self.send(prep, **send_kwargs) + + return resp + + def get( + self, + url: _t.UriType, + params: _t.ParamsType = None, + **kwargs: Unpack[_t.GetKwargs], + ) -> Response: + r"""Sends a GET request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param params: (optional) Dictionary, list of tuples or bytes to send + in the query string for the :class:`Request`. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :rtype: requests.Response + """ + + kwargs.setdefault("allow_redirects", True) + return self.request("GET", url, params=params, **kwargs) + + def options(self, url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response: + r"""Sends a OPTIONS request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :rtype: requests.Response + """ + + kwargs.setdefault("allow_redirects", True) + return self.request("OPTIONS", url, **kwargs) + + def head(self, url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response: + r"""Sends a HEAD request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :rtype: requests.Response + """ + + kwargs.setdefault("allow_redirects", False) + return self.request("HEAD", url, **kwargs) + + def post( + self, + url: _t.UriType, + data: _t.DataType = None, + json: _t.JsonType = None, + **kwargs: Unpack[_t.PostKwargs], + ) -> Response: + r"""Sends a POST request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, list of tuples, bytes, or file-like + object to send in the body of the :class:`Request`. + :param json: (optional) json to send in the body of the :class:`Request`. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :rtype: requests.Response + """ + + return self.request("POST", url, data=data, json=json, **kwargs) + + def put( + self, url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs] + ) -> Response: + r"""Sends a PUT request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, list of tuples, bytes, or file-like + object to send in the body of the :class:`Request`. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :rtype: requests.Response + """ + + return self.request("PUT", url, data=data, **kwargs) + + def patch( + self, url: _t.UriType, data: _t.DataType = None, **kwargs: Unpack[_t.DataKwargs] + ) -> Response: + r"""Sends a PATCH request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param data: (optional) Dictionary, list of tuples, bytes, or file-like + object to send in the body of the :class:`Request`. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :rtype: requests.Response + """ + + return self.request("PATCH", url, data=data, **kwargs) + + def delete(self, url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) -> Response: + r"""Sends a DELETE request. Returns :class:`Response` object. + + :param url: URL for the new :class:`Request` object. + :param \*\*kwargs: Optional arguments that ``request`` takes. + :rtype: requests.Response + """ + + return self.request("DELETE", url, **kwargs) + + def send(self, request: PreparedRequest, **kwargs: Any) -> Response: + """Send a given PreparedRequest. + + :rtype: requests.Response + """ + # Set defaults that the hooks can utilize to ensure they always have + # the correct parameters to reproduce the previous request. + kwargs.setdefault("stream", self.stream) + kwargs.setdefault("verify", self.verify) + kwargs.setdefault("cert", self.cert) + if "proxies" not in kwargs: + kwargs["proxies"] = resolve_proxies(request, self.proxies, self.trust_env) + + # It's possible that users might accidentally send a Request object. + # Guard against that specific failure case. + if isinstance(request, Request): + raise ValueError("You can only send PreparedRequests.") + + assert _is_prepared(request) + + # Set up variables needed for resolve_redirects and dispatching of hooks + allow_redirects = kwargs.pop("allow_redirects", True) + stream = kwargs.get("stream") + hooks = request.hooks + + # Get the appropriate adapter to use + adapter = self.get_adapter(url=request.url) + + # Start time (approximately) of the request + start = preferred_clock() + + # Send the request + r = adapter.send(request, **kwargs) + + # Total elapsed time of the request (approximately) + elapsed = preferred_clock() - start + r.elapsed = timedelta(seconds=elapsed) + + # Response manipulation hooks + r = dispatch_hook("response", hooks, r, **kwargs) + + # Persist cookies + if r.history: + # If the hooks create history then we want those cookies too + for resp in r.history: + extract_cookies_to_jar(self.cookies, resp.request, resp.raw) + + extract_cookies_to_jar(self.cookies, request, r.raw) + + # Resolve redirects if allowed. + if allow_redirects: + # Redirect resolving generator. + gen = self.resolve_redirects(r, request, **kwargs) + history = [resp for resp in gen] + else: + history = [] + + # Shuffle things around if there's history. + if history: + # Insert the first (original) request at the start + history.insert(0, r) + # Get the last request made + r = history.pop() + r.history = history + + # If redirects aren't being followed, store the response on the Request for Response.next(). + if not allow_redirects: + try: + r._next = next( # type: ignore[assignment] # yield_requests=True returns PreparedRequest + self.resolve_redirects(r, request, yield_requests=True, **kwargs) + ) + except StopIteration: + pass + + if not stream: + r.content + + return r + + def merge_environment_settings( + self, + url: str, + proxies: dict[str, str] | None, + stream: bool | None, + verify: _t.VerifyType | None, + cert: _t.CertType, + ) -> dict[str, Any]: + """ + Check the environment and merge it with some settings. + + :rtype: dict + """ + # Gather clues from the surrounding environment. + if self.trust_env: + # Set environment's proxies. + no_proxy = proxies.get("no_proxy") if proxies is not None else None + env_proxies = get_environ_proxies(url, no_proxy=no_proxy) + if proxies is not None: + for k, v in env_proxies.items(): + proxies.setdefault(k, v) + + # Look for requests environment configuration + # and be compatible with cURL. + if verify is True or verify is None: + verify = ( + os.environ.get("REQUESTS_CA_BUNDLE") + or os.environ.get("CURL_CA_BUNDLE") + or verify + ) + + # Merge all the kwargs. + proxies = merge_setting(proxies, self.proxies) + stream = merge_setting(stream, self.stream) + verify = merge_setting(verify, self.verify) + cert = merge_setting(cert, self.cert) + + return {"proxies": proxies, "stream": stream, "verify": verify, "cert": cert} + + def get_adapter(self, url: str) -> BaseAdapter: + """ + Returns the appropriate connection adapter for the given URL. + + :rtype: requests.adapters.BaseAdapter + """ + for prefix, adapter in self.adapters.items(): + if url.lower().startswith(prefix.lower()): + return adapter + + # Nothing matches :-/ + raise InvalidSchema(f"No connection adapters were found for {url!r}") + + def close(self) -> None: + """Closes all adapters and as such the session""" + for v in self.adapters.values(): + v.close() + + def mount(self, prefix: str, adapter: BaseAdapter) -> None: + """Registers a connection adapter to a prefix. + + Adapters are sorted in descending order by prefix length. + """ + self.adapters[prefix] = adapter + keys_to_move = [k for k in self.adapters if len(k) < len(prefix)] + + for key in keys_to_move: + self.adapters[key] = self.adapters.pop(key) + + def __getstate__(self) -> dict[str, Any]: + state = {attr: getattr(self, attr, None) for attr in self.__attrs__} + return state + + def __setstate__(self, state: dict[str, Any]) -> None: + for attr, value in state.items(): + setattr(self, attr, value) + + +def session() -> Session: + """ + Returns a :class:`Session` for context-management. + + .. deprecated:: 1.0.0 + + This method has been deprecated since version 1.0.0 and is only kept for + backwards compatibility. New code should use :class:`~requests.sessions.Session` + to create a session. This may be removed at a future date. + + :rtype: Session + """ + return Session() diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/status_codes.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/status_codes.py new file mode 100644 index 0000000000000000000000000000000000000000..6c59d6baec83bd82055106a5d2cea08fa1195274 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/status_codes.py @@ -0,0 +1,128 @@ +r""" +The ``codes`` object defines a mapping from common names for HTTP statuses +to their numerical codes, accessible either as attributes or as dictionary +items. + +Example:: + + >>> import requests + >>> requests.codes['temporary_redirect'] + 307 + >>> requests.codes.teapot + 418 + >>> requests.codes['\o/'] + 200 + +Some codes have multiple names, and both upper- and lower-case versions of +the names are allowed. For example, ``codes.ok``, ``codes.OK``, and +``codes.okay`` all correspond to the HTTP status code 200. +""" + +from .structures import LookupDict + +_codes = { + # Informational. + 100: ("continue",), + 101: ("switching_protocols",), + 102: ("processing", "early-hints"), + 103: ("checkpoint",), + 122: ("uri_too_long", "request_uri_too_long"), + 200: ("ok", "okay", "all_ok", "all_okay", "all_good", "\\o/", "✓"), + 201: ("created",), + 202: ("accepted",), + 203: ("non_authoritative_info", "non_authoritative_information"), + 204: ("no_content",), + 205: ("reset_content", "reset"), + 206: ("partial_content", "partial"), + 207: ("multi_status", "multiple_status", "multi_stati", "multiple_stati"), + 208: ("already_reported",), + 226: ("im_used",), + # Redirection. + 300: ("multiple_choices",), + 301: ("moved_permanently", "moved", "\\o-"), + 302: ("found",), + 303: ("see_other", "other"), + 304: ("not_modified",), + 305: ("use_proxy",), + 306: ("switch_proxy",), + 307: ("temporary_redirect", "temporary_moved", "temporary"), + 308: ( + "permanent_redirect", + "resume_incomplete", + "resume", + ), # "resume" and "resume_incomplete" to be removed in 3.0 + # Client Error. + 400: ("bad_request", "bad"), + 401: ("unauthorized",), + 402: ("payment_required", "payment"), + 403: ("forbidden",), + 404: ("not_found", "-o-"), + 405: ("method_not_allowed", "not_allowed"), + 406: ("not_acceptable",), + 407: ("proxy_authentication_required", "proxy_auth", "proxy_authentication"), + 408: ("request_timeout", "timeout"), + 409: ("conflict",), + 410: ("gone",), + 411: ("length_required",), + 412: ("precondition_failed", "precondition"), + 413: ("request_entity_too_large", "content_too_large"), + 414: ("request_uri_too_large", "uri_too_long"), + 415: ("unsupported_media_type", "unsupported_media", "media_type"), + 416: ( + "requested_range_not_satisfiable", + "requested_range", + "range_not_satisfiable", + ), + 417: ("expectation_failed",), + 418: ("im_a_teapot", "teapot", "i_am_a_teapot"), + 421: ("misdirected_request",), + 422: ("unprocessable_entity", "unprocessable", "unprocessable_content"), + 423: ("locked",), + 424: ("failed_dependency", "dependency"), + 425: ("unordered_collection", "unordered", "too_early"), + 426: ("upgrade_required", "upgrade"), + 428: ("precondition_required", "precondition"), + 429: ("too_many_requests", "too_many"), + 431: ("header_fields_too_large", "fields_too_large"), + 444: ("no_response", "none"), + 449: ("retry_with", "retry"), + 450: ("blocked_by_windows_parental_controls", "parental_controls"), + 451: ("unavailable_for_legal_reasons", "legal_reasons"), + 499: ("client_closed_request",), + # Server Error. + 500: ("internal_server_error", "server_error", "/o\\", "✗"), + 501: ("not_implemented",), + 502: ("bad_gateway",), + 503: ("service_unavailable", "unavailable"), + 504: ("gateway_timeout",), + 505: ("http_version_not_supported", "http_version"), + 506: ("variant_also_negotiates",), + 507: ("insufficient_storage",), + 509: ("bandwidth_limit_exceeded", "bandwidth"), + 510: ("not_extended",), + 511: ("network_authentication_required", "network_auth", "network_authentication"), +} + +codes: LookupDict[int] = LookupDict(name="status_codes") + + +def _init(): + for code, titles in _codes.items(): + for title in titles: + setattr(codes, title, code) + if not title.startswith(("\\", "/")): + setattr(codes, title.upper(), code) + + def doc(code: int) -> str: + names = ", ".join(f"``{n}``" for n in _codes[code]) + return "* %d: %s" % (code, names) + + global __doc__ + __doc__ = ( + __doc__ + "\n" + "\n".join(doc(code) for code in sorted(_codes)) + if __doc__ is not None + else None + ) + + +_init() diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/structures.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/structures.py new file mode 100644 index 0000000000000000000000000000000000000000..7675eaf15a181dada66c02bb0468dc00d6f523b3 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/structures.py @@ -0,0 +1,130 @@ +""" +requests.structures +~~~~~~~~~~~~~~~~~~~ + +Data structures that power Requests. +""" + +from __future__ import annotations + +from collections import OrderedDict +from collections.abc import Iterable, Iterator, Mapping +from typing import Any, Generic, TypeVar, overload + +from .compat import MutableMapping + +_VT = TypeVar("_VT") +_D = TypeVar("_D") + + +class CaseInsensitiveDict(MutableMapping[str, _VT], Generic[_VT]): + """A case-insensitive ``dict``-like object. + + Implements all methods and operations of + ``MutableMapping`` as well as dict's ``copy``. Also + provides ``lower_items``. + + All keys are expected to be strings. The structure remembers the + case of the last key to be set, and ``iter(instance)``, + ``keys()``, ``items()``, ``iterkeys()``, and ``iteritems()`` + will contain case-sensitive keys. However, querying and contains + testing is case insensitive:: + + cid = CaseInsensitiveDict() + cid['Accept'] = 'application/json' + cid['aCCEPT'] == 'application/json' # True + list(cid) == ['Accept'] # True + + For example, ``headers['content-encoding']`` will return the + value of a ``'Content-Encoding'`` response header, regardless + of how the header name was originally stored. + + If the constructor, ``.update``, or equality comparison + operations are given keys that have equal ``.lower()``s, the + behavior is undefined. + """ + + _store: OrderedDict[str, tuple[str, _VT]] + + def __init__( + self, + data: Mapping[str, _VT] | Iterable[tuple[str, _VT]] | None = None, + **kwargs: _VT, + ) -> None: + self._store = OrderedDict() + if data is None: + data = {} + self.update(data, **kwargs) + + def __setitem__(self, key: str, value: _VT) -> None: + # Use the lowercased key for lookups, but store the actual + # key alongside the value. + self._store[key.lower()] = (key, value) + + def __getitem__(self, key: str) -> _VT: + return self._store[key.lower()][1] + + def __delitem__(self, key: str) -> None: + del self._store[key.lower()] + + def __iter__(self) -> Iterator[str]: + return (casedkey for casedkey, _ in self._store.values()) + + def __len__(self) -> int: + return len(self._store) + + def lower_items(self) -> Iterator[tuple[str, _VT]]: + """Like iteritems(), but with all lowercase keys.""" + return ((lowerkey, keyval[1]) for (lowerkey, keyval) in self._store.items()) + + def __eq__(self, other: object) -> bool: + if isinstance(other, Mapping): + other_dict: CaseInsensitiveDict[Any] = CaseInsensitiveDict(other) # type: ignore[reportUnknownArgumentType] + else: + return NotImplemented + # Compare insensitively + return dict(self.lower_items()) == dict(other_dict.lower_items()) + + # Copy is required + def copy(self) -> CaseInsensitiveDict[_VT]: + return CaseInsensitiveDict(self._store.values()) + + def __repr__(self) -> str: + return str(dict(self.items())) + + +class LookupDict(dict[str, _VT]): + """Dictionary lookup object.""" + + name: Any + + def __init__(self, name: Any = None) -> None: + self.name = name + super().__init__() + + def __repr__(self) -> str: + return f"" + + def __getattr__(self, key: str) -> _VT | None: + # We need this for type checkers to infer typing + # on attribute access with status_codes.py + if key in self.__dict__: + return self.__dict__[key] + else: + raise AttributeError( + f"'{type(self).__name__}' object has no attribute '{key}'" + ) + + def __getitem__(self, key: str) -> _VT | None: # type: ignore[override] + # We allow fall-through here, so values default to None + + return self.__dict__.get(key, None) + + @overload + def get(self, key: str, default: None = None) -> _VT | None: ... + + @overload + def get(self, key: str, default: _D | _VT) -> _D | _VT: ... + + def get(self, key: str, default: _D | None = None) -> _VT | _D | None: + return self.__dict__.get(key, default) diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/utils.py b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..fff6edf4bee7cdac3e26e41c5888d1bcebcae0db --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/src/requests/utils.py @@ -0,0 +1,1155 @@ +""" +requests.utils +~~~~~~~~~~~~~~ + +This module provides utility functions that are used within Requests +that are also useful for external consumption. +""" + +from __future__ import annotations + +import codecs +import contextlib +import io +import os +import re +import socket +import struct +import sys +import tempfile +import warnings +import zipfile +from collections import OrderedDict +from collections.abc import Generator, Iterable +from typing import ( + TYPE_CHECKING, + Any, + Final, + TypeVar, + cast, + overload, +) + +from urllib3.util import make_headers, parse_url + +from . import certs +from .__version__ import __version__ + +# to_native_string is unused here, but imported here for backwards compatibility +from ._internal_utils import ( # noqa: F401 + _HEADER_VALIDATORS_BYTE, + _HEADER_VALIDATORS_STR, + HEADER_VALIDATORS, + to_native_string, +) +from ._types import SupportsItems as _SupportsItems +from .compat import ( + Mapping, + bytes, + getproxies, + getproxies_environment, + integer_types, + is_urllib3_1, + proxy_bypass, + proxy_bypass_environment, # type: ignore[attr-defined] # https://github.com/python/cpython/issues/145331 + quote, + str, + unquote, + urlparse, + urlunparse, +) +from .compat import parse_http_list as _parse_list_header +from .cookies import cookiejar_from_dict +from .exceptions import ( + FileModeWarning, + InvalidHeader, + InvalidURL, + UnrewindableBodyError, +) +from .structures import CaseInsensitiveDict + +if TYPE_CHECKING: + from http.cookiejar import CookieJar + from io import BufferedWriter + + from . import _types as _t + from .models import PreparedRequest, Request, Response + +NETRC_FILES: Final = (".netrc", "_netrc") + + +# Certificate is extracted by certifi when needed. +DEFAULT_CA_BUNDLE_PATH: str = certs.where() + + +DEFAULT_PORTS: Final = {"http": 80, "https": 443} + +_KT = TypeVar("_KT") +_VT = TypeVar("_VT") + +# Ensure that ', ' is used to preserve previous delimiter behavior. +DEFAULT_ACCEPT_ENCODING: Final = ", ".join( + re.split(r",\s*", make_headers(accept_encoding=True)["accept-encoding"]) +) + + +if sys.platform == "win32": + # provide a proxy_bypass version on Windows without DNS lookups + + def proxy_bypass_registry(host: str) -> bool: + try: + import winreg + except ImportError: + return False + + try: + internetSettings = winreg.OpenKey( + winreg.HKEY_CURRENT_USER, + r"Software\Microsoft\Windows\CurrentVersion\Internet Settings", + ) + # ProxyEnable could be REG_SZ or REG_DWORD, normalizing it + proxyEnable = int(winreg.QueryValueEx(internetSettings, "ProxyEnable")[0]) + # ProxyOverride is almost always a string + proxyOverride = winreg.QueryValueEx(internetSettings, "ProxyOverride")[0] + except (OSError, ValueError): + return False + if not proxyEnable or not proxyOverride: + return False + + # make a check value list from the registry entry: replace the + # '' string by the localhost entry and the corresponding + # canonical entry. + proxyOverride = proxyOverride.split(";") + # filter out empty strings to avoid re.match return true in the following code. + proxyOverride = filter(None, proxyOverride) + # now check if we match one of the registry values. + for test in proxyOverride: + if test == "": + if "." not in host: + return True + test = test.replace(".", r"\.") # mask dots + test = test.replace("*", r".*") # change glob sequence + test = test.replace("?", r".") # change glob char + if re.match(test, host, re.I): + return True + return False + + def proxy_bypass(host: str) -> bool: # noqa + """Return True, if the host should be bypassed. + + Checks proxy settings gathered from the environment, if specified, + or the registry. + """ + if getproxies_environment(): + return proxy_bypass_environment(host) + else: + return proxy_bypass_registry(host) + + +def dict_to_sequence( + d: _t.SupportsItems[Any, Any] | Iterable[tuple[Any, Any]], +) -> Iterable[tuple[Any, Any]]: + """Returns an internal sequence dictionary update.""" + + if isinstance(d, _SupportsItems): + return d.items() + + return d + + +def super_len(o: Any) -> int: + total_length = None + current_position = 0 + + if not is_urllib3_1 and isinstance(o, str): + # urllib3 2.x+ treats all strings as utf-8 instead + # of latin-1 (iso-8859-1) like http.client. + o = o.encode("utf-8") + + if hasattr(o, "__len__"): + total_length = len(o) + + elif hasattr(o, "len"): + total_length = o.len + + elif hasattr(o, "fileno"): + try: + fileno = o.fileno() + except (io.UnsupportedOperation, AttributeError): + # AttributeError is a surprising exception, seeing as how we've just checked + # that `hasattr(o, 'fileno')`. It happens for objects obtained via + # `Tarfile.extractfile()`, per issue 5229. + pass + else: + total_length = os.fstat(fileno).st_size + + # Having used fstat to determine the file length, we need to + # confirm that this file was opened up in binary mode. + if "b" not in o.mode: + warnings.warn( + ( + "Requests has determined the content-length for this " + "request using the binary size of the file: however, the " + "file has been opened in text mode (i.e. without the 'b' " + "flag in the mode). This may lead to an incorrect " + "content-length. In Requests 3.0, support will be removed " + "for files in text mode." + ), + FileModeWarning, + ) + + if hasattr(o, "tell"): + try: + current_position = o.tell() + except OSError: + # This can happen in some weird situations, such as when the file + # is actually a special file descriptor like stdin. In this + # instance, we don't know what the length is, so set it to zero and + # let requests chunk it instead. + if total_length is not None: + current_position = total_length + else: + if hasattr(o, "seek") and total_length is None: + # StringIO and BytesIO have seek but no usable fileno + try: + # seek to end of file + o.seek(0, 2) + total_length = o.tell() + + # seek back to current position to support + # partially read file-like objects + o.seek(current_position or 0) + except OSError: + total_length = 0 + + if total_length is None: + total_length = 0 + + return max(0, total_length - current_position) + + +def get_netrc_auth( + url: _t.UriType, raise_errors: bool = False +) -> tuple[str, str] | None: + """Returns the Requests tuple auth for a given url from netrc.""" + + if isinstance(url, bytes): + url = url.decode("utf-8") + + netrc_file = os.environ.get("NETRC") + if netrc_file is not None: + netrc_locations = (netrc_file,) + else: + netrc_locations = (f"~/{f}" for f in NETRC_FILES) + + try: + from netrc import NetrcParseError, netrc + + netrc_path = None + + for f in netrc_locations: + loc = os.path.expanduser(f) + if os.path.exists(loc): + netrc_path = loc + break + + # Abort early if there isn't one. + if netrc_path is None: + return + + ri = urlparse(url) + host = ri.hostname + + if host is None: + return + + try: + _netrc = netrc(netrc_path).authenticators(host) + if _netrc and any(_netrc): + # Return with login / password + login_i = 0 if _netrc[0] else 1 + return (_netrc[login_i] or "", _netrc[2] or "") + except (NetrcParseError, OSError): + # If there was a parsing error or a permissions issue reading the file, + # we'll just skip netrc auth unless explicitly asked to raise errors. + if raise_errors: + raise + + # App Engine hackiness. + except (ImportError, AttributeError): + pass + + +def guess_filename(obj: Any) -> str | None: + """Tries to guess the filename of the given object.""" + name = getattr(obj, "name", None) + if name and isinstance(name, (str, bytes)) and name[0] != "<" and name[-1] != ">": + return os.path.basename(name) # type: ignore[return-value] # urllib3 accepts bytes but types str only + + +def extract_zipped_paths(path: str) -> str: + """Replace nonexistent paths that look like they refer to a member of a zip + archive with the location of an extracted copy of the target, or else + just return the provided path unchanged. + """ + if os.path.exists(path): + # this is already a valid path, no need to do anything further + return path + + # find the first valid part of the provided path and treat that as a zip archive + # assume the rest of the path is the name of a member in the archive + archive, member = os.path.split(path) + while archive and not os.path.exists(archive): + archive, prefix = os.path.split(archive) + if not prefix: + # If we don't check for an empty prefix after the split (in other words, archive remains unchanged after the split), + # we _can_ end up in an infinite loop on a rare corner case affecting a small number of users + break + member = "/".join([prefix, member]) + + if not zipfile.is_zipfile(archive): + return path + + zip_file = zipfile.ZipFile(archive) + if member not in zip_file.namelist(): + return path + + # we have a valid zip archive and a valid member of that archive + suffix = os.path.splitext(member.split("/")[-1])[-1] + fd, extracted_path = tempfile.mkstemp(suffix=suffix) + try: + os.write(fd, zip_file.read(member)) + finally: + os.close(fd) + + return extracted_path + + +@contextlib.contextmanager +def atomic_open(filename: str) -> Generator[BufferedWriter, None, None]: + """Write a file to the disk in an atomic fashion""" + tmp_descriptor, tmp_name = tempfile.mkstemp(dir=os.path.dirname(filename)) + try: + with os.fdopen(tmp_descriptor, "wb") as tmp_handler: + yield tmp_handler + os.replace(tmp_name, filename) + except BaseException: + os.remove(tmp_name) + raise + + +def from_key_val_list( + value: Mapping[Any, Any] | Iterable[tuple[Any, Any]] | None, +) -> dict[Any, Any] | None: + """Take an object and test to see if it can be represented as a + dictionary. Unless it can not be represented as such, return an + OrderedDict, e.g., + + :: + + >>> from_key_val_list([('key', 'val')]) + OrderedDict([('key', 'val')]) + >>> from_key_val_list('string') + Traceback (most recent call last): + ... + ValueError: cannot encode objects that are not 2-tuples + >>> from_key_val_list({'key': 'val'}) + OrderedDict([('key', 'val')]) + + :rtype: OrderedDict + """ + if value is None: + return None + + if isinstance(value, (str, bytes, bool, int)): + raise ValueError("cannot encode objects that are not 2-tuples") + + return OrderedDict(value) + + +@overload +def to_key_val_list(value: None) -> None: ... +@overload +def to_key_val_list( + value: _t.SupportsItems[_KT, _VT] | Iterable[tuple[_KT, _VT]], +) -> list[tuple[_KT, _VT]]: ... +def to_key_val_list( + value: _t.SupportsItems[_KT, _VT] | Iterable[tuple[_KT, _VT]] | None, +) -> list[tuple[_KT, _VT]] | None: + """Take an object and test to see if it can be represented as a + dictionary. If it can be, return a list of tuples, e.g., + + :: + + >>> to_key_val_list([('key', 'val')]) + [('key', 'val')] + >>> to_key_val_list({'key': 'val'}) + [('key', 'val')] + >>> to_key_val_list('string') + Traceback (most recent call last): + ... + ValueError: cannot encode objects that are not 2-tuples + + :rtype: list + """ + if value is None: + return None + + if isinstance(value, (str, bytes, bool, int)): + raise ValueError("cannot encode objects that are not 2-tuples") + + if isinstance(value, _SupportsItems): + return list(value.items()) + + return list(value) + + +# From mitsuhiko/werkzeug (used with permission). +def parse_list_header(value: str) -> list[str]: + """Parse lists as described by RFC 2068 Section 2. + + In particular, parse comma-separated lists where the elements of + the list may include quoted-strings. A quoted-string could + contain a comma. A non-quoted string could have quotes in the + middle. Quotes are removed automatically after parsing. + + It basically works like :func:`parse_set_header` just that items + may appear multiple times and case sensitivity is preserved. + + The return value is a standard :class:`list`: + + >>> parse_list_header('token, "quoted value"') + ['token', 'quoted value'] + + To create a header from the :class:`list` again, use the + :func:`dump_header` function. + + :param value: a string with a list header. + :return: :class:`list` + :rtype: list + """ + result: list[str] = [] + for item in _parse_list_header(value): + if item[:1] == item[-1:] == '"': + item = unquote_header_value(item[1:-1]) + result.append(item) + return result + + +# From mitsuhiko/werkzeug (used with permission). +def parse_dict_header(value: str) -> dict[str, str | None]: + """Parse lists of key, value pairs as described by RFC 2068 Section 2 and + convert them into a python dict: + + >>> d = parse_dict_header('foo="is a fish", bar="as well"') + >>> type(d) is dict + True + >>> sorted(d.items()) + [('bar', 'as well'), ('foo', 'is a fish')] + + If there is no value for a key it will be `None`: + + >>> parse_dict_header('key_without_value') + {'key_without_value': None} + + To create a header from the :class:`dict` again, use the + :func:`dump_header` function. + + :param value: a string with a dict header. + :return: :class:`dict` + :rtype: dict + """ + result: dict[str, str | None] = {} + for item in _parse_list_header(value): + if "=" not in item: + result[item] = None + continue + name, value = item.split("=", 1) + if value[:1] == value[-1:] == '"': + value = unquote_header_value(value[1:-1]) + result[name] = value + return result + + +# From mitsuhiko/werkzeug (used with permission). +def unquote_header_value(value: str, is_filename: bool = False) -> str: + r"""Unquotes a header value. (Reversal of :func:`quote_header_value`). + This does not use the real unquoting but what browsers are actually + using for quoting. + + :param value: the header value to unquote. + :rtype: str + """ + if value and value[0] == value[-1] == '"': + # this is not the real unquoting, but fixing this so that the + # RFC is met will result in bugs with internet explorer and + # probably some other browsers as well. IE for example is + # uploading files with "C:\foo\bar.txt" as filename + value = value[1:-1] + + # if this is a filename and the starting characters look like + # a UNC path, then just return the value without quotes. Using the + # replace sequence below on a UNC path has the effect of turning + # the leading double slash into a single slash and then + # _fix_ie_filename() doesn't work correctly. See #458. + if not is_filename or value[:2] != "\\\\": + return value.replace("\\\\", "\\").replace('\\"', '"') + return value + + +def dict_from_cookiejar(cj: CookieJar) -> dict[str, str | None]: + """Returns a key/value dictionary from a CookieJar. + + :param cj: CookieJar object to extract cookies from. + :rtype: dict + """ + + cookie_dict = {cookie.name: cookie.value for cookie in cj} + return cookie_dict + + +def add_dict_to_cookiejar(cj: CookieJar, cookie_dict: dict[str, str]) -> CookieJar: + """Returns a CookieJar from a key/value dictionary. + + :param cj: CookieJar to insert cookies into. + :param cookie_dict: Dict of key/values to insert into CookieJar. + :rtype: CookieJar + """ + + return cookiejar_from_dict(cookie_dict, cj) + + +def get_encodings_from_content(content: str) -> list[str]: + """Returns encodings from given content string. + + :param content: bytestring to extract encodings from. + """ + warnings.warn( + ( + "In requests 3.0, get_encodings_from_content will be removed. For " + "more information, please see the discussion on issue #2266. (This" + " warning should only appear once.)" + ), + DeprecationWarning, + ) + + charset_re = re.compile(r']', flags=re.I) + pragma_re = re.compile(r']', flags=re.I) + xml_re = re.compile(r'^<\?xml.*?encoding=["\']*(.+?)["\'>]') + + return ( + charset_re.findall(content) + + pragma_re.findall(content) + + xml_re.findall(content) + ) + + +def _parse_content_type_header(header: str) -> tuple[str, dict[str, Any]]: + """Returns content type and parameters from given header. + + :param header: string + :return: tuple containing content type and dictionary of + parameters. + """ + + tokens = header.split(";") + content_type, params = tokens[0].strip(), tokens[1:] + params_dict: dict[str, str | bool] = {} + strip_chars = "\"' " + + for param in params: + param = param.strip() + if param and (idx := param.find("=")) != -1: + key = param[:idx].strip(strip_chars) + value = param[idx + 1 :].strip(strip_chars) + params_dict[key.lower()] = value + return content_type, params_dict + + +def get_encoding_from_headers(headers: CaseInsensitiveDict[str]) -> str | None: + """Returns encodings from given HTTP Header Dict. + + :param headers: dictionary to extract encoding from. + :rtype: str + """ + + content_type = headers.get("content-type") + + if not content_type: + return None + + content_type, params = _parse_content_type_header(content_type) + + if "charset" in params: + return params["charset"].strip("'\"") + + if "text" in content_type: + return "ISO-8859-1" + + if "application/json" in content_type: + # Assume UTF-8 based on RFC 4627: https://www.ietf.org/rfc/rfc4627.txt since the charset was unset + return "utf-8" + + +def stream_decode_response_unicode( + iterator: Iterable[bytes], r: Response +) -> Generator[str | bytes, None, None]: + """Stream decodes an iterator.""" + + if r.encoding is None: + yield from iterator + return + + decoder = codecs.getincrementaldecoder(r.encoding)(errors="replace") + for chunk in iterator: + rv = decoder.decode(chunk) + if rv: + yield rv + rv = decoder.decode(b"", final=True) + if rv: + yield rv + + +@overload +def iter_slices( + string: bytes, slice_length: int | None +) -> Generator[bytes, None, None]: ... +@overload +def iter_slices( + string: str, slice_length: int | None +) -> Generator[str, None, None]: ... +def iter_slices( + string: bytes | str, slice_length: int | None +) -> Generator[bytes | str, None, None]: + """Iterate over slices of a string.""" + pos = 0 + if slice_length is None or slice_length <= 0: + slice_length = len(string) + while pos < len(string): + yield string[pos : pos + slice_length] + pos += slice_length + + +def get_unicode_from_response(r: Response) -> str | bytes | None: + """Returns the requested content back in unicode. + + :param r: Response object to get unicode content from. + + Tried: + + 1. charset from content-type + 2. fall back and replace all unicode characters + + :rtype: str + """ + warnings.warn( + ( + "In requests 3.0, get_unicode_from_response will be removed. For " + "more information, please see the discussion on issue #2266. (This" + " warning should only appear once.)" + ), + DeprecationWarning, + ) + if r.content is None: # type: ignore[reportUnnecessaryComparison] + return None + + tried_encodings: list[str] = [] + + # Try charset from content-type + encoding = get_encoding_from_headers(r.headers) + + if encoding: + try: + return str(r.content, encoding) + except UnicodeError: + tried_encodings.append(encoding) + + # Fall back: + try: + return str(r.content, encoding or "utf-8", errors="replace") + except TypeError: + return r.content + + +# The unreserved URI characters (RFC 3986) +UNRESERVED_SET: Final = frozenset( + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" + "0123456789-._~" +) + + +def unquote_unreserved(uri: str) -> str: + """Un-escape any percent-escape sequences in a URI that are unreserved + characters. This leaves all reserved, illegal and non-ASCII bytes encoded. + + :rtype: str + """ + parts = uri.split("%") + for i in range(1, len(parts)): + h = parts[i][0:2] + if len(h) == 2 and h.isalnum(): + try: + c = chr(int(h, 16)) + except ValueError: + raise InvalidURL(f"Invalid percent-escape sequence: '{h}'") + + if c in UNRESERVED_SET: + parts[i] = c + parts[i][2:] + else: + parts[i] = f"%{parts[i]}" + else: + parts[i] = f"%{parts[i]}" + return "".join(parts) + + +def requote_uri(uri: str) -> str: + """Re-quote the given URI. + + This function passes the given URI through an unquote/quote cycle to + ensure that it is fully and consistently quoted. + + :rtype: str + """ + safe_with_percent = "!#$%&'()*+,/:;=?@[]~" + safe_without_percent = "!#$&'()*+,/:;=?@[]~" + try: + # Unquote only the unreserved characters + # Then quote only illegal characters (do not quote reserved, + # unreserved, or '%') + return quote(unquote_unreserved(uri), safe=safe_with_percent) + except InvalidURL: + # We couldn't unquote the given URI, so let's try quoting it, but + # there may be unquoted '%'s in the URI. We need to make sure they're + # properly quoted so they do not cause issues elsewhere. + return quote(uri, safe=safe_without_percent) + + +def address_in_network(ip: str, net: str) -> bool: + """This function allows you to check if an IP belongs to a network subnet + + Example: returns True if ip = 192.168.1.1 and net = 192.168.1.0/24 + returns False if ip = 192.168.1.1 and net = 192.168.100.0/24 + + :rtype: bool + """ + ipaddr = struct.unpack("=L", socket.inet_aton(ip))[0] + netaddr, bits = net.split("/") + netmask = struct.unpack("=L", socket.inet_aton(dotted_netmask(int(bits))))[0] + network = struct.unpack("=L", socket.inet_aton(netaddr))[0] & netmask + return (ipaddr & netmask) == (network & netmask) + + +def dotted_netmask(mask: int) -> str: + """Converts mask from /xx format to xxx.xxx.xxx.xxx + + Example: if mask is 24 function returns 255.255.255.0 + + :rtype: str + """ + bits = 0xFFFFFFFF ^ (1 << 32 - mask) - 1 + return socket.inet_ntoa(struct.pack(">I", bits)) + + +def is_ipv4_address(string_ip: str) -> bool: + """ + :rtype: bool + """ + try: + socket.inet_aton(string_ip) + except OSError: + return False + return True + + +def is_valid_cidr(string_network: str) -> bool: + """ + Very simple check of the cidr format in no_proxy variable. + + :rtype: bool + """ + if string_network.count("/") == 1: + try: + mask = int(string_network.split("/")[1]) + except ValueError: + return False + + if mask < 1 or mask > 32: + return False + + try: + socket.inet_aton(string_network.split("/")[0]) + except OSError: + return False + else: + return False + return True + + +@contextlib.contextmanager +def set_environ(env_name: str, value: str | None) -> Generator[None, None, None]: + """Set the environment variable 'env_name' to 'value' + + Save previous value, yield, and then restore the previous value stored in + the environment variable 'env_name'. + + If 'value' is None, do nothing""" + value_changed = value is not None + old_value: str | None = None + if value_changed: + old_value = os.environ.get(env_name) + os.environ[env_name] = value + try: + yield + finally: + if value_changed: + if old_value is None: + del os.environ[env_name] + else: + os.environ[env_name] = old_value + + +def should_bypass_proxies(url: str, no_proxy: str | None) -> bool: + """ + Returns whether we should bypass proxies or not. + + :rtype: bool + """ + + # Prioritize lowercase environment variables over uppercase + # to keep a consistent behaviour with other http projects (curl, wget). + def get_proxy(key: str) -> str | None: + return os.environ.get(key) or os.environ.get(key.upper()) + + # First check whether no_proxy is defined. If it is, check that the URL + # we're getting isn't in the no_proxy list. + no_proxy_arg = no_proxy + if no_proxy is None: + no_proxy = get_proxy("no_proxy") + parsed = urlparse(url) + hostname = parsed.hostname + + if hostname is None: + # URLs don't always have hostnames, e.g. file:/// urls. + return True + + if no_proxy: + # We need to check whether we match here. We need to see if we match + # the end of the hostname, both with and without the port. + no_proxy_hosts = (host for host in no_proxy.replace(" ", "").split(",") if host) + + if is_ipv4_address(hostname): + for proxy_ip in no_proxy_hosts: + if is_valid_cidr(proxy_ip): + if address_in_network(hostname, proxy_ip): + return True + elif hostname == proxy_ip: + # If no_proxy ip was defined in plain IP notation instead of cidr notation & + # matches the IP of the index + return True + else: + host_with_port = hostname + if parsed.port: + host_with_port += f":{parsed.port}" + + for host in no_proxy_hosts: + host = host.lstrip(".") + if hostname == host or host_with_port == host: + return True + host = "." + host + if hostname.endswith(host) or host_with_port.endswith(host): + return True + + with set_environ("no_proxy", no_proxy_arg): + try: + bypass = proxy_bypass(hostname) + except (TypeError, socket.gaierror): + bypass = False + + if bypass: + return True + + return False + + +def get_environ_proxies(url: str, no_proxy: str | None = None) -> dict[str, str]: + """ + Return a dict of environment proxies. + + :rtype: dict + """ + if should_bypass_proxies(url, no_proxy=no_proxy): + return {} + else: + return getproxies() + + +def select_proxy(url: str, proxies: dict[str, str] | None) -> str | None: + """Select a proxy for the url, if applicable. + + :param url: The url being for the request + :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs + """ + proxies = proxies or {} + urlparts = urlparse(url) + if urlparts.hostname is None: + return proxies.get(urlparts.scheme, proxies.get("all")) + + proxy_keys = [ + urlparts.scheme + "://" + urlparts.hostname, + urlparts.scheme, + "all://" + urlparts.hostname, + "all", + ] + proxy = None + for proxy_key in proxy_keys: + if proxy_key in proxies: + proxy = proxies[proxy_key] + break + + return proxy + + +def resolve_proxies( + request: Request | PreparedRequest, + proxies: dict[str, str] | None, + trust_env: bool = True, +) -> dict[str, str]: + """This method takes proxy information from a request and configuration + input to resolve a mapping of target proxies. This will consider settings + such as NO_PROXY to strip proxy configurations. + + :param request: Request or PreparedRequest + :param proxies: A dictionary of schemes or schemes and hosts to proxy URLs + :param trust_env: Boolean declaring whether to trust environment configs + + :rtype: dict + """ + proxies = proxies if proxies is not None else {} + url = cast(str, request.url) + scheme = urlparse(url).scheme + no_proxy = proxies.get("no_proxy") + new_proxies = proxies.copy() + + if trust_env and not should_bypass_proxies(url, no_proxy=no_proxy): + environ_proxies = get_environ_proxies(url, no_proxy=no_proxy) + + proxy = environ_proxies.get(scheme, environ_proxies.get("all")) + + if proxy: + new_proxies.setdefault(scheme, proxy) + return new_proxies + + +def default_user_agent(name: str = "python-requests") -> str: + """ + Return a string representing the default user agent. + + :rtype: str + """ + return f"{name}/{__version__}" + + +def default_headers() -> CaseInsensitiveDict[str]: + """ + :rtype: requests.structures.CaseInsensitiveDict + """ + return CaseInsensitiveDict( + { + "User-Agent": default_user_agent(), + "Accept-Encoding": DEFAULT_ACCEPT_ENCODING, + "Accept": "*/*", + "Connection": "keep-alive", + } + ) + + +def parse_header_links(value: str) -> list[dict[str, str]]: + """Return a list of parsed link headers proxies. + + i.e. Link: ; rel=front; type="image/jpeg",; rel=back;type="image/jpeg" + + :rtype: list + """ + + links: list[dict[str, str]] = [] + + replace_chars = " '\"" + + value = value.strip(replace_chars) + if not value: + return links + + for val in re.split(", *<", value): + try: + url, params = val.split(";", 1) + except ValueError: + url, params = val, "" + + link: dict[str, str] = {"url": url.strip("<> '\"")} + + for param in params.split(";"): + try: + key, value = param.split("=") + except ValueError: + break + + link[key.strip(replace_chars)] = value.strip(replace_chars) + + links.append(link) + + return links + + +# Null bytes; no need to recreate these on each call to guess_json_utf +_null = "\x00".encode("ascii") # encoding to ASCII for Python 3 +_null2 = _null * 2 +_null3 = _null * 3 + + +def guess_json_utf(data: bytes) -> str | None: + """ + :rtype: str + """ + # JSON always starts with two ASCII characters, so detection is as + # easy as counting the nulls and from their location and count + # determine the encoding. Also detect a BOM, if present. + sample = data[:4] + if sample in (codecs.BOM_UTF32_LE, codecs.BOM_UTF32_BE): + return "utf-32" # BOM included + if sample[:3] == codecs.BOM_UTF8: + return "utf-8-sig" # BOM included, MS style (discouraged) + if sample[:2] in (codecs.BOM_UTF16_LE, codecs.BOM_UTF16_BE): + return "utf-16" # BOM included + nullcount = sample.count(_null) + if nullcount == 0: + return "utf-8" + if nullcount == 2: + if sample[::2] == _null2: # 1st and 3rd are null + return "utf-16-be" + if sample[1::2] == _null2: # 2nd and 4th are null + return "utf-16-le" + # Did not detect 2 valid UTF-16 ascii-range characters + if nullcount == 3: + if sample[:3] == _null3: + return "utf-32-be" + if sample[1:] == _null3: + return "utf-32-le" + # Did not detect a valid UTF-32 ascii-range character + return None + + +def prepend_scheme_if_needed(url: str, new_scheme: str) -> str: + """Given a URL that may or may not have a scheme, prepend the given scheme. + Does not replace a present scheme with the one provided as an argument. + + :rtype: str + """ + parsed = parse_url(url) + scheme, auth, _host, _port, path, query, fragment = parsed + + # A defect in urlparse determines that there isn't a netloc present in some + # urls. We previously assumed parsing was overly cautious, and swapped the + # netloc and path. Due to a lack of tests on the original defect, this is + # maintained with parse_url for backwards compatibility. + netloc = parsed.netloc + if not netloc: + netloc, path = path, netloc + + if auth: + # parse_url doesn't provide the netloc with auth + # so we'll add it ourselves. + netloc = cast(str, netloc) + netloc = "@".join([auth, netloc]) + if scheme is None: + scheme = new_scheme + if path is None: + path = "" + + return urlunparse((scheme, netloc, path, "", query, fragment)) + + +def get_auth_from_url(url: str) -> tuple[str, str]: + """Given a url with authentication components, extract them into a tuple of + username,password. + + :rtype: (str,str) + """ + parsed = urlparse(url) + + try: + # except handles parsed.username/password being None + auth = (unquote(parsed.username), unquote(parsed.password)) # type: ignore[arg-type] + except (AttributeError, TypeError): + auth = ("", "") + + return auth + + +def check_header_validity(header: tuple[str | bytes, str | bytes]) -> None: + """Verifies that header parts don't contain leading whitespace + reserved characters, or return characters. + + :param header: tuple, in the format (name, value). + """ + name, value = header + _validate_header_part(header, name, 0) + _validate_header_part(header, value, 1) + + +def _validate_header_part( + header: tuple[str | bytes, str | bytes], + header_part: str | bytes, + header_validator_index: int, +) -> None: + if isinstance(header_part, str): + validator = _HEADER_VALIDATORS_STR[header_validator_index] + elif isinstance(header_part, bytes): + # runtime guard for non-str/bytes input + validator = _HEADER_VALIDATORS_BYTE[header_validator_index] + else: + raise InvalidHeader( + f"Header part ({header_part!r}) from {header} " + f"must be of type str or bytes, not {type(header_part)}" + ) + + if not validator.match(header_part): # type: ignore[arg-type] + header_kind = "name" if header_validator_index == 0 else "value" + raise InvalidHeader( + f"Invalid leading whitespace, reserved character(s), or return " + f"character(s) in header {header_kind}: {header_part!r}" + ) + + +def urldefragauth(url: str) -> str: + """ + Given a url remove the fragment and the authentication part. + + :rtype: str + """ + scheme, netloc, path, params, query, _fragment = urlparse(url) + + # see func:`prepend_scheme_if_needed` + if not netloc: + netloc, path = path, netloc + + netloc = netloc.rsplit("@", 1)[-1] + + return urlunparse((scheme, netloc, path, params, query, "")) + + +def rewind_body(prepared_request: PreparedRequest) -> None: + """Move file pointer back to its recorded starting position + so it can be read again on redirect. + """ + body_seek = getattr(prepared_request.body, "seek", None) + if body_seek is not None and isinstance( + prepared_request._body_position, + integer_types, + ): + try: + body_seek(prepared_request._body_position) + except OSError: + raise UnrewindableBodyError( + "An error occurred when rewinding request body for redirect." + ) + else: + raise UnrewindableBodyError("Unable to rewind request body for redirect.") diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/tests/__init__.py b/components/mimo-code/source_bundle/pristine/vendor/requests/tests/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c8561a080180f510b235bde44e0361835586af15 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/tests/__init__.py @@ -0,0 +1,14 @@ +"""Requests test package initialisation.""" + +import warnings + +try: + from urllib3.exceptions import SNIMissingWarning + + # urllib3 1.x sets SNIMissingWarning to only go off once, + # while this test suite requires it to always fire + # so that it occurs during test_requests.test_https_warnings + warnings.simplefilter("always", SNIMissingWarning) +except ImportError: + # urllib3 2.0 removed that warning and errors out instead + SNIMissingWarning = None diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/tests/conftest.py b/components/mimo-code/source_bundle/pristine/vendor/requests/tests/conftest.py new file mode 100644 index 0000000000000000000000000000000000000000..bfb44b9d60bd8d7171cff797ad41efda1d80c54a --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/tests/conftest.py @@ -0,0 +1,67 @@ +try: + from http.server import HTTPServer, SimpleHTTPRequestHandler +except ImportError: + from BaseHTTPServer import HTTPServer + from SimpleHTTPServer import SimpleHTTPRequestHandler + +import ssl +import threading + +import pytest + +from requests.compat import urljoin + + +def prepare_url(value): + # Issue #1483: Make sure the URL always has a trailing slash + httpbin_url = value.url.rstrip("/") + "/" + + def inner(*suffix): + return urljoin(httpbin_url, "/".join(suffix)) + + return inner + + +@pytest.fixture(autouse=True) +def clean_proxy_environ(monkeypatch): + """Remove proxy related environment variables for every test.""" + proxy_vars = ("http_proxy", "https_proxy", "no_proxy", "ftp_proxy", "all_proxy") + for var in proxy_vars: + monkeypatch.delenv(var, raising=False) + monkeypatch.delenv(var.upper(), raising=False) + + +@pytest.fixture +def httpbin(httpbin): + return prepare_url(httpbin) + + +@pytest.fixture +def httpbin_secure(httpbin_secure): + return prepare_url(httpbin_secure) + + +@pytest.fixture +def nosan_server(tmp_path_factory): + # delay importing until the fixture in order to make it possible + # to deselect the test via command-line when trustme is not available + import trustme + + tmpdir = tmp_path_factory.mktemp("certs") + ca = trustme.CA() + # only commonName, no subjectAltName + server_cert = ca.issue_cert(common_name="localhost") + ca_bundle = str(tmpdir / "ca.pem") + ca.cert_pem.write_to_path(ca_bundle) + + context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) + server_cert.configure_cert(context) + server = HTTPServer(("localhost", 0), SimpleHTTPRequestHandler) + server.socket = context.wrap_socket(server.socket, server_side=True) + server_thread = threading.Thread(target=server.serve_forever) + server_thread.start() + + yield "localhost", server.server_address[1], ca_bundle + + server.shutdown() + server_thread.join() diff --git a/components/mimo-code/source_bundle/pristine/vendor/requests/tests/test_requests.py b/components/mimo-code/source_bundle/pristine/vendor/requests/tests/test_requests.py new file mode 100644 index 0000000000000000000000000000000000000000..2cea2fe8d9e9f4c1a32b5e8acaf3c942f3359b83 --- /dev/null +++ b/components/mimo-code/source_bundle/pristine/vendor/requests/tests/test_requests.py @@ -0,0 +1,3079 @@ +"""Tests for Requests.""" + +import collections +import contextlib +import io +import json +import os +import pickle +import re +import tempfile +import threading +import warnings +from unittest import mock + +import pytest +import urllib3 +from urllib3.util import Timeout as Urllib3Timeout + +import requests +from requests.adapters import HTTPAdapter +from requests.auth import HTTPDigestAuth, _basic_auth_str +from requests.compat import ( + JSONDecodeError, + Morsel, + MutableMapping, + builtin_str, + cookielib, + getproxies, + is_urllib3_1, + urlparse, +) +from requests.cookies import cookiejar_from_dict, morsel_to_cookie +from requests.exceptions import ( + ChunkedEncodingError, + ConnectionError, + ConnectTimeout, + ContentDecodingError, + InvalidHeader, + InvalidProxyURL, + InvalidSchema, + InvalidURL, + MissingSchema, + ProxyError, + ReadTimeout, + RequestException, + RetryError, + Timeout, + TooManyRedirects, + UnrewindableBodyError, +) +from requests.exceptions import SSLError as RequestsSSLError +from requests.hooks import default_hooks +from requests.models import PreparedRequest, urlencode +from requests.sessions import SessionRedirectMixin +from requests.structures import CaseInsensitiveDict + +from . import SNIMissingWarning +from .compat import StringIO +from .testserver.server import TLSServer, consume_socket_content +from .utils import override_environ + +# Requests to this URL should always fail with a connection timeout (nothing +# listening on that port) +TARPIT = "http://10.255.255.1" + +# This is to avoid waiting the timeout of using TARPIT +INVALID_PROXY = "http://localhost:1" + +try: + from ssl import SSLContext + + del SSLContext + HAS_MODERN_SSL = True +except ImportError: + HAS_MODERN_SSL = False + +try: + requests.pyopenssl + HAS_PYOPENSSL = True +except AttributeError: + HAS_PYOPENSSL = False + + +class TestRequests: + digest_auth_algo = ("MD5", "SHA-256", "SHA-512") + + def test_entry_points(self): + requests.session + requests.session().get + requests.session().head + requests.get + requests.head + requests.put + requests.patch + requests.post + # Not really an entry point, but people rely on it. + from requests.packages.urllib3.poolmanager import PoolManager # noqa:F401 + + @pytest.mark.parametrize( + "exception, url", + ( + (MissingSchema, "hiwpefhipowhefopw"), + (InvalidSchema, "localhost:3128"), + (InvalidSchema, "localhost.localdomain:3128/"), + (InvalidSchema, "10.122.1.1:3128/"), + (InvalidURL, "http://"), + (InvalidURL, "http://*example.com"), + (InvalidURL, "http://.example.com"), + ), + ) + def test_invalid_url(self, exception, url): + with pytest.raises(exception): + requests.get(url) + + def test_basic_building(self): + req = requests.Request() + req.url = "http://kennethreitz.org/" + req.data = {"life": "42"} + + pr = req.prepare() + assert pr.url == req.url + assert pr.body == "life=42" + + @pytest.mark.parametrize("method", ("GET", "HEAD")) + def test_no_content_length(self, httpbin, method): + req = requests.Request(method, httpbin(method.lower())).prepare() + assert "Content-Length" not in req.headers + + @pytest.mark.parametrize("method", ("POST", "PUT", "PATCH", "OPTIONS")) + def test_no_body_content_length(self, httpbin, method): + req = requests.Request(method, httpbin(method.lower())).prepare() + assert req.headers["Content-Length"] == "0" + + @pytest.mark.parametrize("method", ("POST", "PUT", "PATCH", "OPTIONS")) + def test_empty_content_length(self, httpbin, method): + req = requests.Request(method, httpbin(method.lower()), data="").prepare() + assert req.headers["Content-Length"] == "0" + + def test_override_content_length(self, httpbin): + headers = {"Content-Length": "not zero"} + r = requests.Request("POST", httpbin("post"), headers=headers).prepare() + assert "Content-Length" in r.headers + assert r.headers["Content-Length"] == "not zero" + + def test_path_is_not_double_encoded(self): + request = requests.Request("GET", "http://0.0.0.0/get/test case").prepare() + + assert request.path_url == "/get/test%20case" + + @pytest.mark.parametrize( + "url, expected", + ( + ( + "http://example.com/path#fragment", + "http://example.com/path?a=b#fragment", + ), + ( + "http://example.com/path?key=value#fragment", + "http://example.com/path?key=value&a=b#fragment", + ), + ), + ) + def test_params_are_added_before_fragment(self, url, expected): + request = requests.Request("GET", url, params={"a": "b"}).prepare() + assert request.url == expected + + def test_params_original_order_is_preserved_by_default(self): + param_ordered_dict = collections.OrderedDict( + (("z", 1), ("a", 1), ("k", 1), ("d", 1)) + ) + session = requests.Session() + request = requests.Request( + "GET", "http://example.com/", params=param_ordered_dict + ) + prep = session.prepare_request(request) + assert prep.url == "http://example.com/?z=1&a=1&k=1&d=1" + + def test_params_bytes_are_encoded(self): + request = requests.Request( + "GET", "http://example.com", params=b"test=foo" + ).prepare() + assert request.url == "http://example.com/?test=foo" + + def test_binary_put(self): + request = requests.Request( + "PUT", "http://example.com", data="ööö".encode() + ).prepare() + assert isinstance(request.body, bytes) + + def test_whitespaces_are_removed_from_url(self): + # Test for issue #3696 + request = requests.Request("GET", " http://example.com").prepare() + assert request.url == "http://example.com/" + + @pytest.mark.parametrize("scheme", ("http://", "HTTP://", "hTTp://", "HttP://")) + def test_mixed_case_scheme_acceptable(self, httpbin, scheme): + s = requests.Session() + s.proxies = getproxies() + parts = urlparse(httpbin("get")) + url = scheme + parts.netloc + parts.path + r = requests.Request("GET", url) + r = s.send(r.prepare()) + assert r.status_code == 200, f"failed for scheme {scheme}" + + def test_HTTP_200_OK_GET_ALTERNATIVE(self, httpbin): + r = requests.Request("GET", httpbin("get")) + s = requests.Session() + s.proxies = getproxies() + + r = s.send(r.prepare()) + + assert r.status_code == 200 + + def test_HTTP_302_ALLOW_REDIRECT_GET(self, httpbin): + r = requests.get(httpbin("redirect", "1")) + assert r.status_code == 200 + assert r.history[0].status_code == 302 + assert r.history[0].is_redirect + + def test_redirect_history_no_self_reference(self, httpbin): + r = requests.get(httpbin("redirect", "3")) + assert r.status_code == 200 + assert len(r.history) == 3 + for i, resp in enumerate(r.history): + assert resp not in resp.history + assert resp.history == r.history[:i] + + def test_HTTP_307_ALLOW_REDIRECT_POST(self, httpbin): + r = requests.post( + httpbin("redirect-to"), + data="test", + params={"url": "post", "status_code": 307}, + ) + assert r.status_code == 200 + assert r.history[0].status_code == 307 + assert r.history[0].is_redirect + assert r.json()["data"] == "test" + + def test_HTTP_307_ALLOW_REDIRECT_POST_WITH_SEEKABLE(self, httpbin): + byte_str = b"test" + r = requests.post( + httpbin("redirect-to"), + data=io.BytesIO(byte_str), + params={"url": "post", "status_code": 307}, + ) + assert r.status_code == 200 + assert r.history[0].status_code == 307 + assert r.history[0].is_redirect + assert r.json()["data"] == byte_str.decode("utf-8") + + def test_HTTP_302_TOO_MANY_REDIRECTS(self, httpbin): + try: + requests.get(httpbin("relative-redirect", "50")) + except TooManyRedirects as e: + url = httpbin("relative-redirect", "20") + assert e.request.url == url + assert e.response.url == url + assert len(e.response.history) == 30 + else: + pytest.fail("Expected redirect to raise TooManyRedirects but it did not") + + def test_HTTP_302_TOO_MANY_REDIRECTS_WITH_PARAMS(self, httpbin): + s = requests.session() + s.max_redirects = 5 + try: + s.get(httpbin("relative-redirect", "50")) + except TooManyRedirects as e: + url = httpbin("relative-redirect", "45") + assert e.request.url == url + assert e.response.url == url + assert len(e.response.history) == 5 + else: + pytest.fail( + "Expected custom max number of redirects to be respected but was not" + ) + + def test_http_301_changes_post_to_get(self, httpbin): + r = requests.post(httpbin("status", "301")) + assert r.status_code == 200 + assert r.request.method == "GET" + assert r.history[0].status_code == 301 + assert r.history[0].is_redirect + + def test_http_301_doesnt_change_head_to_get(self, httpbin): + r = requests.head(httpbin("status", "301"), allow_redirects=True) + print(r.content) + assert r.status_code == 200 + assert r.request.method == "HEAD" + assert r.history[0].status_code == 301 + assert r.history[0].is_redirect + + def test_http_302_changes_post_to_get(self, httpbin): + r = requests.post(httpbin("status", "302")) + assert r.status_code == 200 + assert r.request.method == "GET" + assert r.history[0].status_code == 302 + assert r.history[0].is_redirect + + def test_http_302_doesnt_change_head_to_get(self, httpbin): + r = requests.head(httpbin("status", "302"), allow_redirects=True) + assert r.status_code == 200 + assert r.request.method == "HEAD" + assert r.history[0].status_code == 302 + assert r.history[0].is_redirect + + def test_http_303_changes_post_to_get(self, httpbin): + r = requests.post(httpbin("status", "303")) + assert r.status_code == 200 + assert r.request.method == "GET" + assert r.history[0].status_code == 303 + assert r.history[0].is_redirect + + def test_http_303_doesnt_change_head_to_get(self, httpbin): + r = requests.head(httpbin("status", "303"), allow_redirects=True) + assert r.status_code == 200 + assert r.request.method == "HEAD" + assert r.history[0].status_code == 303 + assert r.history[0].is_redirect + + def test_header_and_body_removal_on_redirect(self, httpbin): + purged_headers = ("Content-Length", "Content-Type") + ses = requests.Session() + req = requests.Request("POST", httpbin("post"), data={"test": "data"}) + prep = ses.prepare_request(req) + resp = ses.send(prep) + + # Mimic a redirect response + resp.status_code = 302 + resp.headers["location"] = "get" + + # Run request through resolve_redirects + next_resp = next(ses.resolve_redirects(resp, prep)) + assert next_resp.request.body is None + for header in purged_headers: + assert header not in next_resp.request.headers + + def test_transfer_enc_removal_on_redirect(self, httpbin): + purged_headers = ("Transfer-Encoding", "Content-Type") + ses = requests.Session() + req = requests.Request("POST", httpbin("post"), data=(b"x" for x in range(1))) + prep = ses.prepare_request(req) + assert "Transfer-Encoding" in prep.headers + + # Create Response to avoid https://github.com/kevin1024/pytest-httpbin/issues/33 + resp = requests.Response() + resp.raw = io.BytesIO(b"the content") + resp.request = prep + setattr(resp.raw, "release_conn", lambda *args: args) + + # Mimic a redirect response + resp.status_code = 302 + resp.headers["location"] = httpbin("get") + + # Run request through resolve_redirect + next_resp = next(ses.resolve_redirects(resp, prep)) + assert next_resp.request.body is None + for header in purged_headers: + assert header not in next_resp.request.headers + + def test_fragment_maintained_on_redirect(self, httpbin): + fragment = "#view=edit&token=hunter2" + r = requests.get(httpbin("redirect-to?url=get") + fragment) + + assert len(r.history) > 0 + assert r.history[0].request.url == httpbin("redirect-to?url=get") + fragment + assert r.url == httpbin("get") + fragment + + def test_HTTP_200_OK_GET_WITH_PARAMS(self, httpbin): + heads = {"User-agent": "Mozilla/5.0"} + + r = requests.get(httpbin("user-agent"), headers=heads) + + assert heads["User-agent"] in r.text + assert r.status_code == 200 + + def test_HTTP_200_OK_GET_WITH_MIXED_PARAMS(self, httpbin): + heads = {"User-agent": "Mozilla/5.0"} + + r = requests.get( + httpbin("get") + "?test=true", params={"q": "test"}, headers=heads + ) + assert r.status_code == 200 + + def test_set_cookie_on_301(self, httpbin): + s = requests.session() + url = httpbin("cookies/set?foo=bar") + s.get(url) + assert s.cookies["foo"] == "bar" + + def test_cookie_sent_on_redirect(self, httpbin): + s = requests.session() + s.get(httpbin("cookies/set?foo=bar")) + r = s.get(httpbin("redirect/1")) # redirects to httpbin('get') + assert "Cookie" in r.json()["headers"] + + def test_cookie_removed_on_expire(self, httpbin): + s = requests.session() + s.get(httpbin("cookies/set?foo=bar")) + assert s.cookies["foo"] == "bar" + s.get( + httpbin("response-headers"), + params={"Set-Cookie": "foo=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT"}, + ) + assert "foo" not in s.cookies + + def test_cookie_quote_wrapped(self, httpbin): + s = requests.session() + s.get(httpbin('cookies/set?foo="bar:baz"')) + assert s.cookies["foo"] == '"bar:baz"' + + def test_cookie_persists_via_api(self, httpbin): + s = requests.session() + r = s.get(httpbin("redirect/1"), cookies={"foo": "bar"}) + assert "foo" in r.request.headers["Cookie"] + assert "foo" in r.history[0].request.headers["Cookie"] + + def test_request_cookie_overrides_session_cookie(self, httpbin): + s = requests.session() + s.cookies["foo"] = "bar" + r = s.get(httpbin("cookies"), cookies={"foo": "baz"}) + assert r.json()["cookies"]["foo"] == "baz" + # Session cookie should not be modified + assert s.cookies["foo"] == "bar" + + def test_request_cookies_not_persisted(self, httpbin): + s = requests.session() + s.get(httpbin("cookies"), cookies={"foo": "baz"}) + # Sending a request with cookies should not add cookies to the session + assert not s.cookies + + def test_generic_cookiejar_works(self, httpbin): + cj = cookielib.CookieJar() + cookiejar_from_dict({"foo": "bar"}, cj) + s = requests.session() + s.cookies = cj + r = s.get(httpbin("cookies")) + # Make sure the cookie was sent + assert r.json()["cookies"]["foo"] == "bar" + # Make sure the session cj is still the custom one + assert s.cookies is cj + + def test_param_cookiejar_works(self, httpbin): + cj = cookielib.CookieJar() + cookiejar_from_dict({"foo": "bar"}, cj) + s = requests.session() + r = s.get(httpbin("cookies"), cookies=cj) + # Make sure the cookie was sent + assert r.json()["cookies"]["foo"] == "bar" + + def test_cookielib_cookiejar_on_redirect(self, httpbin): + """Tests resolve_redirect doesn't fail when merging cookies + with non-RequestsCookieJar cookiejar. + + See GH #3579 + """ + cj = cookiejar_from_dict({"foo": "bar"}, cookielib.CookieJar()) + s = requests.Session() + s.cookies = cookiejar_from_dict({"cookie": "tasty"}) + + # Prepare request without using Session + req = requests.Request("GET", httpbin("headers"), cookies=cj) + prep_req = req.prepare() + + # Send request and simulate redirect + resp = s.send(prep_req) + resp.status_code = 302 + resp.headers["location"] = httpbin("get") + redirects = s.resolve_redirects(resp, prep_req) + resp = next(redirects) + + # Verify CookieJar isn't being converted to RequestsCookieJar + assert isinstance(prep_req._cookies, cookielib.CookieJar) + assert isinstance(resp.request._cookies, cookielib.CookieJar) + assert not isinstance(resp.request._cookies, requests.cookies.RequestsCookieJar) + + cookies = {} + for c in resp.request._cookies: + cookies[c.name] = c.value + assert cookies["foo"] == "bar" + assert cookies["cookie"] == "tasty" + + def test_requests_in_history_are_not_overridden(self, httpbin): + resp = requests.get(httpbin("redirect/3")) + urls = [r.url for r in resp.history] + req_urls = [r.request.url for r in resp.history] + assert urls == req_urls + + def test_history_is_always_a_list(self, httpbin): + """Show that even with redirects, Response.history is always a list.""" + resp = requests.get(httpbin("get")) + assert isinstance(resp.history, list) + resp = requests.get(httpbin("redirect/1")) + assert isinstance(resp.history, list) + assert not isinstance(resp.history, tuple) + + def test_headers_on_session_with_None_are_not_sent(self, httpbin): + """Do not send headers in Session.headers with None values.""" + ses = requests.Session() + ses.headers["Accept-Encoding"] = None + req = requests.Request("GET", httpbin("get")) + prep = ses.prepare_request(req) + assert "Accept-Encoding" not in prep.headers + + def test_headers_preserve_order(self, httpbin): + """Preserve order when headers provided as OrderedDict.""" + ses = requests.Session() + ses.headers = collections.OrderedDict() + ses.headers["Accept-Encoding"] = "identity" + ses.headers["First"] = "1" + ses.headers["Second"] = "2" + headers = collections.OrderedDict([("Third", "3"), ("Fourth", "4")]) + headers["Fifth"] = "5" + headers["Second"] = "222" + req = requests.Request("GET", httpbin("get"), headers=headers) + prep = ses.prepare_request(req) + items = list(prep.headers.items()) + assert items[0] == ("Accept-Encoding", "identity") + assert items[1] == ("First", "1") + assert items[2] == ("Second", "222") + assert items[3] == ("Third", "3") + assert items[4] == ("Fourth", "4") + assert items[5] == ("Fifth", "5") + + @pytest.mark.parametrize("key", ("User-agent", "user-agent")) + def test_user_agent_transfers(self, httpbin, key): + heads = {key: "Mozilla/5.0 (github.com/psf/requests)"} + + r = requests.get(httpbin("user-agent"), headers=heads) + assert heads[key] in r.text + + def test_HTTP_200_OK_HEAD(self, httpbin): + r = requests.head(httpbin("get")) + assert r.status_code == 200 + + def test_HTTP_200_OK_PUT(self, httpbin): + r = requests.put(httpbin("put")) + assert r.status_code == 200 + + def test_BASICAUTH_TUPLE_HTTP_200_OK_GET(self, httpbin): + auth = ("user", "pass") + url = httpbin("basic-auth", "user", "pass") + + r = requests.get(url, auth=auth) + assert r.status_code == 200 + + r = requests.get(url) + assert r.status_code == 401 + + s = requests.session() + s.auth = auth + r = s.get(url) + assert r.status_code == 200 + + @pytest.mark.parametrize( + "username, password", + ( + ("user", "pass"), + ("имя".encode(), "пароль".encode()), + (42, 42), + (None, None), + ), + ) + def test_set_basicauth(self, httpbin, username, password): + auth = (username, password) + url = httpbin("get") + + r = requests.Request("GET", url, auth=auth) + p = r.prepare() + + assert p.headers["Authorization"] == _basic_auth_str(username, password) + + def test_basicauth_encodes_byte_strings(self): + """Ensure b'test' formats as the byte string "test" rather + than the unicode string "b'test'" in Python 3. + """ + auth = (b"\xc5\xafsername", b"test\xc6\xb6") + r = requests.Request("GET", "http://localhost", auth=auth) + p = r.prepare() + + assert p.headers["Authorization"] == "Basic xa9zZXJuYW1lOnRlc3TGtg==" + + @pytest.mark.parametrize( + "url, exception", + ( + # Connecting to an unknown domain should raise a ConnectionError + ("http://doesnotexist.google.com", ConnectionError), + # Connecting to an invalid port should raise a ConnectionError + ("http://localhost:1", ConnectionError), + # Inputting a URL that cannot be parsed should raise an InvalidURL error + ("http://fe80::5054:ff:fe5a:fc0", InvalidURL), + ), + ) + def test_errors(self, url, exception): + with pytest.raises(exception): + requests.get(url, timeout=1) + + def test_proxy_error(self): + # any proxy related error (address resolution, no route to host, etc) should result in a ProxyError + with pytest.raises(ProxyError): + requests.get( + "http://localhost:1", proxies={"http": "non-resolvable-address"} + ) + + def test_proxy_error_on_bad_url(self, httpbin, httpbin_secure): + with pytest.raises(InvalidProxyURL): + requests.get(httpbin_secure(), proxies={"https": "http:/badproxyurl:3128"}) + + with pytest.raises(InvalidProxyURL): + requests.get(httpbin(), proxies={"http": "http://:8080"}) + + with pytest.raises(InvalidProxyURL): + requests.get(httpbin_secure(), proxies={"https": "https://"}) + + with pytest.raises(InvalidProxyURL): + requests.get(httpbin(), proxies={"http": "http:///example.com:8080"}) + + def test_respect_proxy_env_on_send_self_prepared_request(self, httpbin): + with override_environ(http_proxy=INVALID_PROXY): + with pytest.raises(ProxyError): + session = requests.Session() + request = requests.Request("GET", httpbin()) + session.send(request.prepare()) + + def test_respect_proxy_env_on_send_session_prepared_request(self, httpbin): + with override_environ(http_proxy=INVALID_PROXY): + with pytest.raises(ProxyError): + session = requests.Session() + request = requests.Request("GET", httpbin()) + prepared = session.prepare_request(request) + session.send(prepared) + + def test_respect_proxy_env_on_send_with_redirects(self, httpbin): + with override_environ(http_proxy=INVALID_PROXY): + with pytest.raises(ProxyError): + session = requests.Session() + url = httpbin("redirect/1") + print(url) + request = requests.Request("GET", url) + session.send(request.prepare()) + + def test_respect_proxy_env_on_get(self, httpbin): + with override_environ(http_proxy=INVALID_PROXY): + with pytest.raises(ProxyError): + session = requests.Session() + session.get(httpbin()) + + def test_respect_proxy_env_on_request(self, httpbin): + with override_environ(http_proxy=INVALID_PROXY): + with pytest.raises(ProxyError): + session = requests.Session() + session.request(method="GET", url=httpbin()) + + def test_proxy_authorization_preserved_on_request(self, httpbin): + proxy_auth_value = "Bearer XXX" + session = requests.Session() + session.headers.update({"Proxy-Authorization": proxy_auth_value}) + resp = session.request(method="GET", url=httpbin("get")) + sent_headers = resp.json().get("headers", {}) + + assert sent_headers.get("Proxy-Authorization") == proxy_auth_value + + @pytest.mark.parametrize( + "url,has_proxy_auth", + ( + ("http://example.com", True), + ("https://example.com", False), + ), + ) + def test_proxy_authorization_not_appended_to_https_request( + self, url, has_proxy_auth + ): + session = requests.Session() + proxies = { + "http": "http://test:pass@localhost:8080", + "https": "http://test:pass@localhost:8090", + } + req = requests.Request("GET", url) + prep = req.prepare() + session.rebuild_proxies(prep, proxies) + + assert ("Proxy-Authorization" in prep.headers) is has_proxy_auth + + def test_basicauth_with_netrc(self, httpbin): + auth = ("user", "pass") + wrong_auth = ("wronguser", "wrongpass") + url = httpbin("basic-auth", "user", "pass") + + old_auth = requests.sessions.get_netrc_auth + + try: + + def get_netrc_auth_mock(url): + return auth + + requests.sessions.get_netrc_auth = get_netrc_auth_mock + + # Should use netrc and work. + r = requests.get(url) + assert r.status_code == 200 + + # Given auth should override and fail. + r = requests.get(url, auth=wrong_auth) + assert r.status_code == 401 + + s = requests.session() + + # Should use netrc and work. + r = s.get(url) + assert r.status_code == 200 + + # Given auth should override and fail. + s.auth = wrong_auth + r = s.get(url) + assert r.status_code == 401 + finally: + requests.sessions.get_netrc_auth = old_auth + + def test_basicauth_with_netrc_leak(self, httpbin): + url1 = httpbin("basic-auth", "user", "pass") + url = url1[len("http://") :] + domain = url.split(":")[0] + url = f"http://example.com:@{url}" + + netrc_file = "" + with tempfile.NamedTemporaryFile(mode="w", delete=False) as fp: + fp.write("machine example.com\n") + fp.write("login wronguser\n") + fp.write("password wrongpass\n") + fp.write(f"machine {domain}\n") + fp.write("login user\n") + fp.write("password pass\n") + fp.close() + netrc_file = fp.name + + old_netrc = os.environ.get("NETRC", "") + os.environ["NETRC"] = netrc_file + + try: + # Should use netrc + # Make sure that we don't use the example.com credentials + # for the request + r = requests.get(url) + assert r.status_code == 200 + finally: + os.environ["NETRC"] = old_netrc + os.unlink(netrc_file) + + def test_DIGEST_HTTP_200_OK_GET(self, httpbin): + for authtype in self.digest_auth_algo: + auth = HTTPDigestAuth("user", "pass") + url = httpbin("digest-auth", "auth", "user", "pass", authtype, "never") + + r = requests.get(url, auth=auth) + assert r.status_code == 200 + + r = requests.get(url) + assert r.status_code == 401 + print(r.headers["WWW-Authenticate"]) + + s = requests.session() + s.auth = HTTPDigestAuth("user", "pass") + r = s.get(url) + assert r.status_code == 200 + + def test_DIGEST_AUTH_RETURNS_COOKIE(self, httpbin): + for authtype in self.digest_auth_algo: + url = httpbin("digest-auth", "auth", "user", "pass", authtype) + auth = HTTPDigestAuth("user", "pass") + r = requests.get(url) + assert r.cookies["fake"] == "fake_value" + + r = requests.get(url, auth=auth) + assert r.status_code == 200 + + def test_DIGEST_AUTH_SETS_SESSION_COOKIES(self, httpbin): + for authtype in self.digest_auth_algo: + url = httpbin("digest-auth", "auth", "user", "pass", authtype) + auth = HTTPDigestAuth("user", "pass") + s = requests.Session() + s.get(url, auth=auth) + assert s.cookies["fake"] == "fake_value" + + def test_DIGEST_STREAM(self, httpbin): + for authtype in self.digest_auth_algo: + auth = HTTPDigestAuth("user", "pass") + url = httpbin("digest-auth", "auth", "user", "pass", authtype) + + r = requests.get(url, auth=auth, stream=True) + assert r.raw.read() != b"" + + r = requests.get(url, auth=auth, stream=False) + assert r.raw.read() == b"" + + def test_DIGESTAUTH_WRONG_HTTP_401_GET(self, httpbin): + for authtype in self.digest_auth_algo: + auth = HTTPDigestAuth("user", "wrongpass") + url = httpbin("digest-auth", "auth", "user", "pass", authtype) + + r = requests.get(url, auth=auth) + assert r.status_code == 401 + + r = requests.get(url) + assert r.status_code == 401 + + s = requests.session() + s.auth = auth + r = s.get(url) + assert r.status_code == 401 + + def test_DIGESTAUTH_QUOTES_QOP_VALUE(self, httpbin): + for authtype in self.digest_auth_algo: + auth = HTTPDigestAuth("user", "pass") + url = httpbin("digest-auth", "auth", "user", "pass", authtype) + + r = requests.get(url, auth=auth) + assert '"auth"' in r.request.headers["Authorization"] + + def test_POSTBIN_GET_POST_FILES(self, httpbin): + url = httpbin("post") + requests.post(url).raise_for_status() + + post1 = requests.post(url, data={"some": "data"}) + assert post1.status_code == 200 + + with open("requirements-dev.txt") as f: + post2 = requests.post(url, files={"some": f}) + assert post2.status_code == 200 + + post4 = requests.post(url, data='[{"some": "json"}]') + assert post4.status_code == 200 + + with pytest.raises(ValueError): + requests.post(url, files=["bad file data"]) + + def test_invalid_files_input(self, httpbin): + url = httpbin("post") + post = requests.post(url, files={"random-file-1": None, "random-file-2": 1}) + assert b'name="random-file-1"' not in post.request.body + assert b'name="random-file-2"' in post.request.body + + def test_POSTBIN_SEEKED_OBJECT_WITH_NO_ITER(self, httpbin): + class TestStream: + def __init__(self, data): + self.data = data.encode() + self.length = len(self.data) + self.index = 0 + + def __len__(self): + return self.length + + def read(self, size=None): + if size: + ret = self.data[self.index : self.index + size] + self.index += size + else: + ret = self.data[self.index :] + self.index = self.length + return ret + + def tell(self): + return self.index + + def seek(self, offset, where=0): + if where == 0: + self.index = offset + elif where == 1: + self.index += offset + elif where == 2: + self.index = self.length + offset + + test = TestStream("test") + post1 = requests.post(httpbin("post"), data=test) + assert post1.status_code == 200 + assert post1.json()["data"] == "test" + + test = TestStream("test") + test.seek(2) + post2 = requests.post(httpbin("post"), data=test) + assert post2.status_code == 200 + assert post2.json()["data"] == "st" + + def test_POSTBIN_GET_POST_FILES_WITH_DATA(self, httpbin): + url = httpbin("post") + requests.post(url).raise_for_status() + + post1 = requests.post(url, data={"some": "data"}) + assert post1.status_code == 200 + + with open("requirements-dev.txt") as f: + post2 = requests.post(url, data={"some": "data"}, files={"some": f}) + assert post2.status_code == 200 + + post4 = requests.post(url, data='[{"some": "json"}]') + assert post4.status_code == 200 + + with pytest.raises(ValueError): + requests.post(url, files=["bad file data"]) + + def test_post_with_custom_mapping(self, httpbin): + class CustomMapping(MutableMapping): + def __init__(self, *args, **kwargs): + self.data = dict(*args, **kwargs) + + def __delitem__(self, key): + del self.data[key] + + def __getitem__(self, key): + return self.data[key] + + def __setitem__(self, key, value): + self.data[key] = value + + def __iter__(self): + return iter(self.data) + + def __len__(self): + return len(self.data) + + data = CustomMapping({"some": "data"}) + url = httpbin("post") + found_json = requests.post(url, data=data).json().get("form") + assert found_json == {"some": "data"} + + def test_conflicting_post_params(self, httpbin): + url = httpbin("post") + with open("requirements-dev.txt") as f: + with pytest.raises(ValueError): + requests.post(url, data='[{"some": "data"}]', files={"some": f}) + + def test_request_ok_set(self, httpbin): + r = requests.get(httpbin("status", "404")) + assert not r.ok + + def test_status_raising(self, httpbin): + r = requests.get(httpbin("status", "404")) + with pytest.raises(requests.exceptions.HTTPError): + r.raise_for_status() + + r = requests.get(httpbin("status", "500")) + assert not r.ok + + def test_decompress_gzip(self, httpbin): + r = requests.get(httpbin("gzip")) + r.content.decode("ascii") + + @pytest.mark.parametrize( + "url, params", + ( + ("/get", {"foo": "føø"}), + ("/get", {"føø": "føø"}), + ("/get", {"føø": "føø"}), + ("/get", {"foo": "foo"}), + ("ø", {"foo": "foo"}), + ), + ) + def test_unicode_get(self, httpbin, url, params): + requests.get(httpbin(url), params=params) + + def test_unicode_header_name(self, httpbin): + requests.put( + httpbin("put"), + headers={"Content-Type": "application/octet-stream"}, + data="\xff", + ) # compat.str is unicode. + + def test_pyopenssl_redirect(self, httpbin_secure, httpbin_ca_bundle): + requests.get(httpbin_secure("status", "301"), verify=httpbin_ca_bundle) + + def test_invalid_ca_certificate_path(self, httpbin_secure): + INVALID_PATH = "/garbage" + with pytest.raises(IOError) as e: + requests.get(httpbin_secure(), verify=INVALID_PATH) + assert ( + str(e.value) + == f"Could not find a suitable TLS CA certificate bundle, invalid path: {INVALID_PATH}" + ) + + def test_invalid_ssl_certificate_files(self, httpbin_secure): + INVALID_PATH = "/garbage" + with pytest.raises(IOError) as e: + requests.get(httpbin_secure(), cert=INVALID_PATH) + assert ( + str(e.value) + == f"Could not find the TLS certificate file, invalid path: {INVALID_PATH}" + ) + + with pytest.raises(IOError) as e: + requests.get(httpbin_secure(), cert=(".", INVALID_PATH)) + assert str(e.value) == ( + f"Could not find the TLS key file, invalid path: {INVALID_PATH}" + ) + + @pytest.mark.parametrize( + "env, expected", + ( + ({}, True), + ({"REQUESTS_CA_BUNDLE": "/some/path"}, "/some/path"), + ({"REQUESTS_CA_BUNDLE": ""}, True), + ({"CURL_CA_BUNDLE": "/some/path"}, "/some/path"), + ({"CURL_CA_BUNDLE": ""}, True), + ({"REQUESTS_CA_BUNDLE": "", "CURL_CA_BUNDLE": ""}, True), + ( + { + "REQUESTS_CA_BUNDLE": "/some/path", + "CURL_CA_BUNDLE": "/curl/path", + }, + "/some/path", + ), + ( + { + "REQUESTS_CA_BUNDLE": "", + "CURL_CA_BUNDLE": "/curl/path", + }, + "/curl/path", + ), + ), + ) + def test_env_cert_bundles(self, httpbin, env, expected): + s = requests.Session() + with mock.patch("os.environ", env): + settings = s.merge_environment_settings( + url=httpbin("get"), proxies={}, stream=False, verify=True, cert=None + ) + assert settings["verify"] == expected + + def test_http_with_certificate(self, httpbin): + r = requests.get(httpbin(), cert=".") + assert r.status_code == 200 + + @pytest.mark.skipif( + SNIMissingWarning is None, + reason="urllib3 2.0 removed that warning and errors out instead", + ) + def test_https_warnings(self, nosan_server): + """warnings are emitted with requests.get""" + host, port, ca_bundle = nosan_server + if HAS_MODERN_SSL or HAS_PYOPENSSL: + warnings_expected = ("SubjectAltNameWarning",) + else: + warnings_expected = ( + "SNIMissingWarning", + "InsecurePlatformWarning", + "SubjectAltNameWarning", + ) + + with pytest.warns() as warning_records: + warnings.simplefilter("always") + requests.get(f"https://localhost:{port}/", verify=ca_bundle) + + warning_records = [ + item + for item in warning_records + if item.category.__name__ != "ResourceWarning" + ] + + warnings_category = tuple(item.category.__name__ for item in warning_records) + assert warnings_category == warnings_expected + + def test_certificate_failure(self, httpbin_secure): + """ + When underlying SSL problems occur, an SSLError is raised. + """ + with pytest.raises(RequestsSSLError): + # Our local httpbin does not have a trusted CA, so this call will + # fail if we use our default trust bundle. + requests.get(httpbin_secure("status", "200")) + + def test_urlencoded_get_query_multivalued_param(self, httpbin): + r = requests.get(httpbin("get"), params={"test": ["foo", "baz"]}) + assert r.status_code == 200 + assert r.url == httpbin("get?test=foo&test=baz") + + def test_form_encoded_post_query_multivalued_element(self, httpbin): + r = requests.Request( + method="POST", url=httpbin("post"), data=dict(test=["foo", "baz"]) + ) + prep = r.prepare() + assert prep.body == "test=foo&test=baz" + + def test_different_encodings_dont_break_post(self, httpbin): + with open(__file__, "rb") as f: + r = requests.post( + httpbin("post"), + data={"stuff": json.dumps({"a": 123})}, + params={"blah": "asdf1234"}, + files={"file": ("test_requests.py", f)}, + ) + assert r.status_code == 200 + + def test_post_named_tempfile(self, httpbin): + with tempfile.NamedTemporaryFile(mode="w+") as f: + f.write("named temp file contents\n") + f.seek(0) + r = requests.post( + httpbin("post"), + files={"file": f}, + ) + assert r.status_code == 200 + assert r.json()["files"]["file"] == "named temp file contents\n" + + @pytest.mark.parametrize( + "data", + ( + {"stuff": "ëlïxr"}, + {"stuff": "ëlïxr".encode()}, + {"stuff": "elixr"}, + {"stuff": b"elixr"}, + ), + ) + def test_unicode_multipart_post(self, httpbin, data): + with open(__file__, "rb") as f: + r = requests.post( + httpbin("post"), + data=data, + files={"file": ("test_requests.py", f)}, + ) + assert r.status_code == 200 + + def test_unicode_multipart_post_fieldnames(self, httpbin): + filename = os.path.splitext(__file__)[0] + ".py" + with open(filename, "rb") as f: + r = requests.Request( + method="POST", + url=httpbin("post"), + data={b"stuff": "elixr"}, + files={"file": ("test_requests.py", f)}, + ) + prep = r.prepare() + + assert b'name="stuff"' in prep.body + assert b"name=\"b'stuff'\"" not in prep.body + + def test_unicode_method_name(self, httpbin): + with open(__file__, "rb") as f: + files = {"file": f} + r = requests.request( + method="POST", + url=httpbin("post"), + files=files, + ) + assert r.status_code == 200 + + def test_unicode_method_name_with_request_object(self, httpbin): + s = requests.Session() + with open(__file__, "rb") as f: + files = {"file": f} + req = requests.Request("POST", httpbin("post"), files=files) + prep = s.prepare_request(req) + assert isinstance(prep.method, builtin_str) + assert prep.method == "POST" + + resp = s.send(prep) + assert resp.status_code == 200 + + def test_non_prepared_request_error(self): + s = requests.Session() + req = requests.Request("POST", "/") + + with pytest.raises(ValueError) as e: + s.send(req) + assert str(e.value) == "You can only send PreparedRequests." + + def test_custom_content_type(self, httpbin): + with open(__file__, "rb") as f1: + with open(__file__, "rb") as f2: + data = {"stuff": json.dumps({"a": 123})} + files = { + "file1": ("test_requests.py", f1), + "file2": ("test_requests", f2, "text/py-content-type"), + } + r = requests.post(httpbin("post"), data=data, files=files) + assert r.status_code == 200 + assert b"text/py-content-type" in r.request.body + + def test_hook_receives_request_arguments(self, httpbin): + def hook(resp, **kwargs): + assert resp is not None + assert kwargs != {} + + s = requests.Session() + r = requests.Request("GET", httpbin(), hooks={"response": hook}) + prep = s.prepare_request(r) + s.send(prep) + + def test_session_hooks_are_used_with_no_request_hooks(self, httpbin): + def hook(*args, **kwargs): + pass + + s = requests.Session() + s.hooks["response"].append(hook) + r = requests.Request("GET", httpbin()) + prep = s.prepare_request(r) + assert prep.hooks["response"] != [] + assert prep.hooks["response"] == [hook] + + def test_session_hooks_are_overridden_by_request_hooks(self, httpbin): + def hook1(*args, **kwargs): + pass + + def hook2(*args, **kwargs): + pass + + assert hook1 is not hook2 + s = requests.Session() + s.hooks["response"].append(hook2) + r = requests.Request("GET", httpbin(), hooks={"response": [hook1]}) + prep = s.prepare_request(r) + assert prep.hooks["response"] == [hook1] + + def test_prepared_request_hook(self, httpbin): + def hook(resp, **kwargs): + resp.hook_working = True + return resp + + req = requests.Request("GET", httpbin(), hooks={"response": hook}) + prep = req.prepare() + + s = requests.Session() + s.proxies = getproxies() + resp = s.send(prep) + + assert hasattr(resp, "hook_working") + + def test_prepared_from_session(self, httpbin): + class DummyAuth(requests.auth.AuthBase): + def __call__(self, r): + r.headers["Dummy-Auth-Test"] = "dummy-auth-test-ok" + return r + + req = requests.Request("GET", httpbin("headers")) + assert not req.auth + + s = requests.Session() + s.auth = DummyAuth() + + prep = s.prepare_request(req) + resp = s.send(prep) + + assert resp.json()["headers"]["Dummy-Auth-Test"] == "dummy-auth-test-ok" + + def test_prepare_request_with_bytestring_url(self): + req = requests.Request("GET", b"https://httpbin.org/") + s = requests.Session() + prep = s.prepare_request(req) + assert prep.url == "https://httpbin.org/" + + def test_request_with_bytestring_host(self, httpbin): + s = requests.Session() + resp = s.request( + "GET", + httpbin("cookies/set?cookie=value"), + allow_redirects=False, + headers={"Host": b"httpbin.org"}, + ) + assert resp.cookies.get("cookie") == "value" + + def test_links(self): + r = requests.Response() + r.headers = { + "cache-control": "public, max-age=60, s-maxage=60", + "connection": "keep-alive", + "content-encoding": "gzip", + "content-type": "application/json; charset=utf-8", + "date": "Sat, 26 Jan 2013 16:47:56 GMT", + "etag": '"6ff6a73c0e446c1f61614769e3ceb778"', + "last-modified": "Sat, 26 Jan 2013 16:22:39 GMT", + "link": ( + "; rel="next", ; " + ' rel="last"' + ), + "server": "GitHub.com", + "status": "200 OK", + "vary": "Accept", + "x-content-type-options": "nosniff", + "x-github-media-type": "github.beta", + "x-ratelimit-limit": "60", + "x-ratelimit-remaining": "57", + } + assert r.links["next"]["rel"] == "next" + + def test_cookie_parameters(self): + key = "some_cookie" + value = "some_value" + secure = True + domain = "test.com" + rest = {"HttpOnly": True} + + jar = requests.cookies.RequestsCookieJar() + jar.set(key, value, secure=secure, domain=domain, rest=rest) + + assert len(jar) == 1 + assert "some_cookie" in jar + + cookie = list(jar)[0] + assert cookie.secure == secure + assert cookie.domain == domain + assert cookie._rest["HttpOnly"] == rest["HttpOnly"] + + def test_cookie_as_dict_keeps_len(self): + key = "some_cookie" + value = "some_value" + + key1 = "some_cookie1" + value1 = "some_value1" + + jar = requests.cookies.RequestsCookieJar() + jar.set(key, value) + jar.set(key1, value1) + + d1 = dict(jar) + d2 = dict(jar.iteritems()) + d3 = dict(jar.items()) + + assert len(jar) == 2 + assert len(d1) == 2 + assert len(d2) == 2 + assert len(d3) == 2 + + def test_cookie_as_dict_keeps_items(self): + key = "some_cookie" + value = "some_value" + + key1 = "some_cookie1" + value1 = "some_value1" + + jar = requests.cookies.RequestsCookieJar() + jar.set(key, value) + jar.set(key1, value1) + + d1 = dict(jar) + d2 = dict(jar.iteritems()) + d3 = dict(jar.items()) + + assert d1["some_cookie"] == "some_value" + assert d2["some_cookie"] == "some_value" + assert d3["some_cookie1"] == "some_value1" + + def test_cookie_as_dict_keys(self): + key = "some_cookie" + value = "some_value" + + key1 = "some_cookie1" + value1 = "some_value1" + + jar = requests.cookies.RequestsCookieJar() + jar.set(key, value) + jar.set(key1, value1) + + keys = jar.keys() + assert keys == list(keys) + # make sure one can use keys multiple times + assert list(keys) == list(keys) + + def test_cookie_as_dict_values(self): + key = "some_cookie" + value = "some_value" + + key1 = "some_cookie1" + value1 = "some_value1" + + jar = requests.cookies.RequestsCookieJar() + jar.set(key, value) + jar.set(key1, value1) + + values = jar.values() + assert values == list(values) + # make sure one can use values multiple times + assert list(values) == list(values) + + def test_cookie_as_dict_items(self): + key = "some_cookie" + value = "some_value" + + key1 = "some_cookie1" + value1 = "some_value1" + + jar = requests.cookies.RequestsCookieJar() + jar.set(key, value) + jar.set(key1, value1) + + items = jar.items() + assert items == list(items) + # make sure one can use items multiple times + assert list(items) == list(items) + + def test_cookie_duplicate_names_different_domains(self): + key = "some_cookie" + value = "some_value" + domain1 = "test1.com" + domain2 = "test2.com" + + jar = requests.cookies.RequestsCookieJar() + jar.set(key, value, domain=domain1) + jar.set(key, value, domain=domain2) + assert key in jar + items = jar.items() + assert len(items) == 2 + + # Verify that CookieConflictError is raised if domain is not specified + with pytest.raises(requests.cookies.CookieConflictError): + jar.get(key) + + # Verify that CookieConflictError is not raised if domain is specified + cookie = jar.get(key, domain=domain1) + assert cookie == value + + def test_cookie_duplicate_names_raises_cookie_conflict_error(self): + key = "some_cookie" + value = "some_value" + path = "some_path" + + jar = requests.cookies.RequestsCookieJar() + jar.set(key, value, path=path) + jar.set(key, value) + with pytest.raises(requests.cookies.CookieConflictError): + jar.get(key) + + def test_cookie_policy_copy(self): + class MyCookiePolicy(cookielib.DefaultCookiePolicy): + pass + + jar = requests.cookies.RequestsCookieJar() + jar.set_policy(MyCookiePolicy()) + assert isinstance(jar.copy().get_policy(), MyCookiePolicy) + + def test_time_elapsed_blank(self, httpbin): + r = requests.get(httpbin("get")) + td = r.elapsed + total_seconds = ( + td.microseconds + (td.seconds + td.days * 24 * 3600) * 10**6 + ) / 10**6 + assert total_seconds > 0.0 + + def test_empty_response_has_content_none(self): + r = requests.Response() + assert r.content is None + + def test_response_is_iterable(self): + r = requests.Response() + io = StringIO.StringIO("abc") + read_ = io.read + + def read_mock(amt, decode_content=None): + return read_(amt) + + setattr(io, "read", read_mock) + r.raw = io + assert next(iter(r)) + io.close() + + def test_response_decode_unicode(self): + """When called with decode_unicode, Response.iter_content should always + return unicode. + """ + r = requests.Response() + r._content_consumed = True + r._content = b"the content" + r.encoding = "ascii" + + chunks = r.iter_content(decode_unicode=True) + assert all(isinstance(chunk, str) for chunk in chunks) + + # also for streaming + r = requests.Response() + r.raw = io.BytesIO(b"the content") + r.encoding = "ascii" + chunks = r.iter_content(decode_unicode=True) + assert all(isinstance(chunk, str) for chunk in chunks) + + def test_response_reason_unicode(self): + # check for unicode HTTP status + r = requests.Response() + r.url = "unicode URL" + r.reason = "Komponenttia ei löydy".encode() + r.status_code = 404 + r.encoding = None + assert not r.ok # old behaviour - crashes here + + def test_response_reason_unicode_fallback(self): + # check raise_status falls back to ISO-8859-1 + r = requests.Response() + r.url = "some url" + reason = "Komponenttia ei löydy" + r.reason = reason.encode("latin-1") + r.status_code = 500 + r.encoding = None + with pytest.raises(requests.exceptions.HTTPError) as e: + r.raise_for_status() + assert reason in e.value.args[0] + + def test_response_chunk_size_type(self): + """Ensure that chunk_size is passed as None or an integer, otherwise + raise a TypeError. + """ + r = requests.Response() + r.raw = io.BytesIO(b"the content") + chunks = r.iter_content(1) + assert all(len(chunk) == 1 for chunk in chunks) + + r = requests.Response() + r.raw = io.BytesIO(b"the content") + chunks = r.iter_content(None) + assert list(chunks) == [b"the content"] + + r = requests.Response() + r.raw = io.BytesIO(b"the content") + with pytest.raises(TypeError): + chunks = r.iter_content("1024") + + @pytest.mark.parametrize( + "exception, args, expected", + ( + (urllib3.exceptions.ProtocolError, tuple(), ChunkedEncodingError), + (urllib3.exceptions.DecodeError, tuple(), ContentDecodingError), + (urllib3.exceptions.ReadTimeoutError, (None, "", ""), ConnectionError), + (urllib3.exceptions.SSLError, tuple(), RequestsSSLError), + ), + ) + def test_iter_content_wraps_exceptions(self, httpbin, exception, args, expected): + r = requests.Response() + r.raw = mock.Mock() + # ReadTimeoutError can't be initialized by mock + # so we'll manually create the instance with args + r.raw.stream.side_effect = exception(*args) + + with pytest.raises(expected): + next(r.iter_content(1024)) + + def test_request_and_response_are_pickleable(self, httpbin): + r = requests.get(httpbin("get")) + + # verify we can pickle the original request + assert pickle.loads(pickle.dumps(r.request)) + + # verify we can pickle the response and that we have access to + # the original request. + pr = pickle.loads(pickle.dumps(r)) + assert r.request.url == pr.request.url + assert r.request.headers == pr.request.headers + + def test_prepared_request_is_pickleable(self, httpbin): + p = requests.Request("GET", httpbin("get")).prepare() + + # Verify PreparedRequest can be pickled and unpickled + r = pickle.loads(pickle.dumps(p)) + assert r.url == p.url + assert r.headers == p.headers + assert r.body == p.body + + # Verify unpickled PreparedRequest sends properly + s = requests.Session() + resp = s.send(r) + assert resp.status_code == 200 + + def test_prepared_request_with_file_is_pickleable(self, httpbin): + with open(__file__, "rb") as f: + r = requests.Request("POST", httpbin("post"), files={"file": f}) + p = r.prepare() + + # Verify PreparedRequest can be pickled and unpickled + r = pickle.loads(pickle.dumps(p)) + assert r.url == p.url + assert r.headers == p.headers + assert r.body == p.body + + # Verify unpickled PreparedRequest sends properly + s = requests.Session() + resp = s.send(r) + assert resp.status_code == 200 + + def test_prepared_request_with_hook_is_pickleable(self, httpbin): + r = requests.Request("GET", httpbin("get"), hooks=default_hooks()) + p = r.prepare() + + # Verify PreparedRequest can be pickled + r = pickle.loads(pickle.dumps(p)) + assert r.url == p.url + assert r.headers == p.headers + assert r.body == p.body + assert r.hooks == p.hooks + + # Verify unpickled PreparedRequest sends properly + s = requests.Session() + resp = s.send(r) + assert resp.status_code == 200 + + def test_cannot_send_unprepared_requests(self, httpbin): + r = requests.Request(url=httpbin()) + with pytest.raises(ValueError): + requests.Session().send(r) + + def test_http_error(self): + error = requests.exceptions.HTTPError() + assert not error.response + response = requests.Response() + error = requests.exceptions.HTTPError(response=response) + assert error.response == response + error = requests.exceptions.HTTPError("message", response=response) + assert str(error) == "message" + assert error.response == response + + def test_session_pickling(self, httpbin): + r = requests.Request("GET", httpbin("get")) + s = requests.Session() + + s = pickle.loads(pickle.dumps(s)) + s.proxies = getproxies() + + r = s.send(r.prepare()) + assert r.status_code == 200 + + def test_fixes_1329(self, httpbin): + """Ensure that header updates are done case-insensitively.""" + s = requests.Session() + s.headers.update({"ACCEPT": "BOGUS"}) + s.headers.update({"accept": "application/json"}) + r = s.get(httpbin("get")) + headers = r.request.headers + assert headers["accept"] == "application/json" + assert headers["Accept"] == "application/json" + assert headers["ACCEPT"] == "application/json" + + def test_uppercase_scheme_redirect(self, httpbin): + parts = urlparse(httpbin("html")) + url = "HTTP://" + parts.netloc + parts.path + r = requests.get(httpbin("redirect-to"), params={"url": url}) + assert r.status_code == 200 + assert r.url.lower() == url.lower() + + def test_transport_adapter_ordering(self): + s = requests.Session() + order = ["https://", "http://"] + assert order == list(s.adapters) + s.mount("http://git", HTTPAdapter()) + s.mount("http://github", HTTPAdapter()) + s.mount("http://github.com", HTTPAdapter()) + s.mount("http://github.com/about/", HTTPAdapter()) + order = [ + "http://github.com/about/", + "http://github.com", + "http://github", + "http://git", + "https://", + "http://", + ] + assert order == list(s.adapters) + s.mount("http://gittip", HTTPAdapter()) + s.mount("http://gittip.com", HTTPAdapter()) + s.mount("http://gittip.com/about/", HTTPAdapter()) + order = [ + "http://github.com/about/", + "http://gittip.com/about/", + "http://github.com", + "http://gittip.com", + "http://github", + "http://gittip", + "http://git", + "https://", + "http://", + ] + assert order == list(s.adapters) + s2 = requests.Session() + s2.adapters = {"http://": HTTPAdapter()} + s2.mount("https://", HTTPAdapter()) + assert "http://" in s2.adapters + assert "https://" in s2.adapters + + def test_session_get_adapter_prefix_matching(self): + prefix = "https://example.com" + more_specific_prefix = prefix + "/some/path" + + url_matching_only_prefix = prefix + "/another/path" + url_matching_more_specific_prefix = more_specific_prefix + "/longer/path" + url_not_matching_prefix = "https://another.example.com/" + + s = requests.Session() + prefix_adapter = HTTPAdapter() + more_specific_prefix_adapter = HTTPAdapter() + s.mount(prefix, prefix_adapter) + s.mount(more_specific_prefix, more_specific_prefix_adapter) + + assert s.get_adapter(url_matching_only_prefix) is prefix_adapter + assert ( + s.get_adapter(url_matching_more_specific_prefix) + is more_specific_prefix_adapter + ) + assert s.get_adapter(url_not_matching_prefix) not in ( + prefix_adapter, + more_specific_prefix_adapter, + ) + + def test_session_get_adapter_prefix_matching_mixed_case(self): + mixed_case_prefix = "hTtPs://eXamPle.CoM/MixEd_CAse_PREfix" + url_matching_prefix = mixed_case_prefix + "/full_url" + + s = requests.Session() + my_adapter = HTTPAdapter() + s.mount(mixed_case_prefix, my_adapter) + + assert s.get_adapter(url_matching_prefix) is my_adapter + + def test_session_get_adapter_prefix_matching_is_case_insensitive(self): + mixed_case_prefix = "hTtPs://eXamPle.CoM/MixEd_CAse_PREfix" + url_matching_prefix_with_different_case = ( + "HtTpS://exaMPLe.cOm/MiXeD_caSE_preFIX/another_url" + ) + + s = requests.Session() + my_adapter = HTTPAdapter() + s.mount(mixed_case_prefix, my_adapter) + + assert s.get_adapter(url_matching_prefix_with_different_case) is my_adapter + + def test_session_get_adapter_prefix_with_trailing_slash(self): + # from issue #6935 + prefix = "https://example.com/" # trailing slash + url_matching_prefix = "https://example.com/some/path" + url_not_matching_prefix = "https://example.com.other.com/some/path" + + s = requests.Session() + adapter = HTTPAdapter() + s.mount(prefix, adapter) + + assert s.get_adapter(url_matching_prefix) is adapter + assert s.get_adapter(url_not_matching_prefix) is not adapter + + def test_session_get_adapter_prefix_without_trailing_slash(self): + # from issue #6935 + prefix = "https://example.com" # no trailing slash + url_matching_prefix = "https://example.com/some/path" + url_extended_hostname = "https://example.com.other.com/some/path" + + s = requests.Session() + adapter = HTTPAdapter() + s.mount(prefix, adapter) + + assert s.get_adapter(url_matching_prefix) is adapter + assert s.get_adapter(url_extended_hostname) is adapter + + def test_header_remove_is_case_insensitive(self, httpbin): + # From issue #1321 + s = requests.Session() + s.headers["foo"] = "bar" + r = s.get(httpbin("get"), headers={"FOO": None}) + assert "foo" not in r.request.headers + + def test_params_are_merged_case_sensitive(self, httpbin): + s = requests.Session() + s.params["foo"] = "bar" + r = s.get(httpbin("get"), params={"FOO": "bar"}) + assert r.json()["args"] == {"foo": "bar", "FOO": "bar"} + + def test_long_authinfo_in_url(self): + url = "http://{}:{}@{}:9000/path?query#frag".format( + "E8A3BE87-9E3F-4620-8858-95478E385B5B", + "EA770032-DA4D-4D84-8CE9-29C6D910BF1E", + "exactly-------------sixty-----------three------------characters", + ) + r = requests.Request("GET", url).prepare() + assert r.url == url + + def test_header_keys_are_native(self, httpbin): + headers = {"unicode": "blah", b"byte": "blah"} + r = requests.Request("GET", httpbin("get"), headers=headers) + p = r.prepare() + + # This is testing that they are builtin strings. A bit weird, but there + # we go. + assert "unicode" in p.headers.keys() + assert "byte" in p.headers.keys() + + def test_header_validation(self, httpbin): + """Ensure prepare_headers regex isn't flagging valid header contents.""" + valid_headers = { + "foo": "bar baz qux", + "bar": b"fbbq", + "baz": "", + "qux": "1", + } + r = requests.get(httpbin("get"), headers=valid_headers) + for key in valid_headers.keys(): + assert valid_headers[key] == r.request.headers[key] + + @pytest.mark.parametrize( + "invalid_header, key", + ( + ({"foo": 3}, "foo"), + ({"bar": {"foo": "bar"}}, "bar"), + ({"baz": ["foo", "bar"]}, "baz"), + ), + ) + def test_header_value_not_str(self, httpbin, invalid_header, key): + """Ensure the header value is of type string or bytes as + per discussion in GH issue #3386 + """ + with pytest.raises(InvalidHeader) as excinfo: + requests.get(httpbin("get"), headers=invalid_header) + assert key in str(excinfo.value) + + @pytest.mark.parametrize( + "invalid_header", + ( + {"foo": "bar\r\nbaz: qux"}, + {"foo": "bar\n\rbaz: qux"}, + {"foo": "bar\nbaz: qux"}, + {"foo": "bar\rbaz: qux"}, + {"fo\ro": "bar"}, + {"fo\r\no": "bar"}, + {"fo\n\ro": "bar"}, + {"fo\no": "bar"}, + {"foo": "bar\n"}, + {"foo\n": "bar"}, + {"foo": "bar\r\n"}, + {"foo": "\n"}, + {"foo": "\r\n"}, + ), + ) + def test_header_no_return_chars(self, httpbin, invalid_header): + """Ensure that a header containing return character sequences raise an + exception. Otherwise, multiple headers are created from single string. + """ + with pytest.raises(InvalidHeader): + requests.get(httpbin("get"), headers=invalid_header) + + @pytest.mark.parametrize( + "invalid_header", + ( + {" foo": "bar"}, + {"\tfoo": "bar"}, + {" foo": "bar"}, + {"foo": " bar"}, + {"foo": " bar"}, + {"foo": "\tbar"}, + {" ": "bar"}, + ), + ) + def test_header_no_leading_space(self, httpbin, invalid_header): + """Ensure headers containing leading whitespace raise + InvalidHeader Error before sending. + """ + with pytest.raises(InvalidHeader): + requests.get(httpbin("get"), headers=invalid_header) + + def test_header_with_subclass_types(self, httpbin): + """If the subclasses does not behave *exactly* like + the base bytes/str classes, this is not supported. + This test is for backwards compatibility. + """ + + class MyString(str): + pass + + class MyBytes(bytes): + pass + + r_str = requests.get(httpbin("get"), headers={MyString("x-custom"): "myheader"}) + assert r_str.request.headers["x-custom"] == "myheader" + + r_bytes = requests.get( + httpbin("get"), headers={MyBytes(b"x-custom"): b"myheader"} + ) + assert r_bytes.request.headers["x-custom"] == b"myheader" + + r_mixed = requests.get( + httpbin("get"), headers={MyString("x-custom"): MyBytes(b"myheader")} + ) + assert r_mixed.request.headers["x-custom"] == b"myheader" + + @pytest.mark.parametrize("files", ("foo", b"foo", bytearray(b"foo"))) + def test_can_send_objects_with_files(self, httpbin, files): + data = {"a": "this is a string"} + files = {"b": files} + r = requests.Request("POST", httpbin("post"), data=data, files=files) + p = r.prepare() + assert "multipart/form-data" in p.headers["Content-Type"] + + def test_can_send_file_object_with_non_string_filename(self, httpbin): + f = io.BytesIO() + f.name = 2 + r = requests.Request("POST", httpbin("post"), files={"f": f}) + p = r.prepare() + + assert "multipart/form-data" in p.headers["Content-Type"] + + def test_autoset_header_values_are_native(self, httpbin): + data = "this is a string" + length = "16" + req = requests.Request("POST", httpbin("post"), data=data) + p = req.prepare() + + assert p.headers["Content-Length"] == length + + def test_nonhttp_schemes_dont_check_URLs(self): + test_urls = ( + "data:image/gif;base64,R0lGODlhAQABAHAAACH5BAUAAAAALAAAAAABAAEAAAICRAEAOw==", + "file:///etc/passwd", + "magnet:?xt=urn:btih:be08f00302bc2d1d3cfa3af02024fa647a271431", + ) + for test_url in test_urls: + req = requests.Request("GET", test_url) + preq = req.prepare() + assert test_url == preq.url + + def test_auth_is_stripped_on_http_downgrade( + self, httpbin, httpbin_secure, httpbin_ca_bundle + ): + r = requests.get( + httpbin_secure("redirect-to"), + params={"url": httpbin("get")}, + auth=("user", "pass"), + verify=httpbin_ca_bundle, + ) + assert r.history[0].request.headers["Authorization"] + assert "Authorization" not in r.request.headers + + def test_auth_is_retained_for_redirect_on_host(self, httpbin): + r = requests.get(httpbin("redirect/1"), auth=("user", "pass")) + h1 = r.history[0].request.headers["Authorization"] + h2 = r.request.headers["Authorization"] + + assert h1 == h2 + + def test_should_strip_auth_host_change(self): + s = requests.Session() + assert s.should_strip_auth( + "http://example.com/foo", "http://another.example.com/" + ) + + def test_should_strip_auth_http_downgrade(self): + s = requests.Session() + assert s.should_strip_auth("https://example.com/foo", "http://example.com/bar") + + def test_should_strip_auth_https_upgrade(self): + s = requests.Session() + assert not s.should_strip_auth( + "http://example.com/foo", "https://example.com/bar" + ) + assert not s.should_strip_auth( + "http://example.com:80/foo", "https://example.com/bar" + ) + assert not s.should_strip_auth( + "http://example.com/foo", "https://example.com:443/bar" + ) + # Non-standard ports should trigger stripping + assert s.should_strip_auth( + "http://example.com:8080/foo", "https://example.com/bar" + ) + assert s.should_strip_auth( + "http://example.com/foo", "https://example.com:8443/bar" + ) + + def test_should_strip_auth_port_change(self): + s = requests.Session() + assert s.should_strip_auth( + "http://example.com:1234/foo", "https://example.com:4321/bar" + ) + + @pytest.mark.parametrize( + "old_uri, new_uri", + ( + ("https://example.com:443/foo", "https://example.com/bar"), + ("http://example.com:80/foo", "http://example.com/bar"), + ("https://example.com/foo", "https://example.com:443/bar"), + ("http://example.com/foo", "http://example.com:80/bar"), + ), + ) + def test_should_strip_auth_default_port(self, old_uri, new_uri): + s = requests.Session() + assert not s.should_strip_auth(old_uri, new_uri) + + def test_manual_redirect_with_partial_body_read(self, httpbin): + s = requests.Session() + r1 = s.get(httpbin("redirect/2"), allow_redirects=False, stream=True) + assert r1.is_redirect + rg = s.resolve_redirects(r1, r1.request, stream=True) + + # read only the first eight bytes of the response body, + # then follow the redirect + r1.iter_content(8) + r2 = next(rg) + assert r2.is_redirect + + # read all of the response via iter_content, + # then follow the redirect + for _ in r2.iter_content(): + pass + r3 = next(rg) + assert not r3.is_redirect + + def test_prepare_body_position_non_stream(self): + data = b"the data" + prep = requests.Request("GET", "http://example.com", data=data).prepare() + assert prep._body_position is None + + def test_rewind_body(self): + data = io.BytesIO(b"the data") + prep = requests.Request("GET", "http://example.com", data=data).prepare() + assert prep._body_position == 0 + assert prep.body.read() == b"the data" + + # the data has all been read + assert prep.body.read() == b"" + + # rewind it back + requests.utils.rewind_body(prep) + assert prep.body.read() == b"the data" + + def test_rewind_partially_read_body(self): + data = io.BytesIO(b"the data") + data.read(4) # read some data + prep = requests.Request("GET", "http://example.com", data=data).prepare() + assert prep._body_position == 4 + assert prep.body.read() == b"data" + + # the data has all been read + assert prep.body.read() == b"" + + # rewind it back + requests.utils.rewind_body(prep) + assert prep.body.read() == b"data" + + def test_rewind_body_no_seek(self): + class BadFileObj: + def __init__(self, data): + self.data = data + + def tell(self): + return 0 + + def __iter__(self): + return + + data = BadFileObj("the data") + prep = requests.Request("GET", "http://example.com", data=data).prepare() + assert prep._body_position == 0 + + with pytest.raises(UnrewindableBodyError) as e: + requests.utils.rewind_body(prep) + + assert "Unable to rewind request body" in str(e) + + def test_rewind_body_failed_seek(self): + class BadFileObj: + def __init__(self, data): + self.data = data + + def tell(self): + return 0 + + def seek(self, pos, whence=0): + raise OSError() + + def __iter__(self): + return + + data = BadFileObj("the data") + prep = requests.Request("GET", "http://example.com", data=data).prepare() + assert prep._body_position == 0 + + with pytest.raises(UnrewindableBodyError) as e: + requests.utils.rewind_body(prep) + + assert "error occurred when rewinding request body" in str(e) + + def test_rewind_body_failed_tell(self): + class BadFileObj: + def __init__(self, data): + self.data = data + + def tell(self): + raise OSError() + + def __iter__(self): + return + + data = BadFileObj("the data") + prep = requests.Request("GET", "http://example.com", data=data).prepare() + assert prep._body_position is not None + + with pytest.raises(UnrewindableBodyError) as e: + requests.utils.rewind_body(prep) + + assert "Unable to rewind request body" in str(e) + + def test_getattr_proxy_stream_follows_redirect(self, httpbin): + """Ensure stream wrappers that don't implement __iter__ directly are still detected.""" + + class AttrProxy: + def __init__(self): + self._file = io.BytesIO(b"data") + + def __getattr__(self, name): + return getattr(self._file, name) + + r = requests.post( + httpbin("redirect-to?url=/post&status_code=307"), data=AttrProxy() + ) + assert r.json()["data"] == "data" + + def _patch_adapter_gzipped_redirect(self, session, url): + adapter = session.get_adapter(url=url) + org_build_response = adapter.build_response + self._patched_response = False + + def build_response(*args, **kwargs): + resp = org_build_response(*args, **kwargs) + if not self._patched_response: + resp.raw.headers["content-encoding"] = "gzip" + self._patched_response = True + return resp + + adapter.build_response = build_response + + def test_redirect_with_wrong_gzipped_header(self, httpbin): + s = requests.Session() + url = httpbin("redirect/1") + self._patch_adapter_gzipped_redirect(s, url) + s.get(url) + + @pytest.mark.parametrize( + "username, password, auth_str", + ( + ("test", "test", "Basic dGVzdDp0ZXN0"), + ( + "имя".encode(), + "пароль".encode(), + "Basic 0LjQvNGPOtC/0LDRgNC+0LvRjA==", + ), + ), + ) + def test_basic_auth_str_is_always_native(self, username, password, auth_str): + s = _basic_auth_str(username, password) + assert isinstance(s, builtin_str) + assert s == auth_str + + def test_requests_history_is_saved(self, httpbin): + r = requests.get(httpbin("redirect/5")) + total = r.history[-1].history + i = 0 + for item in r.history: + assert item.history == total[0:i] + i += 1 + + def test_json_param_post_content_type_works(self, httpbin): + r = requests.post(httpbin("post"), json={"life": 42}) + assert r.status_code == 200 + assert "application/json" in r.request.headers["Content-Type"] + assert {"life": 42} == r.json()["json"] + + def test_json_param_post_should_not_override_data_param(self, httpbin): + r = requests.Request( + method="POST", + url=httpbin("post"), + data={"stuff": "elixr"}, + json={"music": "flute"}, + ) + prep = r.prepare() + assert "stuff=elixr" == prep.body + + def test_response_iter_lines(self, httpbin): + r = requests.get(httpbin("stream/4"), stream=True) + assert r.status_code == 200 + + it = r.iter_lines() + next(it) + assert len(list(it)) == 3 + + def test_response_context_manager(self, httpbin): + with requests.get(httpbin("stream/4"), stream=True) as response: + assert isinstance(response, requests.Response) + + assert response.raw.closed + + def test_unconsumed_session_response_closes_connection(self, httpbin): + s = requests.session() + + with contextlib.closing(s.get(httpbin("stream/4"), stream=True)) as response: + pass + + assert response._content_consumed is False + assert response.raw.closed + + @pytest.mark.xfail + def test_response_iter_lines_reentrant(self, httpbin): + """Response.iter_lines() is not reentrant safe""" + r = requests.get(httpbin("stream/4"), stream=True) + assert r.status_code == 200 + + next(r.iter_lines()) + assert len(list(r.iter_lines())) == 3 + + def test_session_close_proxy_clear(self): + proxies = { + "one": mock.Mock(), + "two": mock.Mock(), + } + session = requests.Session() + with mock.patch.dict(session.adapters["http://"].proxy_manager, proxies): + session.close() + proxies["one"].clear.assert_called_once_with() + proxies["two"].clear.assert_called_once_with() + + def test_proxy_auth(self): + adapter = HTTPAdapter() + headers = adapter.proxy_headers("http://user:pass@httpbin.org") + assert headers == {"Proxy-Authorization": "Basic dXNlcjpwYXNz"} + + def test_proxy_auth_empty_pass(self): + adapter = HTTPAdapter() + headers = adapter.proxy_headers("http://user:@httpbin.org") + assert headers == {"Proxy-Authorization": "Basic dXNlcjo="} + + def test_response_json_when_content_is_None(self, httpbin): + r = requests.get(httpbin("/status/204")) + # Make sure r.content is None + r.status_code = 0 + r._content = False + r._content_consumed = False + + assert r.content is None + with pytest.raises(ValueError): + r.json() + + def test_response_without_release_conn(self): + """Test `close` call for non-urllib3-like raw objects. + Should work when `release_conn` attr doesn't exist on `response.raw`. + """ + resp = requests.Response() + resp.raw = StringIO.StringIO("test") + assert not resp.raw.closed + resp.close() + assert resp.raw.closed + + def test_empty_stream_with_auth_does_not_set_content_length_header(self, httpbin): + """Ensure that a byte stream with size 0 will not set both a Content-Length + and Transfer-Encoding header. + """ + auth = ("user", "pass") + url = httpbin("post") + file_obj = io.BytesIO(b"") + r = requests.Request("POST", url, auth=auth, data=file_obj) + prepared_request = r.prepare() + assert "Transfer-Encoding" in prepared_request.headers + assert "Content-Length" not in prepared_request.headers + + def test_stream_with_auth_does_not_set_transfer_encoding_header(self, httpbin): + """Ensure that a byte stream with size > 0 will not set both a Content-Length + and Transfer-Encoding header. + """ + auth = ("user", "pass") + url = httpbin("post") + file_obj = io.BytesIO(b"test data") + r = requests.Request("POST", url, auth=auth, data=file_obj) + prepared_request = r.prepare() + assert "Transfer-Encoding" not in prepared_request.headers + assert "Content-Length" in prepared_request.headers + + def test_chunked_upload_does_not_set_content_length_header(self, httpbin): + """Ensure that requests with a generator body stream using + Transfer-Encoding: chunked, not a Content-Length header. + """ + data = (i for i in [b"a", b"b", b"c"]) + url = httpbin("post") + r = requests.Request("POST", url, data=data) + prepared_request = r.prepare() + assert "Transfer-Encoding" in prepared_request.headers + assert "Content-Length" not in prepared_request.headers + + def test_custom_redirect_mixin(self, httpbin): + """Tests a custom mixin to overwrite ``get_redirect_target``. + + Ensures a subclassed ``requests.Session`` can handle a certain type of + malformed redirect responses. + + 1. original request receives a proper response: 302 redirect + 2. following the redirect, a malformed response is given: + status code = HTTP 200 + location = alternate url + 3. the custom session catches the edge case and follows the redirect + """ + url_final = httpbin("html") + querystring_malformed = urlencode({"location": url_final}) + url_redirect_malformed = httpbin("response-headers?%s" % querystring_malformed) + querystring_redirect = urlencode({"url": url_redirect_malformed}) + url_redirect = httpbin("redirect-to?%s" % querystring_redirect) + urls_test = [ + url_redirect, + url_redirect_malformed, + url_final, + ] + + class CustomRedirectSession(requests.Session): + def get_redirect_target(self, resp): + # default behavior + if resp.is_redirect: + return resp.headers["location"] + # edge case - check to see if 'location' is in headers anyways + location = resp.headers.get("location") + if location and (location != resp.url): + return location + return None + + session = CustomRedirectSession() + r = session.get(urls_test[0]) + assert len(r.history) == 2 + assert r.status_code == 200 + assert r.history[0].status_code == 302 + assert r.history[0].is_redirect + assert r.history[1].status_code == 200 + assert not r.history[1].is_redirect + assert r.url == urls_test[2] + + +class TestCaseInsensitiveDict: + @pytest.mark.parametrize( + "cid", + ( + CaseInsensitiveDict({"Foo": "foo", "BAr": "bar"}), + CaseInsensitiveDict([("Foo", "foo"), ("BAr", "bar")]), + CaseInsensitiveDict(FOO="foo", BAr="bar"), + ), + ) + def test_init(self, cid): + assert len(cid) == 2 + assert "foo" in cid + assert "bar" in cid + + def test_docstring_example(self): + cid = CaseInsensitiveDict() + cid["Accept"] = "application/json" + assert cid["aCCEPT"] == "application/json" + assert list(cid) == ["Accept"] + + def test_len(self): + cid = CaseInsensitiveDict({"a": "a", "b": "b"}) + cid["A"] = "a" + assert len(cid) == 2 + + def test_getitem(self): + cid = CaseInsensitiveDict({"Spam": "blueval"}) + assert cid["spam"] == "blueval" + assert cid["SPAM"] == "blueval" + + def test_fixes_649(self): + """__setitem__ should behave case-insensitively.""" + cid = CaseInsensitiveDict() + cid["spam"] = "oneval" + cid["Spam"] = "twoval" + cid["sPAM"] = "redval" + cid["SPAM"] = "blueval" + assert cid["spam"] == "blueval" + assert cid["SPAM"] == "blueval" + assert list(cid.keys()) == ["SPAM"] + + def test_delitem(self): + cid = CaseInsensitiveDict() + cid["Spam"] = "someval" + del cid["sPam"] + assert "spam" not in cid + assert len(cid) == 0 + + def test_contains(self): + cid = CaseInsensitiveDict() + cid["Spam"] = "someval" + assert "Spam" in cid + assert "spam" in cid + assert "SPAM" in cid + assert "sPam" in cid + assert "notspam" not in cid + + def test_get(self): + cid = CaseInsensitiveDict() + cid["spam"] = "oneval" + cid["SPAM"] = "blueval" + assert cid.get("spam") == "blueval" + assert cid.get("SPAM") == "blueval" + assert cid.get("sPam") == "blueval" + assert cid.get("notspam", "default") == "default" + + def test_update(self): + cid = CaseInsensitiveDict() + cid["spam"] = "blueval" + cid.update({"sPam": "notblueval"}) + assert cid["spam"] == "notblueval" + cid = CaseInsensitiveDict({"Foo": "foo", "BAr": "bar"}) + cid.update({"fOO": "anotherfoo", "bAR": "anotherbar"}) + assert len(cid) == 2 + assert cid["foo"] == "anotherfoo" + assert cid["bar"] == "anotherbar" + + def test_update_retains_unchanged(self): + cid = CaseInsensitiveDict({"foo": "foo", "bar": "bar"}) + cid.update({"foo": "newfoo"}) + assert cid["bar"] == "bar" + + def test_iter(self): + cid = CaseInsensitiveDict({"Spam": "spam", "Eggs": "eggs"}) + keys = frozenset(["Spam", "Eggs"]) + assert frozenset(iter(cid)) == keys + + def test_equality(self): + cid = CaseInsensitiveDict({"SPAM": "blueval", "Eggs": "redval"}) + othercid = CaseInsensitiveDict({"spam": "blueval", "eggs": "redval"}) + assert cid == othercid + del othercid["spam"] + assert cid != othercid + assert cid == {"spam": "blueval", "eggs": "redval"} + assert cid != object() + + def test_setdefault(self): + cid = CaseInsensitiveDict({"Spam": "blueval"}) + assert cid.setdefault("spam", "notblueval") == "blueval" + assert cid.setdefault("notspam", "notblueval") == "notblueval" + + def test_lower_items(self): + cid = CaseInsensitiveDict( + { + "Accept": "application/json", + "user-Agent": "requests", + } + ) + keyset = frozenset(lowerkey for lowerkey, v in cid.lower_items()) + lowerkeyset = frozenset(["accept", "user-agent"]) + assert keyset == lowerkeyset + + def test_preserve_key_case(self): + cid = CaseInsensitiveDict( + { + "Accept": "application/json", + "user-Agent": "requests", + } + ) + keyset = frozenset(["Accept", "user-Agent"]) + assert frozenset(i[0] for i in cid.items()) == keyset + assert frozenset(cid.keys()) == keyset + assert frozenset(cid) == keyset + + def test_preserve_last_key_case(self): + cid = CaseInsensitiveDict( + { + "Accept": "application/json", + "user-Agent": "requests", + } + ) + cid.update({"ACCEPT": "application/json"}) + cid["USER-AGENT"] = "requests" + keyset = frozenset(["ACCEPT", "USER-AGENT"]) + assert frozenset(i[0] for i in cid.items()) == keyset + assert frozenset(cid.keys()) == keyset + assert frozenset(cid) == keyset + + def test_copy(self): + cid = CaseInsensitiveDict( + { + "Accept": "application/json", + "user-Agent": "requests", + } + ) + cid_copy = cid.copy() + assert cid == cid_copy + cid["changed"] = True + assert cid != cid_copy + + +class TestMorselToCookieExpires: + """Tests for morsel_to_cookie when morsel contains expires.""" + + def test_expires_valid_str(self): + """Test case where we convert expires from string time.""" + + morsel = Morsel() + morsel["expires"] = "Thu, 01-Jan-1970 00:00:01 GMT" + cookie = morsel_to_cookie(morsel) + assert cookie.expires == 1 + + @pytest.mark.parametrize( + "value, exception", + ( + (100, TypeError), + ("woops", ValueError), + ), + ) + def test_expires_invalid_int(self, value, exception): + """Test case where an invalid type is passed for expires.""" + morsel = Morsel() + morsel["expires"] = value + with pytest.raises(exception): + morsel_to_cookie(morsel) + + def test_expires_none(self): + """Test case where expires is None.""" + + morsel = Morsel() + morsel["expires"] = None + cookie = morsel_to_cookie(morsel) + assert cookie.expires is None + + +class TestMorselToCookieMaxAge: + """Tests for morsel_to_cookie when morsel contains max-age.""" + + def test_max_age_valid_int(self): + """Test case where a valid max age in seconds is passed.""" + + morsel = Morsel() + morsel["max-age"] = 60 + cookie = morsel_to_cookie(morsel) + assert isinstance(cookie.expires, int) + + def test_max_age_invalid_str(self): + """Test case where a invalid max age is passed.""" + + morsel = Morsel() + morsel["max-age"] = "woops" + with pytest.raises(TypeError): + morsel_to_cookie(morsel) + + +class TestTimeout: + def test_stream_timeout(self, httpbin): + try: + requests.get(httpbin("delay/10"), timeout=2.0) + except requests.exceptions.Timeout as e: + assert "Read timed out" in e.args[0].args[0] + + @pytest.mark.parametrize( + "timeout, error_text", + ( + ((3, 4, 5), "(connect, read)"), + ("foo", "must be an int, float or None"), + ), + ) + def test_invalid_timeout(self, httpbin, timeout, error_text): + with pytest.raises(ValueError) as e: + requests.get(httpbin("get"), timeout=timeout) + assert error_text in str(e) + + @pytest.mark.parametrize("timeout", (None, Urllib3Timeout(connect=None, read=None))) + def test_none_timeout(self, httpbin, timeout): + """Check that you can set None as a valid timeout value. + + To actually test this behavior, we'd want to check that setting the + timeout to None actually lets the request block past the system default + timeout. However, this would make the test suite unbearably slow. + Instead we verify that setting the timeout to None does not prevent the + request from succeeding. + """ + r = requests.get(httpbin("get"), timeout=timeout) + assert r.status_code == 200 + + @pytest.mark.parametrize( + "timeout", ((None, 0.1), Urllib3Timeout(connect=None, read=0.1)) + ) + def test_read_timeout(self, httpbin, timeout): + try: + requests.get(httpbin("delay/10"), timeout=timeout) + pytest.fail("The recv() request should time out.") + except ReadTimeout: + pass + + @pytest.mark.parametrize( + "timeout", ((0.1, None), Urllib3Timeout(connect=0.1, read=None)) + ) + def test_connect_timeout(self, timeout): + try: + requests.get(TARPIT, timeout=timeout) + pytest.fail("The connect() request should time out.") + except ConnectTimeout as e: + assert isinstance(e, ConnectionError) + assert isinstance(e, Timeout) + + @pytest.mark.parametrize( + "timeout", ((0.1, 0.1), Urllib3Timeout(connect=0.1, read=0.1)) + ) + def test_total_timeout_connect(self, timeout): + try: + requests.get(TARPIT, timeout=timeout) + pytest.fail("The connect() request should time out.") + except ConnectTimeout: + pass + + def test_encoded_methods(self, httpbin): + """See: https://github.com/psf/requests/issues/2316""" + r = requests.request(b"GET", httpbin("get")) + assert r.ok + + +SendCall = collections.namedtuple("SendCall", ("args", "kwargs")) + + +class RedirectSession(SessionRedirectMixin): + def __init__(self, order_of_redirects): + self.redirects = order_of_redirects + self.calls = [] + self.max_redirects = 30 + self.cookies = {} + self.trust_env = False + + def send(self, *args, **kwargs): + self.calls.append(SendCall(args, kwargs)) + return self.build_response() + + def build_response(self): + request = self.calls[-1].args[0] + r = requests.Response() + r.url = request.url + + try: + r.status_code = int(self.redirects.pop(0)) + except IndexError: + r.status_code = 200 + + r.headers = CaseInsensitiveDict({"Location": "/"}) + r.raw = self._build_raw() + r.request = request + return r + + def _build_raw(self): + string = StringIO.StringIO("") + setattr(string, "release_conn", lambda *args: args) + return string + + +def test_json_encodes_as_bytes(): + # urllib3 expects bodies as bytes-like objects + body = {"key": "value"} + p = PreparedRequest() + p.prepare(method="GET", url="https://www.example.com/", json=body) + assert isinstance(p.body, bytes) + + +def test_requests_are_updated_each_time(httpbin): + session = RedirectSession([303, 307]) + prep = requests.Request("POST", httpbin("post")).prepare() + r0 = session.send(prep) + assert r0.request.method == "POST" + assert session.calls[-1] == SendCall((r0.request,), {}) + redirect_generator = session.resolve_redirects(r0, prep) + default_keyword_args = { + "stream": False, + "verify": True, + "cert": None, + "timeout": None, + "allow_redirects": False, + "proxies": {}, + } + for response in redirect_generator: + assert response.request.method == "GET" + send_call = SendCall((response.request,), default_keyword_args) + assert session.calls[-1] == send_call + + +@pytest.mark.parametrize( + "var,url,proxy", + [ + ("http_proxy", "http://example.com", "socks5://proxy.com:9876"), + ("https_proxy", "https://example.com", "socks5://proxy.com:9876"), + ("all_proxy", "http://example.com", "socks5://proxy.com:9876"), + ("all_proxy", "https://example.com", "socks5://proxy.com:9876"), + ], +) +def test_proxy_env_vars_override_default(var, url, proxy): + session = requests.Session() + prep = PreparedRequest() + prep.prepare(method="GET", url=url) + + kwargs = {var: proxy} + scheme = urlparse(url).scheme + with override_environ(**kwargs): + proxies = session.rebuild_proxies(prep, {}) + assert scheme in proxies + assert proxies[scheme] == proxy + + +@pytest.mark.parametrize( + "data", + ( + (("a", "b"), ("c", "d")), + (("c", "d"), ("a", "b")), + (("a", "b"), ("c", "d"), ("e", "f")), + ), +) +def test_data_argument_accepts_tuples(data): + """Ensure that the data argument will accept tuples of strings + and properly encode them. + """ + p = PreparedRequest() + p.prepare( + method="GET", url="http://www.example.com", data=data, hooks=default_hooks() + ) + assert p.body == urlencode(data) + + +@pytest.mark.parametrize( + "kwargs", + ( + None, + { + "method": "GET", + "url": "http://www.example.com", + "data": "foo=bar", + "hooks": default_hooks(), + }, + { + "method": "GET", + "url": "http://www.example.com", + "data": "foo=bar", + "hooks": default_hooks(), + "cookies": {"foo": "bar"}, + }, + {"method": "GET", "url": "http://www.example.com/üniçø∂é"}, + ), +) +def test_prepared_copy(kwargs): + p = PreparedRequest() + if kwargs: + p.prepare(**kwargs) + copy = p.copy() + for attr in ("method", "url", "headers", "_cookies", "body", "hooks"): + assert getattr(p, attr) == getattr(copy, attr) + + +def test_urllib3_retries(httpbin): + from urllib3.util import Retry + + s = requests.Session() + s.mount("http://", HTTPAdapter(max_retries=Retry(total=2, status_forcelist=[500]))) + + with pytest.raises(RetryError): + s.get(httpbin("status/500")) + + +def test_urllib3_pool_connection_closed(httpbin): + s = requests.Session() + s.mount("http://", HTTPAdapter(pool_connections=0, pool_maxsize=0)) + + try: + s.get(httpbin("status/200")) + except ConnectionError as e: + assert "Pool is closed." in str(e) + + +class TestPreparingURLs: + @pytest.mark.parametrize( + "url,expected", + ( + ("http://google.com", "http://google.com/"), + ("http://ジェーピーニック.jp", "http://xn--hckqz9bzb1cyrb.jp/"), + ("http://xn--n3h.net/", "http://xn--n3h.net/"), + ("http://ジェーピーニック.jp".encode(), "http://xn--hckqz9bzb1cyrb.jp/"), + ("http://straße.de/straße", "http://xn--strae-oqa.de/stra%C3%9Fe"), + ( + "http://straße.de/straße".encode(), + "http://xn--strae-oqa.de/stra%C3%9Fe", + ), + ( + "http://Königsgäßchen.de/straße", + "http://xn--knigsgchen-b4a3dun.de/stra%C3%9Fe", + ), + ( + "http://Königsgäßchen.de/straße".encode(), + "http://xn--knigsgchen-b4a3dun.de/stra%C3%9Fe", + ), + (b"http://xn--n3h.net/", "http://xn--n3h.net/"), + ( + b"http://[1200:0000:ab00:1234:0000:2552:7777:1313]:12345/", + "http://[1200:0000:ab00:1234:0000:2552:7777:1313]:12345/", + ), + ( + "http://[1200:0000:ab00:1234:0000:2552:7777:1313]:12345/", + "http://[1200:0000:ab00:1234:0000:2552:7777:1313]:12345/", + ), + ), + ) + def test_preparing_url(self, url, expected): + def normalize_percent_encode(x): + # Helper function that normalizes equivalent + # percent-encoded bytes before comparisons + for c in re.findall(r"%[a-fA-F0-9]{2}", x): + x = x.replace(c, c.upper()) + return x + + r = requests.Request("GET", url=url) + p = r.prepare() + assert normalize_percent_encode(p.url) == expected + + @pytest.mark.parametrize( + "url", + ( + b"http://*.google.com", + b"http://*", + "http://*.google.com", + "http://*", + "http://☃.net/", + ), + ) + def test_preparing_bad_url(self, url): + r = requests.Request("GET", url=url) + with pytest.raises(requests.exceptions.InvalidURL): + r.prepare() + + @pytest.mark.parametrize("url, exception", (("http://:1", InvalidURL),)) + def test_redirecting_to_bad_url(self, httpbin, url, exception): + with pytest.raises(exception): + requests.get(httpbin("redirect-to"), params={"url": url}) + + @pytest.mark.parametrize( + "input, expected", + ( + ( + b"http+unix://%2Fvar%2Frun%2Fsocket/path%7E", + "http+unix://%2Fvar%2Frun%2Fsocket/path~", + ), + ( + "http+unix://%2Fvar%2Frun%2Fsocket/path%7E", + "http+unix://%2Fvar%2Frun%2Fsocket/path~", + ), + ( + b"mailto:user@example.org", + "mailto:user@example.org", + ), + ( + "mailto:user@example.org", + "mailto:user@example.org", + ), + ( + b"data:SSDimaUgUHl0aG9uIQ==", + "data:SSDimaUgUHl0aG9uIQ==", + ), + ), + ) + def test_url_mutation(self, input, expected): + """ + This test validates that we correctly exclude some URLs from + preparation, and that we handle others. Specifically, it tests that + any URL whose scheme doesn't begin with "http" is left alone, and + those whose scheme *does* begin with "http" are mutated. + """ + r = requests.Request("GET", url=input) + p = r.prepare() + assert p.url == expected + + @pytest.mark.parametrize( + "input, params, expected", + ( + ( + b"http+unix://%2Fvar%2Frun%2Fsocket/path", + {"key": "value"}, + "http+unix://%2Fvar%2Frun%2Fsocket/path?key=value", + ), + ( + "http+unix://%2Fvar%2Frun%2Fsocket/path", + {"key": "value"}, + "http+unix://%2Fvar%2Frun%2Fsocket/path?key=value", + ), + ( + b"mailto:user@example.org", + {"key": "value"}, + "mailto:user@example.org", + ), + ( + "mailto:user@example.org", + {"key": "value"}, + "mailto:user@example.org", + ), + ), + ) + def test_parameters_for_nonstandard_schemes(self, input, params, expected): + """ + Setting parameters for nonstandard schemes is allowed if those schemes + begin with "http", and is forbidden otherwise. + """ + r = requests.Request("GET", url=input, params=params) + p = r.prepare() + assert p.url == expected + + def test_post_json_nan(self, httpbin): + data = {"foo": float("nan")} + with pytest.raises(requests.exceptions.InvalidJSONError): + requests.post(httpbin("post"), json=data) + + def test_json_decode_compatibility(self, httpbin): + r = requests.get(httpbin("bytes/20")) + with pytest.raises(requests.exceptions.JSONDecodeError) as excinfo: + r.json() + assert isinstance(excinfo.value, RequestException) + assert isinstance(excinfo.value, JSONDecodeError) + assert r.text not in str(excinfo.value) + + def test_json_decode_persists_doc_attr(self, httpbin): + r = requests.get(httpbin("bytes/20")) + with pytest.raises(requests.exceptions.JSONDecodeError) as excinfo: + r.json() + assert excinfo.value.doc == r.text + + def test_status_code_425(self): + r1 = requests.codes.get("TOO_EARLY") + r2 = requests.codes.get("too_early") + r3 = requests.codes.get("UNORDERED") + r4 = requests.codes.get("unordered") + r5 = requests.codes.get("UNORDERED_COLLECTION") + r6 = requests.codes.get("unordered_collection") + + assert r1 == 425 + assert r2 == 425 + assert r3 == 425 + assert r4 == 425 + assert r5 == 425 + assert r6 == 425 + + def test_different_connection_pool_for_tls_settings_verify_True(self): + def response_handler(sock): + consume_socket_content(sock, timeout=0.5) + sock.send( + b"HTTP/1.1 200 OK\r\n" + b"Content-Length: 18\r\n\r\n" + b'\xff\xfe{\x00"\x00K0"\x00=\x00"\x00\xab0"\x00\r\n' + ) + + s = requests.Session() + close_server = threading.Event() + server = TLSServer( + handler=response_handler, + wait_to_close_event=close_server, + requests_to_handle=3, + cert_chain="tests/certs/expired/server/server.pem", + keyfile="tests/certs/expired/server/server.key", + ) + + with server as (host, port): + url = f"https://{host}:{port}" + r1 = s.get(url, verify=False) + assert r1.status_code == 200 + + # Cannot verify self-signed certificate + with pytest.raises(requests.exceptions.SSLError): + s.get(url) + + close_server.set() + assert 2 == len(s.adapters["https://"].poolmanager.pools) + + def test_different_connection_pool_for_tls_settings_verify_bundle_expired_cert( + self, + ): + def response_handler(sock): + consume_socket_content(sock, timeout=0.5) + sock.send( + b"HTTP/1.1 200 OK\r\n" + b"Content-Length: 18\r\n\r\n" + b'\xff\xfe{\x00"\x00K0"\x00=\x00"\x00\xab0"\x00\r\n' + ) + + s = requests.Session() + close_server = threading.Event() + server = TLSServer( + handler=response_handler, + wait_to_close_event=close_server, + requests_to_handle=3, + cert_chain="tests/certs/expired/server/server.pem", + keyfile="tests/certs/expired/server/server.key", + ) + + with server as (host, port): + url = f"https://{host}:{port}" + r1 = s.get(url, verify=False) + assert r1.status_code == 200 + + # Has right trust bundle, but certificate expired + with pytest.raises(requests.exceptions.SSLError): + s.get(url, verify="tests/certs/expired/ca/ca.crt") + + close_server.set() + assert 2 == len(s.adapters["https://"].poolmanager.pools) + + def test_different_connection_pool_for_tls_settings_verify_bundle_unexpired_cert( + self, + ): + def response_handler(sock): + consume_socket_content(sock, timeout=0.5) + sock.send( + b"HTTP/1.1 200 OK\r\n" + b"Content-Length: 18\r\n\r\n" + b'\xff\xfe{\x00"\x00K0"\x00=\x00"\x00\xab0"\x00\r\n' + ) + + s = requests.Session() + close_server = threading.Event() + server = TLSServer( + handler=response_handler, + wait_to_close_event=close_server, + requests_to_handle=3, + cert_chain="tests/certs/valid/server/server.pem", + keyfile="tests/certs/valid/server/server.key", + ) + + with server as (host, port): + url = f"https://{host}:{port}" + r1 = s.get(url, verify=False) + assert r1.status_code == 200 + + r2 = s.get(url, verify="tests/certs/valid/ca/ca.crt") + assert r2.status_code == 200 + + close_server.set() + assert 2 == len(s.adapters["https://"].poolmanager.pools) + + def test_different_connection_pool_for_mtls_settings(self): + client_cert = None + + def response_handler(sock): + nonlocal client_cert + client_cert = sock.getpeercert() + consume_socket_content(sock, timeout=0.5) + sock.send( + b"HTTP/1.1 200 OK\r\n" + b"Content-Length: 18\r\n\r\n" + b'\xff\xfe{\x00"\x00K0"\x00=\x00"\x00\xab0"\x00\r\n' + ) + + s = requests.Session() + close_server = threading.Event() + server = TLSServer( + handler=response_handler, + wait_to_close_event=close_server, + requests_to_handle=2, + cert_chain="tests/certs/expired/server/server.pem", + keyfile="tests/certs/expired/server/server.key", + mutual_tls=True, + cacert="tests/certs/expired/ca/ca.crt", + ) + + cert = ( + "tests/certs/mtls/client/client.pem", + "tests/certs/mtls/client/client.key", + ) + with server as (host, port): + url = f"https://{host}:{port}" + r1 = s.get(url, verify=False, cert=cert) + assert r1.status_code == 200 + with pytest.raises(requests.exceptions.SSLError): + s.get(url, cert=cert) + close_server.set() + + assert client_cert is not None + + +def test_content_length_for_bytes_data(httpbin): + data = "This is a string containing multi-byte UTF-8 ☃️" + encoded_data = data.encode("utf-8") + length = str(len(encoded_data)) + req = requests.Request("POST", httpbin("post"), data=encoded_data) + p = req.prepare() + + assert p.headers["Content-Length"] == length + + +@pytest.mark.skipif( + is_urllib3_1, + reason="urllib3 2.x encodes all strings to utf-8, urllib3 1.x uses latin-1", +) +def test_content_length_for_string_data_counts_bytes(httpbin): + data = "This is a string containing multi-byte UTF-8 ☃️" + length = str(len(data.encode("utf-8"))) + req = requests.Request("POST", httpbin("post"), data=data) + p = req.prepare() + + assert p.headers["Content-Length"] == length + + +def test_json_decode_errors_are_serializable_deserializable(): + json_decode_error = requests.exceptions.JSONDecodeError( + "Extra data", + '{"responseCode":["706"],"data":null}{"responseCode":["706"],"data":null}', + 36, + ) + deserialized_error = pickle.loads(pickle.dumps(json_decode_error)) + assert repr(json_decode_error) == repr(deserialized_error) diff --git a/components/mimo-code/source_bundle/runtime/code_runtime/__init__.py b/components/mimo-code/source_bundle/runtime/code_runtime/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/code_runtime/__init__.py @@ -0,0 +1 @@ + diff --git a/components/mimo-code/source_bundle/runtime/code_runtime/actor_launcher.py b/components/mimo-code/source_bundle/runtime/code_runtime/actor_launcher.py new file mode 100644 index 0000000000000000000000000000000000000000..82e7bd183e0e328163d12ef3fb049c14737c8978 --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/code_runtime/actor_launcher.py @@ -0,0 +1,117 @@ + +import argparse +import ctypes +import errno +import os +import resource +import sys + + +def deny_actor_network(): + + + + + + lib = ctypes.CDLL("libseccomp.so.2", use_errno=True) + lib.seccomp_init.argtypes = [ctypes.c_uint32] + lib.seccomp_init.restype = ctypes.c_void_p + lib.seccomp_syscall_resolve_name.argtypes = [ctypes.c_char_p] + lib.seccomp_syscall_resolve_name.restype = ctypes.c_int + lib.seccomp_rule_add.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_int, ctypes.c_uint] + lib.seccomp_rule_add.restype = ctypes.c_int + lib.seccomp_load.argtypes = [ctypes.c_void_p] + lib.seccomp_load.restype = ctypes.c_int + lib.seccomp_release.argtypes = [ctypes.c_void_p] + context = lib.seccomp_init(0x7FFF0000) + if not context: + raise RuntimeError("seccomp_init failed") + blocked = ("socket", "socketpair", "connect", "bind", "listen", "accept", "accept4", + "sendto", "sendmsg", "sendmmsg", "recvfrom", "recvmsg", "recvmmsg", + "shutdown", "getsockname", "getpeername", "setsockopt", "getsockopt", + + "io_uring_setup", "io_uring_register", "io_uring_enter") + try: + for name in blocked: + number = lib.seccomp_syscall_resolve_name(name.encode()) + if number < 0: + raise RuntimeError("Required syscall could not be resolved: " + name) + rc = lib.seccomp_rule_add(context, 0x00050000 | errno.EPERM, number, 0) + if rc: + raise OSError(-rc, "seccomp rule: " + name) + rc = lib.seccomp_load(context) + if rc: + raise OSError(-rc, "seccomp_load") + finally: + lib.seccomp_release(context) + + +def enter(uid, gid, cwd, status_fd, memory_mb, cpus, nproc): + if sys.platform != "linux" or os.geteuid() != 0 or uid <= 0 or gid <= 0: + raise RuntimeError("A Linux root supervisor and non-root actor IDs are required") + libc = ctypes.CDLL(None, use_errno=True) + if libc.prctl(38, 1, 0, 0, 0): + raise OSError(ctypes.get_errno(), "PR_SET_NO_NEW_PRIVS") + if libc.prctl(47, 4, 0, 0, 0): + raise OSError(ctypes.get_errno(), "PR_CAP_AMBIENT_CLEAR_ALL") + if libc.prctl(8, 0, 0, 0, 0): + raise OSError(ctypes.get_errno(), "PR_SET_KEEPCAPS") + os.setgroups([]) + os.setresgid(gid, gid, gid) + os.setresuid(uid, uid, uid) + if os.getresuid() != (uid, uid, uid) or os.getresgid() != (gid, gid, gid): + raise RuntimeError("Actor identity change did not take effect") + if libc.prctl(4, 0, 0, 0, 0): + raise OSError(ctypes.get_errno(), "PR_SET_DUMPABLE") + os.chdir(cwd) + os.umask(0o077) + resource.setrlimit(resource.RLIMIT_CORE, (0, 0)) + resource.setrlimit(resource.RLIMIT_FSIZE, (16 * 1024 * 1024,) * 2) + resource.setrlimit(resource.RLIMIT_NOFILE, (128, 128)) + resource.setrlimit(resource.RLIMIT_NPROC, (nproc, nproc)) + resource.setrlimit(resource.RLIMIT_AS, (memory_mb * 1024 * 1024,) * 2) + allowed = sorted(os.sched_getaffinity(0)) + os.sched_setaffinity(0, allowed[:cpus]) + deny_actor_network() + state = dict(line.split(":", 1) for line in open("/proc/self/status") if ":" in line) + if state["NoNewPrivs"].strip() != "1" or int(state["CapEff"].strip(), 16): + raise RuntimeError("Actor still has effective capabilities or lacks no_new_privs") + if state["Seccomp"].strip() != "2": + raise RuntimeError("Actor seccomp filter did not become active") + os.write(status_fd, b"ready") + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--uid", type=int, required=True) + parser.add_argument("--gid", type=int, required=True) + parser.add_argument("--cwd", required=True) + parser.add_argument("--status-fd", type=int, required=True) + parser.add_argument('--memory-mb', type=int, required=True) + parser.add_argument('--cpus', type=int, required=True) + parser.add_argument('--nproc', type=int, default=32) + parser.add_argument("argv", nargs=argparse.REMAINDER) + args = parser.parse_args() + argv = args.argv[1:] if args.argv[:1] == ["--"] else args.argv + if not argv: + parser.error("A command is required") + try: + if not 128 <= args.memory_mb <= 16384 or not 1 <= args.cpus <= 2 or not 1 <= args.nproc <= 64: + raise ValueError('Invalid actor resource bounds') + enter(args.uid, args.gid, args.cwd, args.status_fd, args.memory_mb, args.cpus, args.nproc) + except Exception as exc: + os.write(args.status_fd, ("error:" + str(exc)).encode()[:2048]) + raise + finally: + os.close(args.status_fd) + + env = {"PATH": "/usr/local/bin:/usr/bin:/bin", "HOME": args.cwd, + "TMPDIR": args.cwd + "/.actor_tmp", "LANG": "C.UTF-8", + "LC_ALL": "C.UTF-8", "PYTHONDONTWRITEBYTECODE": "1", + "OPENBLAS_NUM_THREADS": str(args.cpus), "OMP_NUM_THREADS": str(args.cpus), + "MKL_NUM_THREADS": str(args.cpus), "NUMEXPR_NUM_THREADS": str(args.cpus)} + os.execvpe(argv[0], argv, env) + + +if __name__ == "__main__": + main() diff --git a/components/mimo-code/source_bundle/runtime/code_runtime/backend.py b/components/mimo-code/source_bundle/runtime/code_runtime/backend.py new file mode 100644 index 0000000000000000000000000000000000000000..1435539d6fa76698bf963b994557ed014a9e8fab --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/code_runtime/backend.py @@ -0,0 +1,278 @@ + + + + + +import hashlib +import json +import math +import os +from pathlib import Path +import shutil +import signal +import subprocess +import sys +from threading import Lock, RLock +import time +from uuid import uuid4 + +from common.contracts import ACTION_SCHEMA, observation_payload +from .guard import Guard, GuardError, Policy, ordinary + +_lease = Lock() + + +class RuntimeUnavailable(RuntimeError): + pass + + +def sha256(path): + return hashlib.sha256(Path(path).read_bytes()).hexdigest() + + +def clear_contents(path): + path = Path(path) + if path.is_symlink(): + raise RuntimeUnavailable('Trusted root was replaced by a symlink') + path.mkdir(parents=True, exist_ok=True) + for child in path.iterdir(): + if not child.is_symlink() and child.is_dir(): + shutil.rmtree(child) + else: + child.unlink() + + +class ShellBackend: + def __init__(self, config_path=None): + self.config_path=Path(config_path or os.environ.get('NATIVE_SHELL_CONFIG','/opt/native-shell/config.json')) + self.config=json.loads(self.config_path.read_text()) + self.tasks={item['id']:item for item in self.config['tasks']} + if not self.tasks: + raise ValueError('No prepared tasks') + if len({task['workspace'] for task in self.tasks.values()})!=1: + raise ValueError('One runtime image must use one original workspace root') + for task in self.tasks.values(): + if task.get('grading_mode') != 'subprocess-code': + raise ValueError('Learner-code graders are not supported by the file-output guard') + if task['grader']['kind'] != 'original-subprocess-pytest': + raise ValueError('Unreviewed grader kind') + if task['grader'].get('executes_learner_code') != 'child-only-reviewed': + raise ValueError('Explicit file-output grader review is required') + work=Path(task['workspace']) + if str(work) not in ('/app','/workdir','/home/user'): + raise ValueError('Workspace must be an explicitly supported original task root') + if not (128 <= task['memory_mb'] <= 16384 and 1 <= task['cpus'] <= 2): + raise ValueError('Resources exceed the reviewed Arena bounds') + self.lock=RLock() + self.owns_lease=False + self.guard=None + self.task=None + self.final=None + self.failed=False + self.episode_id=None + self.step_count=0 + self.started=0.0 + + def _private_root(self): + return Path(self.config.get('private_root','/opt/native-shell/private')) + + def _check_task_sources(self,task): + root=Path(task['source']) + actual={str(path.relative_to(root)) for path in root.rglob('*') if path.is_file()} + if actual!=set(task['source_sha256']) or any(path.is_symlink() for path in root.rglob('*')): + raise RuntimeUnavailable('Pinned original source tree membership changed') + for relative,digest in task['source_sha256'].items(): + path=root/relative + if path.is_symlink() or not path.is_file() or sha256(path)!=digest: + raise RuntimeUnavailable('Pinned original task source changed') + pristine=Path(task['pristine_workspace']) + if {str(path.relative_to(pristine)) for path in pristine.rglob('*') if path.is_file()}!=set(task['pristine_sha256']): + raise RuntimeUnavailable('Pristine input tree membership changed') + for relative,digest in task['pristine_sha256'].items(): + path=pristine/relative + if path.is_symlink() or not path.is_file() or sha256(path)!=digest: + raise RuntimeUnavailable('Pristine task input changed') + + def reset(self,*,task_id=None,index=None,split='train',seed=None,episode_id=None,**kwargs): + with self.lock: + if sys.platform!='linux' or os.geteuid()!=0 or os.environ.get('ARENA_DEDICATED_CONTAINER')!='1': + raise RuntimeUnavailable('Use a dedicated disposable Linux container with a root supervisor') + if split!='train': + raise ValueError('Unknown split') + if task_id is None: + selected=0 if index is None else index + if type(selected) is not int or not 0<=selected1048576: + raise ValueError('Command exceeds the transport limit') + limit=min(float(timeout_s or self.config.get('command_timeout_sec',120)),remaining, + self.config.get('command_timeout_sec',120)) + result=self.guard.run_actor(action['command'],timeout=max(.01,limit), + output_limit=self.config.get('output_limit_bytes',65536)) + self.step_count+=1 + if self.step_count>=self.config.get('max_actions',64): + return self._finish() + return observation_payload(self.task['id'],'Command completed.',result) + + def _finish(self): + try: + return self._finish_impl() + except Exception: + self.failed=True + self.guard.stop_actor() + raise + finally: + if self.owns_lease: + self.owns_lease=False + _lease.release() + + def _finish_impl(self): + try: + self.guard.freeze() + except GuardError: + self.guard.stop_actor() + self.final=observation_payload(self.task['id'],'Output violates the published regular-file boundary.', + {'status':'invalid_output'},reward=0.0,done=True) + return self.final + + + + clear_contents('/tmp');os.chown('/tmp',0,0);os.chmod('/tmp',0o700) + child_root=Path('/run/native-code-child') + child_root.mkdir(mode=0o755,exist_ok=True);ordinary(child_root) + if child_root.stat().st_uid != 0 or child_root.stat().st_mode & 0o022:raise RuntimeUnavailable('Untrusted child temporary root') + child_tmp=child_root/'tmp';clear_contents(child_tmp) + os.chmod(child_tmp,0o700);os.chown(child_tmp,2001,2001) + grader=self.task['grader'] + python=self.task['python'] + private=self._private_root()/'episode' + verifier_tmp=private/'tmp';verifier_tmp.mkdir(mode=0o700) + if grader['kind']=='original-subprocess-pytest': + command=[python,'-I','-B',str(Path(__file__).with_name('trusted_checker.py')), '--task', self.task['id']] + elif grader['kind']=='pytest': + command=[python,'-I','-B','-m','pytest','-c','/dev/null','--confcutdir=/tests', + '--rootdir=/tests','--import-mode=importlib','-p','no:cacheprovider', + '/tests/'+grader['test_file'],'-q'] + else: + command=['/bin/bash','--noprofile','--norc','/tests/'+grader['script']] + command=[python,'-I','-B',str(Path(__file__).with_name('verifier_launcher.py')), + '--cpus',str(self.task['cpus']),'--memory-mb',str(self.task['memory_mb']), + '--wall-seconds',str(self.task['verifier_timeout_sec']),'--',*command] + env={'PATH':'/usr/local/bin:/usr/bin:/bin','HOME':'/root','LANG':'C.UTF-8','LC_ALL':'C.UTF-8', + 'PYTHONDONTWRITEBYTECODE':'1','PYTHONNOUSERSITE':'1','PYTEST_DISABLE_PLUGIN_AUTOLOAD':'1', + 'OPENBLAS_NUM_THREADS':str(self.task['cpus']),'OMP_NUM_THREADS':str(self.task['cpus']), + 'TMPDIR':str(verifier_tmp)} + process=subprocess.Popen(command,cwd='/tests',env=env,stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE,stderr=subprocess.PIPE,start_new_session=True) + try: + stdout,stderr=process.communicate(timeout=self.task['verifier_timeout_sec']) + except subprocess.TimeoutExpired: + os.killpg(process.pid,signal.SIGKILL);process.communicate() + raise RuntimeUnavailable('Original verifier exceeded its time limit') + Guard(Policy(workspace=Path('/app'),inputs=(),private_paths=(),output_paths=(),uid=2001,gid=2001)).stop_actor() + self.guard.check_integrity() + (private/'verifier-result.json').write_text(json.dumps({'return_code':process.returncode, + 'stdout':stdout.decode(errors='replace')[-262144:],'stderr':stderr.decode(errors='replace')[-262144:]},indent=2)+'\n') + if grader['kind'] in ('pytest','original-subprocess-pytest'): + if process.returncode not in (0,1): + raise RuntimeUnavailable('Original pytest did not produce a valid score') + reward=float(process.returncode==0) + else: + if process.returncode!=0: + raise RuntimeUnavailable('Original grader script failed') + try:reward=float(Path('/logs/verifier/reward.txt').read_text().strip()) + except (OSError,ValueError) as exc:raise RuntimeUnavailable('Original grader produced no numeric score') from exc + if not math.isfinite(reward) or not 0<=reward<=1: + raise RuntimeUnavailable('Original grader produced an invalid score') + self.final=observation_payload(self.task['id'],'Original verifier completed.', + {'status':'verified','step_count':self.step_count},reward=reward,done=True) + return self.final + + @property + def state(self): + return {'episode_id':self.episode_id,'step_count':self.step_count,'task_id':self.task['id'] if self.task else None, + 'done':self.final is not None or self.failed,'infrastructure_failed':self.failed} + + def close(self): + with self.lock: + if self.owns_lease: + try: + if self.guard is not None:self.guard.stop_actor() + finally: + self.guard=None;self.task=None;self.final=None;self.episode_id=None;self.failed=False + self.owns_lease=False;_lease.release() diff --git a/components/mimo-code/source_bundle/runtime/code_runtime/code_child_launcher.py b/components/mimo-code/source_bundle/runtime/code_runtime/code_child_launcher.py new file mode 100644 index 0000000000000000000000000000000000000000..176e473d1c0d5e4b2384575586408d392f4984e5 --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/code_runtime/code_child_launcher.py @@ -0,0 +1,20 @@ + +import argparse +import base64 +import json +import os +from pathlib import Path +import sys +sys.path.insert(0,str(Path(__file__).parent)) +from actor_launcher import enter + +def main(): + p=argparse.ArgumentParser();p.add_argument('--payload',required=True);a=p.parse_args();value=json.loads(base64.b64decode(a.payload)) + readfd,writefd=os.pipe() + enter(2001,2001,value['cwd'],writefd,2048,1,32) + os.close(writefd);os.close(readfd) + allowed={'PATH','PYTHONPATH','LANG','LC_ALL','PYTHONDONTWRITEBYTECODE','PYTHONNOUSERSITE','OPENBLAS_NUM_THREADS','OMP_NUM_THREADS'} + env={k:v for k,v in value['env'].items() if k in allowed} + env.update({'HOME':'/app','TMPDIR':'/run/native-code-child/tmp','PYTHONDONTWRITEBYTECODE':'1','PYTHONNOUSERSITE':'1'}) + os.execvpe(value['argv'][0],value['argv'],env) +if __name__=='__main__':main() diff --git a/components/mimo-code/source_bundle/runtime/code_runtime/environment.py b/components/mimo-code/source_bundle/runtime/code_runtime/environment.py new file mode 100644 index 0000000000000000000000000000000000000000..bfdffe3ea3ba33135a4c7adce3c9e05160f12637 --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/code_runtime/environment.py @@ -0,0 +1,46 @@ + +from openenv.core.env_server.interfaces import Environment +from openenv.core.env_server.types import State, EnvironmentMetadata +from common.models import ArenaAction, ArenaObservation +from .backend import ShellBackend + + +class NativeHarborEnvironment(Environment): + SUPPORTS_CONCURRENT_SESSIONS = False + + def __init__(self): + super().__init__() + self.backend=ShellBackend() + + def reset(self,**kwargs): + return ArenaObservation.model_validate(self.backend.reset(**kwargs)) + + def step(self,action,timeout_s=None,**kwargs): + value=action.action_payload() if isinstance(action,ArenaAction) else ArenaAction.model_validate(action).action_payload() + return ArenaObservation.model_validate(self.backend.step(value,timeout_s=timeout_s)) + + @property + def state(self): + return State.model_validate(self.backend.state) + + def close(self): + self.backend.close() + + def get_metadata(self): + return EnvironmentMetadata(name='native_code_harbor',version='0.1.0',description='Original Harbor tasks with offline dependencies and private subprocess code grading.') + + def list_splits(self): + return ['train'] + + def list_tasks(self,split): + if split!='train':raise ValueError('Unknown split') + return [{'id':key,'index':index} for index,key in enumerate(self.backend.tasks)] + + def num_tasks(self,split): + return len(self.list_tasks(split)) + + def get_task(self,split,index): + return self.list_tasks(split)[index] + + def get_task_range(self,split,start=None,stop=None): + return self.list_tasks(split)[start:stop] diff --git a/components/mimo-code/source_bundle/runtime/code_runtime/guard.py b/components/mimo-code/source_bundle/runtime/code_runtime/guard.py new file mode 100644 index 0000000000000000000000000000000000000000..5070c37a4e2e1c5027888dd518cce766df4ad740 --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/code_runtime/guard.py @@ -0,0 +1,322 @@ + + + + + +from dataclasses import dataclass +import hashlib +import json +import os +from pathlib import Path +import selectors +import signal +import stat +import subprocess +import sys +import time + + +class GuardError(RuntimeError): + pass + + +def ordinary(path): + path = Path(path) + for current in [path, *path.parents]: + if current.is_symlink(): + raise GuardError(f"Symlink is forbidden in guarded path: {current}") + st = path.lstat() + if not (stat.S_ISREG(st.st_mode) or stat.S_ISDIR(st.st_mode)): + raise GuardError(f"Special filesystem object: {path}") + if stat.S_ISREG(st.st_mode) and st.st_nlink != 1: + raise GuardError(f"Hard-linked file: {path}") + return st + + +def descendants(path): + + pending = [(Path(path), 0)] + seen = 0 + while pending: + current, depth = pending.pop() + seen += 1 + if depth > 32 or seen > 4096: + raise GuardError("Guarded tree exceeds prototype depth/file limits") + st = ordinary(current) + yield current + if stat.S_ISDIR(st.st_mode): + pending.extend((child, depth + 1) for child in sorted(current.iterdir(), reverse=True)) + + +def record(path): + st = ordinary(path) + result = {"uid": st.st_uid, "gid": st.st_gid, "mode": stat.S_IMODE(st.st_mode), + "dev": st.st_dev, "inode": st.st_ino, + "kind": "directory" if stat.S_ISDIR(st.st_mode) else "file"} + if stat.S_ISREG(st.st_mode): + h = hashlib.sha256() + with open(path, "rb") as stream: + for block in iter(lambda: stream.read(65536), b""): + h.update(block) + result.update(size=st.st_size, nlink=st.st_nlink, sha256=h.hexdigest()) + return result + + +@dataclass(frozen=True) +class Policy: + workspace: Path + inputs: tuple[Path, ...] + private_paths: tuple[Path, ...] + output_paths: tuple[Path, ...] + editable_paths: tuple[Path, ...] = () + private_write_dirs: tuple[Path, ...] = (Path("/logs/verifier"),) + uid: int = 2000 + gid: int = 2000 + state_dir: Path = Path("/opt/guard-private") + memory_mb: int = 2048 + cpus: int = 1 + nproc: int = 32 + actor_python: str = '/usr/local/bin/python3' + + +class Guard: + def __init__(self, policy): + if sys.platform != "linux" or os.geteuid() != 0: + raise GuardError("Guard requires a dedicated Linux root supervisor") + self.policy = policy + self.records = {} + self.closed_trees = {} + self.phase = "new" + + @staticmethod + def check_runtime_paths(): + + + for path in [Path(sys.executable).resolve(), Path("/bin/bash").resolve(), + Path("/usr/local/bin"), Path("/usr/bin")]: + for item in [path, *path.parents]: + st = item.stat() + if st.st_uid != 0 or st.st_mode & 0o022: + raise GuardError(f"Untrusted runtime lookup path: {item}") + + def _protect_parents(self, path): + + + for parent in [Path(path).parent, *Path(path).parent.parents]: + st = ordinary(parent) + os.chown(parent, 0, 0) + mode = stat.S_IMODE(st.st_mode) + if mode & 0o022: + os.chmod(parent, mode | stat.S_ISVTX) + + def _seal(self, path, private=False): + objects = list(descendants(path)) + for current in objects: + st = ordinary(current) + os.chown(current, 0, 0) + directory = stat.S_ISDIR(st.st_mode) + os.chmod(current, (0o700 if directory else 0o600) if private else + (0o555 if directory or st.st_mode & 0o111 else 0o444)) + self._protect_parents(path) + for current in objects: + self.records[str(current)] = record(current) + if Path(path).is_dir(): + self.closed_trees[str(path)] = sorted(str(x) for x in objects) + + def prepare(self): + if self.phase != "new": + raise GuardError("Guard preparation is single use") + p = self.policy + self.check_runtime_paths() + if p.uid <= 0 or p.gid <= 0: + raise GuardError("Actor IDs must be non-root") + if not p.workspace.is_absolute() or str(p.workspace) in ("/", "/tmp", "/home"): + raise GuardError("Unsafe workspace") + ordinary(p.workspace) + os.chown(p.workspace, 0, 0) + os.chmod(p.workspace, 0o1777) + self._protect_parents(p.workspace) + for editable in p.editable_paths: + if not editable.is_relative_to(p.workspace): + raise GuardError("Editable paths must be inside the workspace") + for item in descendants(editable): + st = ordinary(item) + os.chown(item, p.uid, p.gid) + os.chmod(item, 0o700 if stat.S_ISDIR(st.st_mode) or st.st_mode & 0o111 else 0o600) + tmp = p.workspace / ".actor_tmp" + if tmp.exists(): + raise GuardError("Actor temporary directory must start absent") + tmp.mkdir(mode=0o700) + os.chown(tmp, p.uid, p.gid) + p.state_dir.mkdir(parents=True, exist_ok=True) + os.chown(p.state_dir, 0, 0) + os.chmod(p.state_dir, 0o700) + self._protect_parents(p.state_dir) + for item in p.inputs: + self._seal(item) + for item in p.private_paths: + self._seal(item, private=True) + for item in p.private_write_dirs: + item.mkdir(parents=True, exist_ok=True) + ordinary(item) + os.chown(item, 0, 0) + os.chmod(item, 0o700) + self._protect_parents(item) + self.records[str(item)] = record(item) + + for item in (*p.inputs, *p.private_paths, p.state_dir, p.workspace): + for ancestor in Path(item).parents: + self.records.setdefault(str(ancestor), record(ancestor)) + self.records[str(p.workspace)] = record(p.workspace) + (p.state_dir / "input_manifest.json").write_text(json.dumps(self.records, indent=2)) + self.phase = "actor" + self.check_integrity() + + def check_integrity(self): + for path, before in self.records.items(): + if record(path) != before: + raise GuardError(f"Protected input or parent changed: {path}") + for root, before in self.closed_trees.items(): + if sorted(str(x) for x in descendants(root)) != before: + raise GuardError(f"Protected directory membership changed: {root}") + + def stop_actor(self): + + deadline = time.monotonic() + 3 + while True: + live = [] + for entry in Path("/proc").iterdir(): + if not entry.name.isdigit(): + continue + try: + fields = dict(line.split(":", 1) for line in (entry / "status").read_text().splitlines() if ":" in line) + if self.policy.uid in map(int, fields["Uid"].split()) and not fields["State"].strip().startswith("Z"): + live.append(int(entry.name)) + except (FileNotFoundError, ProcessLookupError, PermissionError): + continue + if not live: + return + for pid in live: + try: + os.kill(pid, signal.SIGKILL) + except ProcessLookupError: + pass + if time.monotonic() > deadline: + raise GuardError("Could not stop all actor processes") + time.sleep(0.02) + + def run_actor(self, command, timeout=10, output_limit=65536): + if self.phase != "actor": + raise GuardError("Actor phase is closed") + self.check_integrity() + read_fd, write_fd = os.pipe() + launcher = Path(__file__).with_name("actor_launcher.py") + argv = [self.policy.actor_python, "-I", str(launcher), "--uid", str(self.policy.uid), + "--gid", str(self.policy.gid), "--cwd", str(self.policy.workspace), + '--memory-mb', str(self.policy.memory_mb), '--cpus', str(self.policy.cpus), + '--nproc', str(self.policy.nproc), + "--status-fd", str(write_fd), "--", "/bin/bash", "--noprofile", "--norc", "-c", command] + process = subprocess.Popen(argv, env={"PATH": "/usr/local/bin:/usr/bin:/bin"}, + stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + pass_fds=(write_fd,), start_new_session=True) + os.close(write_fd) + selector = selectors.DefaultSelector() + for stream in [process.stdout, process.stderr]: + os.set_blocking(stream.fileno(), False) + selector.register(stream, selectors.EVENT_READ) + output = {process.stdout: bytearray(), process.stderr: bytearray()} + reason = "completed" + deadline = time.monotonic() + timeout + try: + while selector.get_map(): + rss_kib = 0 + for entry in Path('/proc').iterdir(): + if not entry.name.isdigit(): + continue + try: + fields = dict(line.split(':',1) for line in (entry/'status').read_text().splitlines() if ':' in line) + if self.policy.uid in map(int,fields['Uid'].split()): + rss_kib += int(fields.get('VmRSS','0').split()[0]) + except (FileNotFoundError,ProcessLookupError,PermissionError): + continue + if rss_kib > self.policy.memory_mb * 1024: + reason = 'aggregate_rss_limit' + self.stop_actor() + process.kill() + break + if time.monotonic() > deadline: + reason = "command_timeout" + self.stop_actor() + process.kill() + break + for key, _ in selector.select(0.05): + data = os.read(key.fileobj.fileno(), 65536) + if not data: + selector.unregister(key.fileobj) + continue + remaining = output_limit - sum(len(v) for v in output.values()) + output[key.fileobj].extend(data[:max(remaining, 0)]) + if len(data) > remaining: + reason = "output_limit" + self.stop_actor() + process.kill() + break + if reason != "completed": + break + process.wait(timeout=3) + status = os.read(read_fd, 2048) + if status != b"ready": + raise GuardError("Actor isolation failed: " + status.decode(errors="replace")) + finally: + selector.close() + os.close(read_fd) + process.stdout.close() + process.stderr.close() + if process.poll() is None: + self.stop_actor() + process.kill() + process.wait() + self.check_integrity() + return {"return_code": process.returncode, "reason": reason, + "stdout": output[process.stdout].decode(errors="replace"), + "stderr": output[process.stderr].decode(errors="replace")} + + def freeze(self): + if self.phase != "actor": + raise GuardError("Can only freeze an active actor phase") + self.stop_actor() + self.check_integrity() + total = 0 + for path in self.policy.output_paths: + if not path.is_relative_to(self.policy.workspace): + raise GuardError("Output path is outside workspace") + if not os.path.lexists(path): + continue + for item in descendants(path): + st = ordinary(item) + if stat.S_ISREG(st.st_mode): + total += st.st_size + if st.st_size > 16 * 1024 * 1024 or total > 64 * 1024 * 1024: + raise GuardError("Output artifact exceeds prototype limits") + os.chown(item, 0, 0) + os.chmod(item, 0o555 if stat.S_ISDIR(st.st_mode) else 0o444) + self.phase = "frozen" + + def run_verifier(self, script, timeout=30): + if self.phase != "frozen": + raise GuardError("Freeze actor before grading") + self.check_integrity() + script = Path(script) + if str(script) not in self.records or self.records[str(script)]["uid"] != 0: + raise GuardError("Verifier was not sealed as a private trusted file") + env = {"PATH": "/usr/local/bin:/usr/bin:/bin", "HOME": "/root", "LANG": "C.UTF-8", + "LC_ALL": "C.UTF-8", "PYTHONDONTWRITEBYTECODE": "1", + "PYTHONNOUSERSITE": "1", "PYTEST_DISABLE_PLUGIN_AUTOLOAD": "1", + "PYTEST_ADDOPTS": "-p no:cacheprovider"} + result = subprocess.run(["/bin/bash", "--noprofile", "--norc", str(script)], + cwd=script.parent, env=env, stdin=subprocess.DEVNULL, + stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=timeout) + self.check_integrity() + return {"return_code": result.returncode, + "stdout": result.stdout.decode(errors="replace"), + "stderr": result.stderr.decode(errors="replace")} diff --git a/components/mimo-code/source_bundle/runtime/code_runtime/launch_service.py b/components/mimo-code/source_bundle/runtime/code_runtime/launch_service.py new file mode 100644 index 0000000000000000000000000000000000000000..921f9b911ec470f402075c0dfeb1931ebc4a1f92 --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/code_runtime/launch_service.py @@ -0,0 +1,51 @@ + +import argparse +import json +import os +from pathlib import Path +import subprocess +import time +import urllib.request + + +class RejectRedirects(urllib.request.HTTPRedirectHandler): + def redirect_request(self,*args,**kwargs): + raise RuntimeError('Redirects are forbidden for the local readiness probe') + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('--python',default='/opt/openenv-venv/bin/python') + parser.add_argument('--config',default='/opt/native-shell/config.json') + args=parser.parse_args() + if os.geteuid()!=0:raise PermissionError('Only the trusted supervisor may launch this service') + opener=urllib.request.build_opener(urllib.request.ProxyHandler({}),RejectRedirects()) + url='http://127.0.0.1:8000/metadata' + def ready(): + try: + with opener.open(url,timeout=2) as response: + return json.load(response).get('name')=='native_code_harbor' + except Exception:return False + if ready(): + print(json.dumps({'status':'already_running','base_url':'http://127.0.0.1:8000'}));return + private=Path('/opt/native-shell/private');private.mkdir(parents=True,exist_ok=True);private.chmod(0o700) + log=private/'service.log' + env={'PATH':'/usr/local/bin:/usr/bin:/bin','HOME':'/root','LANG':'C.UTF-8','LC_ALL':'C.UTF-8', + 'PYTHONPATH':'/opt/native-shell/runtime','PYTHONDONTWRITEBYTECODE':'1','PYTHONUNBUFFERED':'1', + 'NATIVE_SHELL_CONFIG':args.config,'ARENA_DEDICATED_CONTAINER':'1','ENABLE_WEB_INTERFACE':'false', + 'OPENENV_MODE':'simulation','GRADIO_ANALYTICS_ENABLED':'false','HF_HUB_OFFLINE':'1'} + with log.open('w') as stream: + process=subprocess.Popen([args.python,'-m','code_runtime.server'],env=env,stdin=subprocess.DEVNULL, + stdout=stream,stderr=subprocess.STDOUT,start_new_session=True) + (private/'service.pid').write_text(str(process.pid)+'\n') + deadline=time.monotonic()+90 + while time.monotonic()2*1024*1024:raise WireProtocolError('SDK response exceeds the transport limit') + return validate_envelope(loads(raw)) + + def reset(self,**kwargs): + return self._post('/reset',kwargs) + + def step(self,action): + return self._post('/step',{'action':action}) + + def finish(self): + return validate_envelope(self.step({'op':'finish'}),require_done=True) + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('operation',choices=['reset','step','finish']) + parser.add_argument('--payload-base64') + parser.add_argument('--url',default='http://127.0.0.1:8000') + parser.add_argument('--timeout',type=float,default=330) + args=parser.parse_args() + payload={} if args.payload_base64 is None else loads(base64.b64decode(args.payload_base64,validate=True)) + if not isinstance(payload,dict):raise WireProtocolError('Payload must be a JSON object') + client=WireClient(args.url,args.timeout) + if args.operation=='reset':result=client.reset(**payload) + elif args.operation=='step':result=client.step(payload) + else: + if payload:raise WireProtocolError('Finish has no payload') + result=client.finish() + print(json.dumps(result,ensure_ascii=False,allow_nan=False,separators=(',',':'))) + + +if __name__=='__main__': + try:main() + except Exception as exc: + print(type(exc).__name__+': '+str(exc),file=sys.stderr) + raise SystemExit(1) diff --git a/components/mimo-code/source_bundle/runtime/common/__init__.py b/components/mimo-code/source_bundle/runtime/common/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/common/__init__.py @@ -0,0 +1 @@ + diff --git a/components/mimo-code/source_bundle/runtime/common/contracts.py b/components/mimo-code/source_bundle/runtime/common/contracts.py new file mode 100644 index 0000000000000000000000000000000000000000..b33d03fd3c21f3b117be3a4664274c109ac6fa9d --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/common/contracts.py @@ -0,0 +1,7 @@ + +from copy import deepcopy + +ACTION_SCHEMA = {'type': 'object', 'description': 'Return one action object per reply, then wait for its observation. To finish, send {"op":"finish"}. A command is a JSON string: encode newlines as \\n and internal double quotes as \\". Do not wrap the object in prose, Markdown, or tags.', 'examples': [{'op': 'finish'}], 'oneOf': [{'properties': {'op': {'const': 'exec'}, 'command': {'type': 'string'}}, 'required': ['op', 'command'], 'additionalProperties': False}, {'properties': {'op': {'const': 'call'}, 'tool': {'type': 'string'}, 'arguments': {'type': 'object'}}, 'required': ['op', 'tool', 'arguments'], 'additionalProperties': False}, {'properties': {'op': {'const': 'finish'}}, 'required': ['op'], 'additionalProperties': False}]} + +def observation_payload(task_id, message, data=None, reward=0.0, done=False): + return {"task_id": str(task_id), "message": str(message), "data": {} if data is None else data, "reward": reward, "done": bool(done), "metadata": {}} diff --git a/components/mimo-code/source_bundle/runtime/common/http_routes.py b/components/mimo-code/source_bundle/runtime/common/http_routes.py new file mode 100644 index 0000000000000000000000000000000000000000..a3ab94f85fc92d044895d022d16d4659be018d8b --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/common/http_routes.py @@ -0,0 +1,64 @@ + +from threading import RLock +from contextlib import asynccontextmanager +from copy import deepcopy +from fastapi import HTTPException +from pydantic import ValidationError +from starlette.concurrency import run_in_threadpool +from openenv.core.env_server.serialization import serialize_observation +from openenv.core.env_server.types import ResetRequest,ResetResponse,StepRequest,StepResponse +from .models import ArenaAction + + +def install_persistent_http_routes(app,env,conflict_error=None): + lock=RLock() + app.router.routes=[route for route in app.router.routes if getattr(route,'path',None) not in {'/reset','/step','/state'}] + + def reset_sync(request): + with lock: + return ResetResponse(**serialize_observation(env.reset(**request.model_dump(exclude_unset=True)))) + + def step_sync(request): + with lock: + action=ArenaAction.model_validate(request.action) + return StepResponse(**serialize_observation(env.step(action,timeout_s=request.timeout_s))) + + def state_sync(): + with lock: + value=env.state + return value.model_copy(deep=True) if hasattr(value,'model_copy') else deepcopy(value) + + @app.post('/reset',response_model=ResetResponse) + async def reset(request:ResetRequest): + try:return await run_in_threadpool(reset_sync,request) + except (ValueError,IndexError) as exc:raise HTTPException(status_code=400,detail=str(exc)) from exc + except Exception as exc: + if conflict_error is not None and isinstance(exc,conflict_error): + raise HTTPException(status_code=409,detail=str(exc)) from exc + raise + + @app.post('/step',response_model=StepResponse) + async def step(request:StepRequest): + try:return await run_in_threadpool(step_sync,request) + except (ValueError,ValidationError) as exc:raise HTTPException(status_code=422,detail=str(exc)) from exc + + @app.get('/state') + async def state(): + return await run_in_threadpool(state_sync) + + def shutdown(): + with lock:env.close() + + + + + original_lifespan=app.router.lifespan_context + + @asynccontextmanager + async def lifespan(application): + async with original_lifespan(application) as state: + try:yield state + finally:await run_in_threadpool(shutdown) + + app.router.lifespan_context=lifespan + return lock diff --git a/components/mimo-code/source_bundle/runtime/common/models.py b/components/mimo-code/source_bundle/runtime/common/models.py new file mode 100644 index 0000000000000000000000000000000000000000..b862e2d3259ab1c55bbb46e6423587b742dbcc51 --- /dev/null +++ b/components/mimo-code/source_bundle/runtime/common/models.py @@ -0,0 +1,54 @@ + +from copy import deepcopy +import math +from typing import Any, Literal +import jsonschema +from openenv.core.env_server.types import Action, Observation +from pydantic import ConfigDict, Field, model_serializer, model_validator +from .contracts import ACTION_SCHEMA + + +class ArenaAction(Action): + model_config=ConfigDict(extra='forbid',frozen=True,validate_assignment=False) + op: Literal['exec', 'call', 'finish'] + command: str | None = None + tool: str | None = None + arguments: dict[str, Any] | None = None + + @model_validator(mode='before') + @classmethod + def exact_contract(cls, value): + if isinstance(value, cls): + return value + def finite(item): + if isinstance(item,float) and not math.isfinite(item): + raise ValueError('Non-finite JSON number') + if isinstance(item,dict): + for part in item.values():finite(part) + elif isinstance(item,list): + for part in item:finite(part) + finite(value) + try: + jsonschema.Draft202012Validator(ACTION_SCHEMA).validate(value) + except jsonschema.ValidationError as exc: + raise ValueError(exc.message) from exc + return value + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema, handler): + return deepcopy(ACTION_SCHEMA) + + def action_payload(self): + if self.op=='exec':return {'op':'exec','command':self.command} + if self.op=='call':return {'op':'call','tool':self.tool,'arguments':self.arguments} + return {'op':'finish'} + + @model_serializer + def canonical_serialization(self): + return self.action_payload() + + +class ArenaObservation(Observation): + task_id: str = '' + message: str = '' + data: dict[str, Any] = Field(default_factory=dict) diff --git a/components/mimo-code/source_bundle/source-other/instruction.md b/components/mimo-code/source_bundle/source-other/instruction.md new file mode 100644 index 0000000000000000000000000000000000000000..cac3bc29b13122f8ead114e49f9be614f4392b10 --- /dev/null +++ b/components/mimo-code/source_bundle/source-other/instruction.md @@ -0,0 +1,22 @@ +You are an agent, your current working directory is /app. + +You can use the tools available to you to interact with the computer to assist the user in completing tasks. + +# Repair the Windows Registry forensic workflow + +The vendored project under `/app/vendor/plaso` is a pre-fix slice of a Windows Registry forensic parser. A recent input can contain one registry value whose typed decoder raises `dfwinreg.errors.WinRegistryValueError`. Repair the real plugin code, not the runner, so extraction remains useful and the caller integration remains consistent. + +Requirements: + +1. Update the shared Windows Registry value-formatting helper to receive the parser mediator and handle only the decoder failure represented by `WinRegistryValueError`. The affected value must remain in the formatted event as `[TYPE] (N bytes)`, where `N` is the raw payload length. +2. Emit exactly one extraction warning for that recovery. The warning must include the value type, value name, registry key path, and decoder error text. +3. Preserve existing formatting for strings, integers, multi-strings, binary values, and empty values, including their type labels and byte/empty representations. +4. Update the Services plugin caller to pass the mediator into the shared helper while keeping its skip list. The service event must still be produced with its typed `Start` and `Type` fields and remaining values. +5. Keep the existing source modules and runner intact. Run the offline integration command: + +```sh +cd /app/vendor/plaso +PYTHONPATH=/app/vendor/plaso python3 tools/run_case.py /app/output.json +``` + +The output file must be JSON with `output_schema_version` equivalent to `schema_version` `registry-forensics.v1`, two events, one warning, a recovered byte-count value, and the service event fields. Do not use network access or add dependencies. diff --git a/components/mimo-code/source_bundle/source-other/task.toml b/components/mimo-code/source_bundle/source-other/task.toml new file mode 100644 index 0000000000000000000000000000000000000000..98185cb5f82d66223e485fcd9d99f7a695e3592c --- /dev/null +++ b/components/mimo-code/source_bundle/source-other/task.toml @@ -0,0 +1,42 @@ +schema_version = "1.4" + +[task] +name = "mimo-v2.6-rl/candidate-1001-security-forensics" +description = "Repair the offline Plaso Windows Registry extraction workflow so corrupt typed values are recovered with warnings and…" +keywords = ["mimo-v2.6-rl", "terminal"] + +[metadata] +adapter = "mimo_harbor 1.3.0" +category = "Terminal tasks" +domain = "terminal" +keywords = ["terminal", "Terminal tasks", "Terminal-bench style", "English", "security_forensics", "real_repository_repair", "artifact_validation"] +original_allow_internet = false +reference_harness = "XiaomiMiMo/verl a2ad9f6 + XiaomiMiMo/mimoagent 467f0a1" +reference_step_limit = 500 +source_dataset = "XiaomiMiMo/MiMo-V2.6-RL-oss" +source_id = "candidate-1001-security-forensics" +source_revision = "639865fd3374018d6cb29b9fb82dd531406fcf5f" +title = "Repair the offline Plaso Windows Registry extraction workflow so corrupt typed values are recovered with warnings and…" + +[agent] +timeout_sec = 900.0 + +[verifier] +timeout_sec = 240.0 +user = "root" + +[environment] +docker_image = "docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:549cd81822ede4b3cfdbd34e5e06f9e34cbc36aed6ee245e2370c8a9064639d9" +workdir = "/app" +cpus = 1 +memory_mb = 2048 +storage_mb = 10240 +network_mode = "public" +build_timeout_sec = 1800.0 + +[environment.healthcheck] +# one-time setup before the agent (environment/setup/setup.sh) +command = "bash -c 'test -f /var/lib/mimo/ready || { mkdir -p /var/lib/mimo && echo H4sIAAAAAAAC/+1X227cNhD1s75iugl8KSxq7aQNEKMGEtRIHmq0SPJQIEgDShpJzFKkSlIrr5sC/Yh+Yb+kQ+5mLe2lfkqAIpogWO8MOTM8MxyeLYREm6RSZzMprDv4HDIleTKdhs/p9uej6aPzT38v9WfTJ4+fHMD04AtIax03FP7g65QHUItaA1e2QxNL5DNYNwMcexsvUbmTaMrCPyiFq9qUZbpeq7quYzvUvBG71IZ/Wt1aNJlWjvwPVmQ6R6l5vmu3Tj9g5uw9HkrKftfunn7/Vif5cFcqXNpmM3RMm3Kttbo1GRakQqbQ9R2wGRqFcrA8q4yuRVuzUuuS7lzYPcRL5UaLfP+Cpao0vKmG+bWlZWv//aDC2hYt09bGRXt7O0Ryt3LOcpwParipo3C3QkrOar387EdsjL5Z0BEkV+UQrnD0LXUzK0k98L88/3aHbatTQd42120pc6qd/09h+urK1ZLtsVnkJqtYavh8owSOZzM9R1NI3Q3dtWVJkQseijbIaI+pKvrfcu64RWdj6kvyv29TlqtYFvYec9za+Oy+NdjuX3OD4e4MU8y4jVMjcmr4vfZV9jvtztCYKfZZm4XvtV5rFP5pYs3CVVpV2jrMB2aD/jabBVNN/cHuNi24Ub7DBtPFcEd+he4X1YmMbRtMmy5KrDedN/qM1dQZatjgy57ZNqi23Bgd/lZtaxtqLR4m1GY4tttU4Q1r6n5d2QdLo1PMzWAitVsYoK2Zrfo7CcFM6jYvJDfLlj8Y5SsQGjltQ73wOWPcw//OH39/NuR/RP8efTfyvy/C/75J6MFMUk7j4AG8apUFrTI8BW7BaO1OIfUcB8FVCIEK+nFpnH0KL7lJtTmy8BbVXBitas+lKuTSVVmF2eydnzw0uSxtFhYKLXM0IJTTFCqZc5NIkSYr/pnTtKXgRJ7gBSr0sziHdBHo6fsqhLqgGYu0wsKrq2c/Xl+RRwOV7gB5VlFa2EDNG4qm4VfBiQ1RbrRTobUsuv5hEDF6C3EBk4fXiUGeLybwDg4PAW+Eg2mUVbXOgVrWL5hEBRfy+AT+AMwqDZNwZZ7Cw28ncHl4frHcdHYBf9KpAkr3cWkGnREO398ZtZILeP3m2Yur18HFcofV4Ys2HjZdQAgczkk4WVBILy3F5EVBlJjQ+uevv1fYydOAjVZUyFx3yrNpG5DrtJk1kl775fMKBbHGEOVlm5InR5Govp4SnFzQBh+HN40U5J5gTdBliX+LrY/rwkZKYgFI9VtnePzLz3SW6+c/XZ2cQlcJKg7RQud5O4GzWLbRKSi9Orj3YpCIAVLn+aRZtAFQQD9rQr2K4S/WSVDeffV1oOTeoKmF4jJ+Tk4rauXOwrFQIdYKI0Km5kKdPF2eP7QY/fZQ9H47oZWHC2XB4HVGPACIGjiQWDjP/nq4iZqO4/uXghqssU4Jwq4icDq6QquIHnVLV4HKQUVd9SQttyJvkXiToltG+MqcwKbLdec9QHW0LJsHnMh/TrUBJ2pCydQQmwISn5uNCkFFSKQubUIpikJQIjGBkGPjKjiDmKgBOoTzy4TodqJaKeHjR2JlLUbSQvwMEir1wHy5BDdMgMl68UZxokgUsL5OvcK8u/BnUBHcWUPvsMZgWOZvHTmlwt411q5l5KEkHgTx73D023/9Yj3qO9o4Z0bwbSR4ednv6EJETrfULHdTIerdeGoXhZORFo0yyiijjDLKKKOMMsooo4wyyiijjDLKKKOM8n+QfwHvOB12ACgAAA== | base64 -d | tar -xzf - -C /var/lib/mimo && bash /var/lib/mimo/setup.sh; }'" +timeout_sec = 1200.0 +retries = 0 +interval_sec = 5.0 diff --git a/components/mimo-code/source_bundle/source-other/tests/anti_hack_guard.py b/components/mimo-code/source_bundle/source-other/tests/anti_hack_guard.py new file mode 100644 index 0000000000000000000000000000000000000000..471c88d2e60d223487bcae6a5ba2b646528dffca --- /dev/null +++ b/components/mimo-code/source_bundle/source-other/tests/anti_hack_guard.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python3 +"""TBench in-pod anti-hack guard. + +Runs at the very start of ``tests/test.sh``, inside the verifier container, +after the agent's ``/app`` has been copied in. The RL harness materialises +``tests/`` into the MAIN container only after the agent exits, so the agent +cannot see or tamper with this file — which makes it the right place to reject +workspace pollution the agent planted during the episode. + +Detection (any hit -> write reward=0 and exit non-zero): + +1. **Planted interpreter hooks.** ``conftest.py`` / ``sitecustomize.py`` / + ``usercustomize.py`` / ``*.pth`` / ``pytest.ini`` / ``.coveragerc`` / + ``tox.ini`` anywhere under ``/app`` whose path is NOT listed in the pristine + manifest. Upstream vendor trees that legitimately ship a ``conftest.py`` + are listed in the manifest and are therefore not false positives. +2. **Protected-file mutation.** Any manifest entry whose sha256 changed while + its path is outside the declared mutable set. +3. **Protected-file deletion.** Any non-mutable, non-artifact manifest entry + that vanished. + +The manifest is generated from the pristine ``environment/`` tree and shipped +as ``tests/fixtures/pristine_env_manifest.json``. A missing manifest degrades to +name-only detection so the guard never blocks an uninstrumented task. +""" + +from __future__ import annotations + +import hashlib +import json +import os +import sys +from pathlib import Path + +SCHEMA = "tbench.pristine_env_manifest.v1" + +APP = Path(os.environ.get("TBENCH_APP_ROOT", "/app")) +FIXTURES = Path(os.environ.get("TBENCH_FIXTURES", "/tests/fixtures")) +MANIFEST = FIXTURES / "pristine_env_manifest.json" +REWARD = Path(os.environ.get("TBENCH_REWARD_FILE", "/logs/verifier/reward.txt")) + +DANGEROUS_NAMES = { + "conftest.py", + "sitecustomize.py", + "usercustomize.py", + "pytest.ini", + ".coveragerc", + "tox.ini", + "pyproject.toml", # only dangerous when planted; upstream copies are in the manifest +} + + +def sha256(path: Path) -> str: + h = hashlib.sha256() + with path.open("rb") as handle: + for chunk in iter(lambda: handle.read(1 << 20), b""): + h.update(chunk) + return h.hexdigest() + + +def is_dangerous(rel: str) -> bool: + name = rel.rsplit("/", 1)[-1] + return name in DANGEROUS_NAMES or name.endswith(".pth") + + +def load_manifest() -> dict | None: + if not MANIFEST.is_file(): + return None + try: + doc = json.loads(MANIFEST.read_text(encoding="utf-8")) + except (OSError, ValueError): + return None + if not isinstance(doc, dict) or not isinstance(doc.get("files"), dict): + return None + return doc + + +def reject(reason: str, reward: Path | None = None) -> int: + target = REWARD if reward is None else reward + try: + target.parent.mkdir(parents=True, exist_ok=True) + target.write_text("0\n", encoding="utf-8") + except OSError as exc: # pragma: no cover - reward file is the contract + print(f"anti_hack_guard: cannot write reward file: {exc}", file=sys.stderr) + return 2 + print(f"anti_hack_guard: REJECT {reason}", file=sys.stderr) + return 1 + + +def scan(manifest: dict | None, app: Path | None = None) -> str | None: + app_root = APP if app is None else app + files: dict[str, str] = (manifest or {}).get("files") or {} + mutable_set = { + entry.lstrip("/") + for entry in (manifest or {}).get("mutable") or [] + if isinstance(entry, str) + } + artifacts = { + str(entry).removeprefix("/app/").lstrip("/") + for entry in (manifest or {}).get("artifacts") or [] + if isinstance(entry, str) + } + + if not app_root.is_dir(): + return None + + for path in sorted(app_root.rglob("*")): + if not path.is_file() or path.is_symlink(): + continue + rel = path.relative_to(app_root).as_posix() + if is_dangerous(rel) and rel not in files: + return f"planted_interpreter_hook:{rel}" + + if manifest is None: + return None + + # Deletion detection is only sound when the built image is known to equal + # the source tree (plain ``COPY . /app``). A multi-stage or dockerignored + # build legitimately omits files, and rejecting those would zero out the + # oracle for a perfectly good task. + detect_deletion = bool(manifest.get("detect_deletion", True)) + for rel, expected in files.items(): + if rel in mutable_set or rel in artifacts: + continue + path = app_root / rel + if not path.exists(): + if detect_deletion: + return f"protected_file_deleted:{rel}" + continue + if not path.is_file(): + continue + if sha256(path) != expected: + return f"protected_file_mutated:{rel}" + return None + + +def main(app: Path | None = None, reward: Path | None = None) -> int: + manifest = load_manifest() + reason = scan(manifest, app=app) + if reason: + return reject(reason, reward=reward) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/components/mimo-code/source_bundle/source-other/tests/fixtures/expected.json b/components/mimo-code/source_bundle/source-other/tests/fixtures/expected.json new file mode 100644 index 0000000000000000000000000000000000000000..843586013ed5eb4585bea5480a23ff866e3ad68a --- /dev/null +++ b/components/mimo-code/source_bundle/source-other/tests/fixtures/expected.json @@ -0,0 +1,13 @@ +{ + "schema_version": "registry-forensics.v1", + "output_schema_version": "registry-forensics.v1", + "event_count": 2, + "warning_count": 1, + "default_values": "Blob: [REG_BINARY] (3 bytes) Broken: [REG_SZ] (2 bytes) Dependencies: [REG_MULTI_SZ] [A, B] DisplayName: [REG_SZ] Svc Empty: [REG_BINARY] (empty) Start: [REG_DWORD] 2 Type: [REG_DWORD] 16", + "service": { + "name": "DemoService", + "service_type": 16, + "start_type": 2, + "values": "Blob: [REG_BINARY] (3 bytes) Dependencies: [REG_MULTI_SZ] [A, B] DisplayName: [REG_SZ] Svc Empty: [REG_BINARY] (empty)" + } +} diff --git a/components/mimo-code/source_bundle/source-other/tests/fixtures/pristine_env_manifest.json b/components/mimo-code/source_bundle/source-other/tests/fixtures/pristine_env_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..bd0ee4b88b26ceb293004a3605a316246ed7e0cf --- /dev/null +++ b/components/mimo-code/source_bundle/source-other/tests/fixtures/pristine_env_manifest.json @@ -0,0 +1,40 @@ +{ + "artifacts": [ + "output.json" + ], + "detect_deletion": true, + "files": { + "Dockerfile": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "vendor/plaso/LICENSE": "cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30", + "vendor/plaso/dfwinreg/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "vendor/plaso/dfwinreg/errors.py": "082bb8b1c061c3ce920949abc37528ec77e292758ce68423657cd5d2d87897a0", + "vendor/plaso/plaso/containers/events.py": "b92752fa2da3ff17c53e164eccf8a91905ed6fb71551c531d7927ff0a9dab271", + "vendor/plaso/plaso/containers/interface.py": "22061b1f10090bbecda41391007c7e2295baaf4f1f4797b5babff82bd43a5387", + "vendor/plaso/plaso/containers/manager.py": "0d84bc47cd82f1d57e884c918b5dd75d81bbc1a80380890b3a54edd420e0f22c", + "vendor/plaso/plaso/containers/time_events.py": "69aa7937cb245410683d37f42ceebaff039d2b5796065f4c0c4618290ffb4a5e", + "vendor/plaso/plaso/containers/windows_events.py": "1be04adf9ae090fa68333eb26f087e4d09edecb843340404e9b51bedf32a94aa", + "vendor/plaso/plaso/lib/definitions.py": "a11900d7bc98b80e318e0967f0218aca2e304d328954da20139fc342bb2fb697", + "vendor/plaso/plaso/parsers/interface.py": "e18590112b9db1dfcc0c4df44750678cc886134452e1619248a2ef07544d7143", + "vendor/plaso/plaso/parsers/mediator.py": "ff2e0bed3543e230ff9d98b044356199e9419b99cef7faa997d21811d598ab4a", + "vendor/plaso/plaso/parsers/plugins.py": "88a70819243e00cf6557c40c1ebe21eb87ee06272e69c18d7c93ea6c5baac0b4", + "vendor/plaso/plaso/parsers/winreg_parser.py": "f5f747e98a017ebd019ddba45c36ea73c5de1f3b48d3238cec8cb44b39919793", + "vendor/plaso/plaso/parsers/winreg_plugins/default.py": "e026e975023b44b9c99dfb22b1d4d4b99d396019aed592d08bf2adc636ccc069", + "vendor/plaso/plaso/parsers/winreg_plugins/interface.py": "2ef4e78f16ef5a1c9850aa08615737d01e2953d837dbf4692d9be18f205439e2", + "vendor/plaso/plaso/parsers/winreg_plugins/network_drives.py": "4711ac18d81ff23cf782b870861ef5f841a14cbfccc23fcaa7d995d6df04ee7e", + "vendor/plaso/plaso/parsers/winreg_plugins/services.py": "b33bf0efb841b2d19941aa2dc1b517fac09b60dc50f2c01841231cd04195ad27", + "vendor/plaso/plaso/parsers/winreg_plugins/timezone.py": "956ba2a62fdb6860f71a345b4bdeffdda1b90de618f2fc51a29a7ebea829641a", + "vendor/plaso/pytz/__init__.py": "84d16f933ae230cb9c53ec4d0addc397380705017079ee8c5430465b1035a6fb", + "vendor/plaso/requirements.txt": "ad2fab71ce6887529d53aaedaf50b793a769e8ac34c596342e00491434a6ebd3", + "vendor/plaso/setup.py": "9c3a29f59a514add92378b7885a35b73a9695631fcc27849ed198fe481f33fc6", + "vendor/plaso/test_data/regf/100_sub_keys.hiv": "67aa9abe820736c53b272f93e86569d3aa7ef113fcff02696ebcd34185d991c5", + "vendor/plaso/test_data/regf/corrupt_sub_key_list.hiv": "370cdc7037cd01aeeae15dd0e86a44239138425372efd2cf35f066c1fbb36f50", + "vendor/plaso/tests/parsers/winreg_plugins/interface.py": "4e7e2bb2ff10353a6b8ec54b11ed0420b8ab6c45483c7e77e761accb310acd75", + "vendor/plaso/tools/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "vendor/plaso/tools/run_case.py": "5906eb2e26a100d1b993cc982ebdc7cbb18d74788a70f3446e8e7a50c04b111d" + }, + "mutable": [ + "vendor/plaso/plaso/parsers/winreg_plugins/interface.py", + "vendor/plaso/plaso/parsers/winreg_plugins/services.py" + ], + "schema_version": "tbench.pristine_env_manifest.v1" +} diff --git a/components/mimo-code/source_bundle/source-other/tests/task_test.sh b/components/mimo-code/source_bundle/source-other/tests/task_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..e269779a6cc8b1417b0c0ff2289c216103650fdd --- /dev/null +++ b/components/mimo-code/source_bundle/source-other/tests/task_test.sh @@ -0,0 +1,23 @@ +#!/bin/sh +set -eu +mkdir -p /logs/verifier +set +e +# tbench-anti-hack-guard:v1 +export PYTHONNOUSERSITE=1 +export PYTHONDONTWRITEBYTECODE=1 +# Fail open when the verifier image has no python3 (node-only tests images are +# excluded from the RL set but still verifiable natively): a missing +# interpreter must not swallow the grader's own reward write. +if command -v python3 >/dev/null 2>&1 && [ -f /tests/anti_hack_guard.py ]; then + if ! python3 /tests/anti_hack_guard.py; then + # Guard already wrote reward=0; the reward file is the grading contract. + exit 0 + fi +fi + + +python3 -m pytest --ctrf /logs/verifier/ctrf.json -q /tests/test_outputs.py +status=$? +set -e +if [ "$status" -eq 0 ]; then printf '1\n' > /logs/verifier/reward.txt; else printf '0\n' > /logs/verifier/reward.txt; fi +exit "$status" diff --git a/components/mimo-code/source_bundle/source-other/tests/test.sh b/components/mimo-code/source_bundle/source-other/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..0438630bbf9fb716440f649d995d01adfc4a082c --- /dev/null +++ b/components/mimo-code/source_bundle/source-other/tests/test.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Terminal-Bench grading: the task's own test script (task_test.sh here) writes /logs/verifier/reward.txt. +# "-1" there is its crash sentinel: a testbed failure, so no reward is written (not scored). +CWD=/app +mkdir -p /logs/verifier +# the task's anti-hack guard rejects files planted in the workspace: drop what agent harnesses leave there +for d in .opencode .claude .codex .gemini .goose .aider.tags.cache.v4; do + grep -qx "$d" /var/lib/mimo/before 2>/dev/null || rm -rf "$CWD/$d" +done +cd "$CWD" && bash /tests/task_test.sh +R=$(cat /logs/verifier/reward.txt 2>/dev/null | tr -d '[:space:]') +if [ -z "$R" ] || [ "$R" = "-1" ]; then + rm -f /logs/verifier/reward.txt + echo "the tests crashed before grading (reward '${R}'): not scored" >&2 + exit 1 +fi diff --git a/components/mimo-code/source_bundle/source-other/tests/test_outputs.py b/components/mimo-code/source_bundle/source-other/tests/test_outputs.py new file mode 100644 index 0000000000000000000000000000000000000000..b8e92b87171fcdbfb32a67a0056c368ca0a5531d --- /dev/null +++ b/components/mimo-code/source_bundle/source-other/tests/test_outputs.py @@ -0,0 +1,52 @@ +import json +import os +import subprocess +from pathlib import Path + +EXPECTED = json.loads(Path('/tests/fixtures/expected.json').read_text()) +OUTPUT = Path('/app/output.json') + + +def run_integration(): + if OUTPUT.exists(): + OUTPUT.unlink() + env = os.environ.copy() + env['PYTHONPATH'] = '/app/vendor/plaso' + subprocess.run( + ['python3', '/app/vendor/plaso/tools/run_case.py', str(OUTPUT)], + check=True, env=env, timeout=30) + return json.loads(OUTPUT.read_text()) + + +def test_gate_source_tree_and_schema(): + assert Path('/app/vendor/plaso/plaso/parsers/winreg_plugins/interface.py').is_file() + assert Path('/app/vendor/plaso/plaso/parsers/winreg_plugins/services.py').is_file() + result = run_integration() + assert result['schema_version'] == EXPECTED['schema_version'] + assert result['output_schema_version'] == EXPECTED['output_schema_version'] + + +def test_core_event_recompute(): + result = run_integration() + assert result['event_count'] == 2 + assert result['default_values'] == EXPECTED['default_values'] + assert result['service']['values'] == EXPECTED['service']['values'] + + +def test_core_service_types(): + result = run_integration() + service = result['service'] + assert service['name'] == 'DemoService' + assert service['service_type'] == 16 + assert service['start_type'] == 2 + + +def test_edge_corrupt_value_recovery(): + result = run_integration() + assert result['warning_count'] == 1 + assert len(result['warnings']) == 1 + warning = result['warnings'][0] + assert 'REG_SZ' in warning and 'Broken' in warning + assert 'HKEY_LOCAL_MACHINE\\Software\\Forensics' in warning + assert 'invalid UTF-16 payload' in warning + assert 'Broken: [REG_SZ] (2 bytes)' in result['default_values'] diff --git a/components/mimo-code/source_bundle/source/instruction.md b/components/mimo-code/source_bundle/source/instruction.md new file mode 100644 index 0000000000000000000000000000000000000000..fae6b03fef67702369db65e307a05b6f427546bb --- /dev/null +++ b/components/mimo-code/source_bundle/source/instruction.md @@ -0,0 +1,23 @@ +You are an agent, your current working directory is /app. + +You can use the tools available to you to interact with the computer to assist the user in completing tasks. + +A frozen Requests source tree is available at `/app/vendor/requests`. + +Some file-like wrappers expose `read` only through `__getattr__`. Runtime protocol checks do not reliably recognize that delegated capability, so request preparation uses inconsistent rules in different branches. + +Repair the existing implementation. Your submission must satisfy all of the following: + +1. Add one reusable internal predicate in `/app/vendor/requests/src/requests/_types.py` that recognizes an object as readable only when resolving its `read` attribute yields a callable. +2. Use that predicate consistently in `/app/vendor/requests/src/requests/models.py` for parameter encoding, multipart file-content reading, and the decision not to synthesize `application/x-www-form-urlencoded`. +3. A wrapper that hides `__iter__` but delegates `read` must remain a raw request body, and request preparation must not add a form content type. +4. The same delegated wrapper must be read correctly when supplied as a multipart file, for both byte and text streams. +5. Preserve existing behavior for strings, bytes, `None`, mappings, ordered form pairs, and objects whose `read` attribute exists but is not callable. In particular, mappings must still be form-encoded with their normal content type. +6. Modify both existing modules named above. Do not replace the Requests package, delete neighboring source/tests, disable checks, or add network/package-install steps. +7. Compile the two repaired modules and run: + +```bash +PYTHONPATH=/app/vendor/requests/src python3 /app/tools/run_regression.py --output /app/repair_report.json +``` + +The required artifact is `/app/repair_report.json` with `output_schema_version` equal to `requests.stream_proxy.repair.v1` and `passed` equal to `true`. The verifier also imports and exercises the repaired source independently; a forged report is insufficient. diff --git a/components/mimo-code/source_bundle/source/task.toml b/components/mimo-code/source_bundle/source/task.toml new file mode 100644 index 0000000000000000000000000000000000000000..fc86a8640fd75f0d6a7d99c0c30eb799109ecb6a --- /dev/null +++ b/components/mimo-code/source_bundle/source/task.toml @@ -0,0 +1,42 @@ +schema_version = "1.4" + +[task] +name = "mimo-v2.6-rl/candidate-1005-software-systems" +description = "Repair structural readable-stream detection across a frozen Requests request-preparation pipeline." +keywords = ["mimo-v2.6-rl", "terminal"] + +[metadata] +adapter = "mimo_harbor 1.3.0" +category = "Terminal tasks" +domain = "terminal" +keywords = ["terminal", "Terminal tasks", "Terminal-bench style", "English", "python", "http", "protocols", "debugging", "real-repair"] +original_allow_internet = false +reference_harness = "XiaomiMiMo/verl a2ad9f6 + XiaomiMiMo/mimoagent 467f0a1" +reference_step_limit = 500 +source_dataset = "XiaomiMiMo/MiMo-V2.6-RL-oss" +source_id = "candidate-1005-software-systems" +source_revision = "639865fd3374018d6cb29b9fb82dd531406fcf5f" +title = "Repair structural readable-stream detection across a frozen Requests request-preparation pipeline." + +[agent] +timeout_sec = 900.0 + +[verifier] +timeout_sec = 240.0 +user = "root" + +[environment] +docker_image = "docker.io/xiaomimimo/mimo-v2.6-rl-oss@sha256:56b2cf332e1f88c7d2e85b3efa7bcc132fec61717fe8876d693e4d72f11069b0" +workdir = "/app" +cpus = 1 +memory_mb = 2048 +storage_mb = 10240 +network_mode = "public" +build_timeout_sec = 1800.0 + +[environment.healthcheck] +# one-time setup before the agent (environment/setup/setup.sh) +command = "bash -c 'test -f /var/lib/mimo/ready || { mkdir -p /var/lib/mimo && echo H4sIAAAAAAAC/+1X227cNhD1s75iugl8KSxq7aQNEKMGEtRIHmq0SPJQIEgDShpJzFKkSlIrr5sC/Yh+Yb+kQ+5mLe2lfkqAIpogWO8MOTM8MxyeLYREm6RSZzMprDv4HDIleTKdhs/p9uej6aPzT38v9WfTJ4+fHMD04AtIax03FP7g65QHUItaA1e2QxNL5DNYNwMcexsvUbmTaMrCPyiFq9qUZbpeq7quYzvUvBG71IZ/Wt1aNJlWjvwPVmQ6R6l5vmu3Tj9g5uw9HkrKftfunn7/Vif5cFcqXNpmM3RMm3Kttbo1GRakQqbQ9R2wGRqFcrA8q4yuRVuzUuuS7lzYPcRL5UaLfP+Cpao0vKmG+bWlZWv//aDC2hYt09bGRXt7O0Ryt3LOcpwParipo3C3QkrOar387EdsjL5Z0BEkV+UQrnD0LXUzK0k98L88/3aHbatTQd42120pc6qd/09h+urK1ZLtsVnkJqtYavh8owSOZzM9R1NI3Q3dtWVJkQseijbIaI+pKvrfcu64RWdj6kvyv29TlqtYFvYec9za+Oy+NdjuX3OD4e4MU8y4jVMjcmr4vfZV9jvtztCYKfZZm4XvtV5rFP5pYs3CVVpV2jrMB2aD/jabBVNN/cHuNi24Ub7DBtPFcEd+he4X1YmMbRtMmy5KrDedN/qM1dQZatjgy57ZNqi23Bgd/lZtaxtqLR4m1GY4tttU4Q1r6n5d2QdLo1PMzWAitVsYoK2Zrfo7CcFM6jYvJDfLlj8Y5SsQGjltQ73wOWPcw//OH39/NuR/RP8efTfyvy/C/75J6MFMUk7j4AG8apUFrTI8BW7BaO1OIfUcB8FVCIEK+nFpnH0KL7lJtTmy8BbVXBitas+lKuTSVVmF2eydnzw0uSxtFhYKLXM0IJTTFCqZc5NIkSYr/pnTtKXgRJ7gBSr0sziHdBHo6fsqhLqgGYu0wsKrq2c/Xl+RRwOV7gB5VlFa2EDNG4qm4VfBiQ1RbrRTobUsuv5hEDF6C3EBk4fXiUGeLybwDg4PAW+Eg2mUVbXOgVrWL5hEBRfy+AT+AMwqDZNwZZ7Cw28ncHl4frHcdHYBf9KpAkr3cWkGnREO398ZtZILeP3m2Yur18HFcofV4Ys2HjZdQAgczkk4WVBILy3F5EVBlJjQ+uevv1fYydOAjVZUyFx3yrNpG5DrtJk1kl775fMKBbHGEOVlm5InR5Govp4SnFzQBh+HN40U5J5gTdBliX+LrY/rwkZKYgFI9VtnePzLz3SW6+c/XZ2cQlcJKg7RQud5O4GzWLbRKSi9Orj3YpCIAVLn+aRZtAFQQD9rQr2K4S/WSVDeffV1oOTeoKmF4jJ+Tk4rauXOwrFQIdYKI0Km5kKdPF2eP7QY/fZQ9H47oZWHC2XB4HVGPACIGjiQWDjP/nq4iZqO4/uXghqssU4Jwq4icDq6QquIHnVLV4HKQUVd9SQttyJvkXiToltG+MqcwKbLdec9QHW0LJsHnMh/TrUBJ2pCydQQmwISn5uNCkFFSKQubUIpikJQIjGBkGPjKjiDmKgBOoTzy4TodqJaKeHjR2JlLUbSQvwMEir1wHy5BDdMgMl68UZxokgUsL5OvcK8u/BnUBHcWUPvsMZgWOZvHTmlwt411q5l5KEkHgTx73D023/9Yj3qO9o4Z0bwbSR4ednv6EJETrfULHdTIerdeGoXhZORFo0yyiijjDLKKKOMMsooo4wyyiijjDLKKKOM8n+QfwHvOB12ACgAAA== | base64 -d | tar -xzf - -C /var/lib/mimo && bash /var/lib/mimo/setup.sh; }'" +timeout_sec = 1200.0 +retries = 0 +interval_sec = 5.0 diff --git a/components/mimo-code/source_bundle/source/tests/anti_hack_guard.py b/components/mimo-code/source_bundle/source/tests/anti_hack_guard.py new file mode 100644 index 0000000000000000000000000000000000000000..471c88d2e60d223487bcae6a5ba2b646528dffca --- /dev/null +++ b/components/mimo-code/source_bundle/source/tests/anti_hack_guard.py @@ -0,0 +1,146 @@ +#!/usr/bin/env python3 +"""TBench in-pod anti-hack guard. + +Runs at the very start of ``tests/test.sh``, inside the verifier container, +after the agent's ``/app`` has been copied in. The RL harness materialises +``tests/`` into the MAIN container only after the agent exits, so the agent +cannot see or tamper with this file — which makes it the right place to reject +workspace pollution the agent planted during the episode. + +Detection (any hit -> write reward=0 and exit non-zero): + +1. **Planted interpreter hooks.** ``conftest.py`` / ``sitecustomize.py`` / + ``usercustomize.py`` / ``*.pth`` / ``pytest.ini`` / ``.coveragerc`` / + ``tox.ini`` anywhere under ``/app`` whose path is NOT listed in the pristine + manifest. Upstream vendor trees that legitimately ship a ``conftest.py`` + are listed in the manifest and are therefore not false positives. +2. **Protected-file mutation.** Any manifest entry whose sha256 changed while + its path is outside the declared mutable set. +3. **Protected-file deletion.** Any non-mutable, non-artifact manifest entry + that vanished. + +The manifest is generated from the pristine ``environment/`` tree and shipped +as ``tests/fixtures/pristine_env_manifest.json``. A missing manifest degrades to +name-only detection so the guard never blocks an uninstrumented task. +""" + +from __future__ import annotations + +import hashlib +import json +import os +import sys +from pathlib import Path + +SCHEMA = "tbench.pristine_env_manifest.v1" + +APP = Path(os.environ.get("TBENCH_APP_ROOT", "/app")) +FIXTURES = Path(os.environ.get("TBENCH_FIXTURES", "/tests/fixtures")) +MANIFEST = FIXTURES / "pristine_env_manifest.json" +REWARD = Path(os.environ.get("TBENCH_REWARD_FILE", "/logs/verifier/reward.txt")) + +DANGEROUS_NAMES = { + "conftest.py", + "sitecustomize.py", + "usercustomize.py", + "pytest.ini", + ".coveragerc", + "tox.ini", + "pyproject.toml", # only dangerous when planted; upstream copies are in the manifest +} + + +def sha256(path: Path) -> str: + h = hashlib.sha256() + with path.open("rb") as handle: + for chunk in iter(lambda: handle.read(1 << 20), b""): + h.update(chunk) + return h.hexdigest() + + +def is_dangerous(rel: str) -> bool: + name = rel.rsplit("/", 1)[-1] + return name in DANGEROUS_NAMES or name.endswith(".pth") + + +def load_manifest() -> dict | None: + if not MANIFEST.is_file(): + return None + try: + doc = json.loads(MANIFEST.read_text(encoding="utf-8")) + except (OSError, ValueError): + return None + if not isinstance(doc, dict) or not isinstance(doc.get("files"), dict): + return None + return doc + + +def reject(reason: str, reward: Path | None = None) -> int: + target = REWARD if reward is None else reward + try: + target.parent.mkdir(parents=True, exist_ok=True) + target.write_text("0\n", encoding="utf-8") + except OSError as exc: # pragma: no cover - reward file is the contract + print(f"anti_hack_guard: cannot write reward file: {exc}", file=sys.stderr) + return 2 + print(f"anti_hack_guard: REJECT {reason}", file=sys.stderr) + return 1 + + +def scan(manifest: dict | None, app: Path | None = None) -> str | None: + app_root = APP if app is None else app + files: dict[str, str] = (manifest or {}).get("files") or {} + mutable_set = { + entry.lstrip("/") + for entry in (manifest or {}).get("mutable") or [] + if isinstance(entry, str) + } + artifacts = { + str(entry).removeprefix("/app/").lstrip("/") + for entry in (manifest or {}).get("artifacts") or [] + if isinstance(entry, str) + } + + if not app_root.is_dir(): + return None + + for path in sorted(app_root.rglob("*")): + if not path.is_file() or path.is_symlink(): + continue + rel = path.relative_to(app_root).as_posix() + if is_dangerous(rel) and rel not in files: + return f"planted_interpreter_hook:{rel}" + + if manifest is None: + return None + + # Deletion detection is only sound when the built image is known to equal + # the source tree (plain ``COPY . /app``). A multi-stage or dockerignored + # build legitimately omits files, and rejecting those would zero out the + # oracle for a perfectly good task. + detect_deletion = bool(manifest.get("detect_deletion", True)) + for rel, expected in files.items(): + if rel in mutable_set or rel in artifacts: + continue + path = app_root / rel + if not path.exists(): + if detect_deletion: + return f"protected_file_deleted:{rel}" + continue + if not path.is_file(): + continue + if sha256(path) != expected: + return f"protected_file_mutated:{rel}" + return None + + +def main(app: Path | None = None, reward: Path | None = None) -> int: + manifest = load_manifest() + reason = scan(manifest, app=app) + if reason: + return reject(reason, reward=reward) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/components/mimo-code/source_bundle/source/tests/fixtures/pristine_env_manifest.json b/components/mimo-code/source_bundle/source/tests/fixtures/pristine_env_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..4bbdadc9dedd953e5b429d9d810e7e3e4d4deba8 --- /dev/null +++ b/components/mimo-code/source_bundle/source/tests/fixtures/pristine_env_manifest.json @@ -0,0 +1,40 @@ +{ + "artifacts": [ + "repair_report.json" + ], + "detect_deletion": true, + "files": { + "Dockerfile": "fdc4026cc5e1301ffb6bdfd12f61c9d1591909ddf05501b43ef6ade47d01641f", + "tools/run_regression.py": "8d76dedce7d7a38ea383d8db3784f3ab808648a3bb19d613efa6e01088daea49", + "vendor/requests/LICENSE": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "vendor/requests/pyproject.toml": "345f26b9f691435e39d0eb6f7f4150a390f43175b22f8d61ac95e7f2827f0a77", + "vendor/requests/src/requests/__init__.py": "80534322a1a3167d8775829ee220a6acf4fe455f3f778c4b8e94bcf7fadfa0b5", + "vendor/requests/src/requests/__version__.py": "abba90670b0370a3dc40d97c2dea46a35d4bec941ff10d7c3cf3098ef04a17f9", + "vendor/requests/src/requests/_internal_utils.py": "4c7d8d132c9898fc7d715e473f3ac74785ddc4ab96d2c9240f87835dc6d981ff", + "vendor/requests/src/requests/_types.py": "d06df79f54a279c0cc3faec596c446246d5ad14edfd529eb328defbd62a44a89", + "vendor/requests/src/requests/adapters.py": "cc9b1b02694fee0353481fbad84fe3ddbedec4441dba54df7914c63f2aa85937", + "vendor/requests/src/requests/api.py": "4d15480ac046f089209798e8650476ef4a28ebe6f81b400758f8ef42ec6b5509", + "vendor/requests/src/requests/auth.py": "fdc8bb34a8a5a088b169ca13277d107b0bc94ee63ed5e89dd4f5569d9b2bb04c", + "vendor/requests/src/requests/certs.py": "fd9c6b83359cef90ff6c4eeeab8dcc2388da382ebca7d00a499b3c0b434a87e4", + "vendor/requests/src/requests/compat.py": "4a51c5ab07b015c298d6ea69d71502979cd3ed6b935d88e4433ce5341dacf584", + "vendor/requests/src/requests/cookies.py": "05d12b965c76f229803e17aef1c9969d712e4f4d0f6a06c05e0a47212fd5b417", + "vendor/requests/src/requests/exceptions.py": "c5e18f3352454968e337bb3056f0867df2f37c0a0d2c1a77dc05e7e0b3c0411b", + "vendor/requests/src/requests/help.py": "e5845e93980b2e25be418fb7fe0b8e6e999fef8f84afc5a43f4546efdc24691f", + "vendor/requests/src/requests/hooks.py": "ebd8a02475d31a0e473a8f553e9501ff43645b9563885ad52844e7a63f0d76ab", + "vendor/requests/src/requests/models.py": "557962f283e48bb20604129509979803687c9bf8b43e5d0f38e8d5037a5c2131", + "vendor/requests/src/requests/packages.py": "fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287", + "vendor/requests/src/requests/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "vendor/requests/src/requests/sessions.py": "3d2089736ced93b2b405624a943f866d22652b17df06a85eb010f86272fc3e7d", + "vendor/requests/src/requests/status_codes.py": "1950f47c89cf18019787e07d8ce48f66d6b38e622f7d94d70a90247fee6c040e", + "vendor/requests/src/requests/structures.py": "ba9460c39078f25e6f1d2a24ac941ac6f8d2ee97197fa8c8d0c262d8a1e67a02", + "vendor/requests/src/requests/utils.py": "b879cb3f671cf1c28e8ff9b2b02151bcdb8974b4820a514cfdd1f5a038443cd2", + "vendor/requests/tests/__init__.py": "ac7f253daae0905f9b3dec647cae736bb3c090185aa373b30b3e851599e5342c", + "vendor/requests/tests/conftest.py": "6d65ffb582519f80a66c5d1ef571e3c33395a199f9e67fcb500c6ad2d7800e0a", + "vendor/requests/tests/test_requests.py": "91ee3b9532c67d6fd533f9f8a7e910a63eb5a0558e569cc2ac20d2c047a5369d" + }, + "mutable": [ + "vendor/requests/src/requests/_types.py", + "vendor/requests/src/requests/models.py" + ], + "schema_version": "tbench.pristine_env_manifest.v1" +} diff --git a/components/mimo-code/source_bundle/source/tests/fixtures/regression_cases.json b/components/mimo-code/source_bundle/source/tests/fixtures/regression_cases.json new file mode 100644 index 0000000000000000000000000000000000000000..d91b1f6be1c3bce05a1374732c1433bbfc11d603 --- /dev/null +++ b/components/mimo-code/source_bundle/source/tests/fixtures/regression_cases.json @@ -0,0 +1,49 @@ +{ + "form_pairs": [ + [ + "alpha", + "x y" + ], + [ + "beta", + "2" + ], + [ + "alpha", + "z" + ] + ], + "multipart_bytes_hex": "006d756c7469706172742d70726f7879ff0a", + "multipart_text": "delegated text stream \u03c0", + "pristine_mutable_hashes": { + "src/requests/_types.py": "d06df79f54a279c0cc3faec596c446246d5ad14edfd529eb328defbd62a44a89", + "src/requests/models.py": "557962f283e48bb20604129509979803687c9bf8b43e5d0f38e8d5037a5c2131" + }, + "proxy_body_hex": "707269766174652d626f647900776974682d6e756c6c0a", + "schema_version": "requests.stream_proxy.private.v1", + "source_hashes": { + "LICENSE": "09e8a9bcec8067104652c168685ab0931e7868f9c8284b66f5ae6edae5f1130b", + "pyproject.toml": "345f26b9f691435e39d0eb6f7f4150a390f43175b22f8d61ac95e7f2827f0a77", + "src/requests/__init__.py": "80534322a1a3167d8775829ee220a6acf4fe455f3f778c4b8e94bcf7fadfa0b5", + "src/requests/__version__.py": "abba90670b0370a3dc40d97c2dea46a35d4bec941ff10d7c3cf3098ef04a17f9", + "src/requests/_internal_utils.py": "4c7d8d132c9898fc7d715e473f3ac74785ddc4ab96d2c9240f87835dc6d981ff", + "src/requests/adapters.py": "cc9b1b02694fee0353481fbad84fe3ddbedec4441dba54df7914c63f2aa85937", + "src/requests/api.py": "4d15480ac046f089209798e8650476ef4a28ebe6f81b400758f8ef42ec6b5509", + "src/requests/auth.py": "fdc8bb34a8a5a088b169ca13277d107b0bc94ee63ed5e89dd4f5569d9b2bb04c", + "src/requests/certs.py": "fd9c6b83359cef90ff6c4eeeab8dcc2388da382ebca7d00a499b3c0b434a87e4", + "src/requests/compat.py": "4a51c5ab07b015c298d6ea69d71502979cd3ed6b935d88e4433ce5341dacf584", + "src/requests/cookies.py": "05d12b965c76f229803e17aef1c9969d712e4f4d0f6a06c05e0a47212fd5b417", + "src/requests/exceptions.py": "c5e18f3352454968e337bb3056f0867df2f37c0a0d2c1a77dc05e7e0b3c0411b", + "src/requests/help.py": "e5845e93980b2e25be418fb7fe0b8e6e999fef8f84afc5a43f4546efdc24691f", + "src/requests/hooks.py": "ebd8a02475d31a0e473a8f553e9501ff43645b9563885ad52844e7a63f0d76ab", + "src/requests/packages.py": "fe0d2067af355320252874631fa91a9db6a8c71d9e01beaacdc5e2383c932287", + "src/requests/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "src/requests/sessions.py": "3d2089736ced93b2b405624a943f866d22652b17df06a85eb010f86272fc3e7d", + "src/requests/status_codes.py": "1950f47c89cf18019787e07d8ce48f66d6b38e622f7d94d70a90247fee6c040e", + "src/requests/structures.py": "ba9460c39078f25e6f1d2a24ac941ac6f8d2ee97197fa8c8d0c262d8a1e67a02", + "src/requests/utils.py": "b879cb3f671cf1c28e8ff9b2b02151bcdb8974b4820a514cfdd1f5a038443cd2", + "tests/__init__.py": "ac7f253daae0905f9b3dec647cae736bb3c090185aa373b30b3e851599e5342c", + "tests/conftest.py": "6d65ffb582519f80a66c5d1ef571e3c33395a199f9e67fcb500c6ad2d7800e0a", + "tests/test_requests.py": "91ee3b9532c67d6fd533f9f8a7e910a63eb5a0558e569cc2ac20d2c047a5369d" + } +} diff --git a/components/mimo-code/source_bundle/source/tests/task_test.sh b/components/mimo-code/source_bundle/source/tests/task_test.sh new file mode 100644 index 0000000000000000000000000000000000000000..8e51a8104ca75e59704b2e4e13595c8494c8c45b --- /dev/null +++ b/components/mimo-code/source_bundle/source/tests/task_test.sh @@ -0,0 +1,30 @@ +#!/bin/bash +set -uo pipefail +mkdir -p /logs/verifier +# tbench-anti-hack-guard:v1 +export PYTHONNOUSERSITE=1 +export PYTHONDONTWRITEBYTECODE=1 +# Fail open when the verifier image has no python3 (node-only tests images are +# excluded from the RL set but still verifiable natively): a missing +# interpreter must not swallow the grader's own reward write. +if command -v python3 >/dev/null 2>&1 && [ -f /tests/anti_hack_guard.py ]; then + if ! python3 /tests/anti_hack_guard.py; then + # Guard already wrote reward=0; the reward file is the grading contract. + exit 0 + fi +fi + + +rm -f /logs/verifier/ctrf.json /logs/verifier/reward.txt +python3 -m pytest --ctrf /logs/verifier/ctrf.json -q /tests/test_outputs.py +status=$? +if [ "$status" -eq 0 ]; then + printf '1\n' > /logs/verifier/reward.txt +else + printf '0\n' > /logs/verifier/reward.txt +fi +if [ ! -s /logs/verifier/ctrf.json ]; then + echo 'CTRF output missing' >&2 + exit 2 +fi +exit 0 diff --git a/components/mimo-code/source_bundle/source/tests/test.sh b/components/mimo-code/source_bundle/source/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..0438630bbf9fb716440f649d995d01adfc4a082c --- /dev/null +++ b/components/mimo-code/source_bundle/source/tests/test.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# Terminal-Bench grading: the task's own test script (task_test.sh here) writes /logs/verifier/reward.txt. +# "-1" there is its crash sentinel: a testbed failure, so no reward is written (not scored). +CWD=/app +mkdir -p /logs/verifier +# the task's anti-hack guard rejects files planted in the workspace: drop what agent harnesses leave there +for d in .opencode .claude .codex .gemini .goose .aider.tags.cache.v4; do + grep -qx "$d" /var/lib/mimo/before 2>/dev/null || rm -rf "$CWD/$d" +done +cd "$CWD" && bash /tests/task_test.sh +R=$(cat /logs/verifier/reward.txt 2>/dev/null | tr -d '[:space:]') +if [ -z "$R" ] || [ "$R" = "-1" ]; then + rm -f /logs/verifier/reward.txt + echo "the tests crashed before grading (reward '${R}'): not scored" >&2 + exit 1 +fi diff --git a/components/mimo-code/source_bundle/source/tests/test_outputs.py b/components/mimo-code/source_bundle/source/tests/test_outputs.py new file mode 100644 index 0000000000000000000000000000000000000000..10e2d9670a2c4ef7d205352bca9a0c57d463694c --- /dev/null +++ b/components/mimo-code/source_bundle/source/tests/test_outputs.py @@ -0,0 +1,190 @@ +from __future__ import annotations + +import ast +import hashlib +import json +import os +from pathlib import Path +import subprocess +import sys + +APP = Path('/app') +PROJECT = APP / 'vendor' / 'requests' +SRC = PROJECT / 'src' +FIXTURE = json.loads((Path('/tests/fixtures/regression_cases.json')).read_text()) + + +def sha256(path: Path) -> str: + return hashlib.sha256(path.read_bytes()).hexdigest() + + +def run_vendored(code: str) -> dict[str, object]: + env = os.environ.copy() + env['PYTHONPATH'] = str(SRC) + completed = subprocess.run( + [sys.executable, '-c', code], + cwd=PROJECT, + env=env, + text=True, + capture_output=True, + timeout=20, + check=False, + ) + assert completed.returncode == 0, completed.stderr + return json.loads(completed.stdout) + + +def test_gate_source_tree_and_report_contract() -> None: + assert PROJECT.is_dir() + assert (PROJECT / 'src/requests/_types.py').is_file() + assert (PROJECT / 'src/requests/models.py').is_file() + for relative, expected in FIXTURE['source_hashes'].items(): + path = PROJECT / relative + assert path.is_file(), f'missing protected source asset: {relative}' + assert sha256(path) == expected, f'protected source asset changed: {relative}' + + for relative, pristine in FIXTURE['pristine_mutable_hashes'].items(): + assert sha256(PROJECT / relative) != pristine, f'{relative} was not repaired' + + report_path = APP / 'repair_report.json' + assert report_path.is_file() + report = json.loads(report_path.read_text()) + assert report['output_schema_version'] == 'requests.stream_proxy.repair.v1' + assert report['passed'] is True + assert isinstance(report.get('checks'), dict) + + models_tree = ast.parse((PROJECT / 'src/requests/models.py').read_text()) + imported = any( + isinstance(node, ast.ImportFrom) + and node.module == '_types' + and any(alias.name == 'has_read' for alias in node.names) + for node in ast.walk(models_tree) + ) + calls = [ + node for node in ast.walk(models_tree) + if isinstance(node, ast.Call) and isinstance(node.func, ast.Name) and node.func.id == 'has_read' + ] + assert imported, 'models.py must import the shared predicate from _types.py' + assert len(calls) >= 3, 'shared predicate must cover all request-body decision points' + + +def test_core_structural_predicate_and_raw_body() -> None: + payload_hex = FIXTURE['proxy_body_hex'] + result = run_vendored(f''' +import json +from io import BytesIO +from requests import Request +from requests._types import has_read +class Proxy: + def __init__(self, wrapped): self.wrapped = wrapped + def __getattr__(self, name): + if name == "__iter__": raise AttributeError(name) + return getattr(self.wrapped, name) +payload = bytes.fromhex("{payload_hex}") +proxy = Proxy(BytesIO(payload)) +prepared = Request("POST", "https://invalid.local/body", data=proxy).prepare() +print(json.dumps({{ + "proxy_readable": has_read(proxy), + "bytesio_readable": has_read(BytesIO(b"x")), + "plain_readable": has_read(object()), + "same_body": prepared.body is proxy, + "content_type": prepared.headers.get("Content-Type"), + "content_length": prepared.headers.get("Content-Length") +}})) +''') + assert result['proxy_readable'] is True + assert result['bytesio_readable'] is True + assert result['plain_readable'] is False + assert result['same_body'] is True + assert result['content_type'] is None + assert result['content_length'] == str(len(bytes.fromhex(payload_hex))) + + +def test_core_multipart_delegated_byte_and_text_streams() -> None: + bytes_hex = FIXTURE['multipart_bytes_hex'] + text_payload = FIXTURE['multipart_text'] + result = run_vendored(f''' +import json +from io import BytesIO, StringIO +from requests import Request +class Proxy: + def __init__(self, wrapped): self.wrapped = wrapped + def __getattr__(self, name): return getattr(self.wrapped, name) +byte_payload = bytes.fromhex("{bytes_hex}") +text_payload = {text_payload!r} +byte_request = Request("POST", "https://invalid.local/files", files={{"blob": ("blob.bin", Proxy(BytesIO(byte_payload)), "application/octet-stream")}}).prepare() +text_request = Request("POST", "https://invalid.local/files", files={{"note": ("note.txt", Proxy(StringIO(text_payload)), "text/plain")}}).prepare() +print(json.dumps({{ + "byte_type": byte_request.headers.get("Content-Type"), + "byte_count": byte_request.body.count(byte_payload), + "byte_filename": b'filename="blob.bin"' in byte_request.body, + "text_type": text_request.headers.get("Content-Type"), + "text_count": text_request.body.count(text_payload.encode()), + "text_filename": b'filename="note.txt"' in text_request.body +}})) +''') + assert result['byte_type'].startswith('multipart/form-data; boundary=') + assert result['byte_count'] == 1 + assert result['byte_filename'] is True + assert result['text_type'].startswith('multipart/form-data; boundary=') + assert result['text_count'] == 1 + assert result['text_filename'] is True + + +def test_core_form_encoding_and_order_are_preserved() -> None: + pairs = FIXTURE['form_pairs'] + result = run_vendored(f''' +import json +from requests import Request +pairs = {pairs!r} +mapping = {{"left": "a b", "right": "2"}} +ordered = Request("POST", "https://invalid.local/form", data=pairs).prepare() +regular = Request("POST", "https://invalid.local/form", data=mapping).prepare() +empty = Request("POST", "https://invalid.local/form", data=None).prepare() +print(json.dumps({{ + "ordered_body": ordered.body, + "ordered_type": ordered.headers.get("Content-Type"), + "mapping_body": regular.body, + "mapping_type": regular.headers.get("Content-Type"), + "empty_body": empty.body, + "empty_type": empty.headers.get("Content-Type") +}})) +''') + assert result['ordered_body'] == 'alpha=x+y&beta=2&alpha=z' + assert result['ordered_type'] == 'application/x-www-form-urlencoded' + assert result['mapping_body'] == 'left=a+b&right=2' + assert result['mapping_type'] == 'application/x-www-form-urlencoded' + assert result['empty_body'] is None + assert result['empty_type'] is None + + +def test_edge_noncallable_and_missing_read_are_not_streams() -> None: + result = run_vendored(''' +import json +from requests import Request +from requests._types import has_read +class NonCallable(dict): + read = {"metadata": True} +class MissingRead(dict): + @property + def read(self): + raise AttributeError("read unavailable") +first = NonCallable([("edge", "x y"), ("count", "3")]) +second = MissingRead([("fallback", "ok")]) +a = Request("POST", "https://invalid.local/edge", data=first).prepare() +b = Request("POST", "https://invalid.local/edge", data=second).prepare() +print(json.dumps({ + "first_readable": has_read(first), + "first_body": a.body, + "first_type": a.headers.get("Content-Type"), + "second_readable": has_read(second), + "second_body": b.body, + "second_type": b.headers.get("Content-Type") +})) +''') + assert result['first_readable'] is False + assert result['first_body'] == 'edge=x+y&count=3' + assert result['first_type'] == 'application/x-www-form-urlencoded' + assert result['second_readable'] is False + assert result['second_body'] == 'fallback=ok' + assert result['second_type'] == 'application/x-www-form-urlencoded' diff --git a/components/pdbthink/DEPENDENCIES.json b/components/pdbthink/DEPENDENCIES.json new file mode 100644 index 0000000000000000000000000000000000000000..70475350fc9b52f1a4a9d8af3bdacfb4d1d53190 --- /dev/null +++ b/components/pdbthink/DEPENDENCIES.json @@ -0,0 +1,897 @@ +{ + "platform": "linux/amd64", + "python": "3.12", + "openenv_commit": "86a180ede21e044f7929b9a7783ad83aa67d83a3", + "requirements_sha256": "0078892ae5870080b3417677926bc64f4f87ba9e8110ff400f18954e361455fc", + "wheels": [ + { + "name": "aiofile", + "version": "3.12.3", + "sha256": "5c1bcc9e929c50834608e8cc1a4cc1d7503eb60c15a535b779fd39e2f372c017", + "size_bytes": 22122, + "source": "https://files.pythonhosted.org/packages/4e/79/6e45e778c4c3cab39e0937b007b720c15f76c50c6453d153282d0fcc3588/aiofile-3.12.3-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/aiofile/3.12.3/json" + }, + { + "name": "annotated-doc", + "version": "0.0.5", + "sha256": "117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101", + "size_bytes": 5302, + "source": "https://files.pythonhosted.org/packages/3e/30/e900b21425a860e195f32e37657aa1f7c7f2b1bfb26f03ca209b90933c06/annotated_doc-0.0.5-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/annotated-doc/0.0.5/json" + }, + { + "name": "annotated-types", + "version": "0.8.0", + "sha256": "f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", + "size_bytes": 13427, + "source": "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/annotated-types/0.8.0/json" + }, + { + "name": "anyio", + "version": "4.15.1", + "sha256": "6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101", + "size_bytes": 132079, + "source": "https://files.pythonhosted.org/packages/12/b8/4bd346e22b28902df4d651910f5242c28d84e4a5c2435ca5c3f797ed7e2e/anyio-4.15.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/anyio/4.15.1/json" + }, + { + "name": "attrs", + "version": "26.1.0", + "sha256": "c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", + "size_bytes": 67548, + "source": "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/attrs/26.1.0/json" + }, + { + "name": "Authlib", + "version": "1.8.0", + "sha256": "88aebbd9af6757e14e912d5dc007ae1dc1f3e27e3b2152ce7c552ee2c3b3c121", + "size_bytes": 260804, + "source": "https://files.pythonhosted.org/packages/b8/c6/6f124bcfbbfb20fba22c939b4e43a06dccfc0e1ca20e5634ca573cb1e271/authlib-1.8.0-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/Authlib/1.8.0/json" + }, + { + "name": "beartype", + "version": "0.22.9", + "sha256": "d16c9bbc61ea14637596c5f6fbff2ee99cbe3573e46a716401734ef50c3060c2", + "size_bytes": 1333658, + "source": "https://files.pythonhosted.org/packages/71/cc/18245721fa7747065ab478316c7fea7c74777d07f37ae60db2e84f8172e8/beartype-0.22.9-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/beartype/0.22.9/json" + }, + { + "name": "brotli", + "version": "1.2.0", + "sha256": "072e7624b1fc4d601036ab3f4f27942ef772887e876beff0301d261210bca97f", + "size_bytes": 1419762, + "source": "https://files.pythonhosted.org/packages/03/a7/03aa61fbc3c5cbf99b44d158665f9b0dd3d8059be16c460208d9e385c837/brotli-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/brotli/1.2.0/json" + }, + { + "name": "cachetools", + "version": "7.2.1", + "sha256": "63aa53dfe7473c10cccdd5a01dedf76ef2c4b73a58840d9396e7d0752cbdac3b", + "size_bytes": 17006, + "source": "https://files.pythonhosted.org/packages/f0/c9/2a61d784caf0d869a3326728c57c7203f50cc53f3cca2ee76bf924769eb4/cachetools-7.2.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/cachetools/7.2.1/json" + }, + { + "name": "caio", + "version": "0.12.9", + "sha256": "bf12d4f014b2a33e642ed7905b5787656ede2fc24be21f7c086826ff0d32cec3", + "size_bytes": 26154, + "source": "https://files.pythonhosted.org/packages/c0/99/96888ad510c9adf42bfbad9ba139831b58055fd61e1301f6268e9bb490b8/caio-0.12.9-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/caio/0.12.9/json" + }, + { + "name": "certifi", + "version": "2026.7.22", + "sha256": "62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", + "size_bytes": 136983, + "source": "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/certifi/2026.7.22/json" + }, + { + "name": "cffi", + "version": "2.1.1", + "sha256": "c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf", + "size_bytes": 221822, + "source": "https://files.pythonhosted.org/packages/b1/db/dceb9dd5b231e1da801793f8acc9f3c52a7e1afe40bb1aae37e02b0faad5/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/cffi/2.1.1/json" + }, + { + "name": "charset-normalizer", + "version": "3.5.2", + "sha256": "3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649", + "size_bytes": 257601, + "source": "https://files.pythonhosted.org/packages/7f/c5/38806a25ab5e65fc178f39affeda20858efafede2fce1ffc2556cfc9fe73/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/charset-normalizer/3.5.2/json" + }, + { + "name": "click", + "version": "8.5.0", + "sha256": "255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", + "size_bytes": 125251, + "source": "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/click/8.5.0/json" + }, + { + "name": "cryptography", + "version": "50.0.2", + "sha256": "4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856", + "size_bytes": 4753050, + "source": "https://files.pythonhosted.org/packages/1a/f1/b474e930c4d910328780e3940da76f5aa5cbc48ce1fc14e44d239d9ea9db/cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/cryptography/50.0.2/json" + }, + { + "name": "cyclopts", + "version": "5.2.0", + "sha256": "5da2a5d65164e03008621fc4795946b88a722b881398b5dfa58afa6218342cff", + "size_bytes": 289196, + "source": "https://files.pythonhosted.org/packages/d4/dd/3f73d04c95f6acc6a54700011637e49362e337139b518be895edf4786f87/cyclopts-5.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/cyclopts/5.2.0/json" + }, + { + "name": "dnspython", + "version": "2.9.0", + "sha256": "9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9", + "size_bytes": 354822, + "source": "https://files.pythonhosted.org/packages/10/02/cdcc9b7c051786a103c3b09e1003a82fa0c66bcb91ffbdabcfbf7b4163b9/dnspython-2.9.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/dnspython/2.9.0/json" + }, + { + "name": "docstring_parser", + "version": "0.18.0", + "sha256": "b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b", + "size_bytes": 22484, + "source": "https://files.pythonhosted.org/packages/a7/5f/ed01f9a3cdffbd5a008556fc7b2a08ddb1cc6ace7effa7340604b1d16699/docstring_parser-0.18.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/docstring_parser/0.18.0/json" + }, + { + "name": "email-validator", + "version": "2.3.0", + "sha256": "80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4", + "size_bytes": 35604, + "source": "https://files.pythonhosted.org/packages/de/15/545e2b6cf2e3be84bc1ed85613edd75b8aea69807a71c26f4ca6a9258e82/email_validator-2.3.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/email-validator/2.3.0/json" + }, + { + "name": "exceptiongroup", + "version": "1.3.1", + "sha256": "a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", + "size_bytes": 16740, + "source": "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/exceptiongroup/1.3.1/json" + }, + { + "name": "fastapi", + "version": "0.143.0", + "sha256": "3e9395fd35276425b61b516a31fdd7c77fe2af83e41b4da22e30696fb1304c5d", + "size_bytes": 144665, + "source": "https://files.pythonhosted.org/packages/bd/f4/27e386913417ad32aae42bba48b0c0cce40e9ff2fba1a871ca2702c37324/fastapi-0.143.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/fastapi/0.143.0/json" + }, + { + "name": "fastmcp", + "version": "3.4.8", + "sha256": "ab4e8abe6c9d50b110f367e8c29f82b90c1478ac9180be61af10354f84f0ad8c", + "size_bytes": 8018, + "source": "https://files.pythonhosted.org/packages/19/5a/2272a1111fd2efd171bd703ab6a6c91ea17b212fe10dfef37e55a57139b8/fastmcp-3.4.8-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/fastmcp/3.4.8/json" + }, + { + "name": "fastmcp-slim", + "version": "3.4.8", + "sha256": "e72c6b74e90c5dcdc8f58087fbdf213636d8b5d339384a498de1c5df6fc037a7", + "size_bytes": 784136, + "source": "https://files.pythonhosted.org/packages/f1/59/2dcee23ff81cdcc4b4fcc581c6677da4da09a3abdba82305ae554bfd3fcd/fastmcp_slim-3.4.8-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/fastmcp-slim/3.4.8/json" + }, + { + "name": "filelock", + "version": "4.1.0", + "sha256": "2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1", + "size_bytes": 133003, + "source": "https://files.pythonhosted.org/packages/ee/86/032133892a5de43b5a98200b01aadcad68cc255e274a762f08b8a76d2912/filelock-4.1.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/filelock/4.1.0/json" + }, + { + "name": "fsspec", + "version": "2026.9.0", + "sha256": "8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", + "size_bytes": 221738, + "source": "https://files.pythonhosted.org/packages/6c/c0/a98505f18594f1bce828bb159cec0fcf9860562f1a2c85913409fc8f3d9e/fsspec-2026.9.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/fsspec/2026.9.0/json" + }, + { + "name": "gradio", + "version": "6.30.0", + "sha256": "aae3aa81ec9f44e55781b498ad2ba12b117aa512e8d2bb0ef3e52af7f2ee6305", + "size_bytes": 31365745, + "source": "https://files.pythonhosted.org/packages/4a/dc/508968f50e8c6d067f7821b5e18a180a74589621f10f4680f8d23b90564f/gradio-6.30.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/gradio/6.30.0/json" + }, + { + "name": "gradio_client", + "version": "2.7.2", + "sha256": "12c9d2d940df28eb8dce58eef61f5e808265ad87bbbca53704d1330aa701e5e2", + "size_bytes": 64458, + "source": "https://files.pythonhosted.org/packages/b5/56/ce1104ac287709af37628c4bd3b24f0e78c925facda3dc8915d10b787846/gradio_client-2.7.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/gradio_client/2.7.2/json" + }, + { + "name": "griffelib", + "version": "2.3.2", + "sha256": "8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274", + "size_bytes": 169420, + "source": "https://files.pythonhosted.org/packages/04/e5/0ae74c83c1cab2c14daadf28bd0143eb14bb81503834af987b66badc7b61/griffelib-2.3.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/griffelib/2.3.2/json" + }, + { + "name": "groovy", + "version": "0.1.2", + "sha256": "7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64", + "size_bytes": 14090, + "source": "https://files.pythonhosted.org/packages/28/27/3d6dcadc8a3214d8522c1e7f6a19554e33659be44546d44a2f7572ac7d2a/groovy-0.1.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/groovy/0.1.2/json" + }, + { + "name": "h11", + "version": "0.16.0", + "sha256": "63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", + "size_bytes": 37515, + "source": "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/h11/0.16.0/json" + }, + { + "name": "hf-gradio", + "version": "0.4.1", + "sha256": "76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3", + "size_bytes": 4482, + "source": "https://files.pythonhosted.org/packages/30/2d/afff2ee87e75d8eb85c92bb8cf0e15b05c23c2ebd8fd8dec781d8601ed7f/hf_gradio-0.4.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/hf-gradio/0.4.1/json" + }, + { + "name": "hf-xet", + "version": "1.7.0", + "sha256": "2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8", + "size_bytes": 4212180, + "source": "https://files.pythonhosted.org/packages/a3/4c/2bf3b66c215d409655f28de1622393dde04c9461280d48c7924bb3b2decd/hf_xet-1.7.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/hf-xet/1.7.0/json" + }, + { + "name": "httpcore", + "version": "1.0.9", + "sha256": "2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", + "size_bytes": 78784, + "source": "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpcore/1.0.9/json" + }, + { + "name": "httpcore2", + "version": "2.13.1", + "sha256": "e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a", + "size_bytes": 83423, + "source": "https://files.pythonhosted.org/packages/09/ba/a4568248771ce81957bfb7cc600264a40fbcda092391ee1c415c50be4bea/httpcore2-2.13.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpcore2/2.13.1/json" + }, + { + "name": "httpx", + "version": "0.28.1", + "sha256": "d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", + "size_bytes": 73517, + "source": "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpx/0.28.1/json" + }, + { + "name": "httpx2", + "version": "2.13.1", + "sha256": "6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4", + "size_bytes": 95597, + "source": "https://files.pythonhosted.org/packages/d8/9c/6fe8931fd9f381042a9e4c7d5a7b4cbf7016b252bec0c99a49fce42c3326/httpx2-2.13.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpx2/2.13.1/json" + }, + { + "name": "httpx-sse", + "version": "0.4.3", + "sha256": "0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc", + "size_bytes": 8960, + "source": "https://files.pythonhosted.org/packages/d2/fd/6668e5aec43ab844de6fc74927e155a3b37bf40d7c3790e49fc0406b6578/httpx_sse-0.4.3-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpx-sse/0.4.3/json" + }, + { + "name": "huggingface_hub", + "version": "2.2.0", + "sha256": "1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3", + "size_bytes": 839884, + "source": "https://files.pythonhosted.org/packages/eb/b0/0f7b430fd100b3a3b037fdbb314878200241082e607b3383c63d91a13a72/huggingface_hub-2.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/huggingface_hub/2.2.0/json" + }, + { + "name": "idna", + "version": "3.20", + "sha256": "ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", + "size_bytes": 69583, + "source": "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/idna/3.20/json" + }, + { + "name": "iniconfig", + "version": "2.3.1", + "sha256": "9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", + "size_bytes": 7552, + "source": "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/iniconfig/2.3.1/json" + }, + { + "name": "jaraco.classes", + "version": "3.4.0", + "sha256": "f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790", + "size_bytes": 6777, + "source": "https://files.pythonhosted.org/packages/7f/66/b15ce62552d84bbfcec9a4873ab79d993a1dd4edb922cbfccae192bd5b5f/jaraco.classes-3.4.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jaraco.classes/3.4.0/json" + }, + { + "name": "jaraco.context", + "version": "6.1.2", + "sha256": "bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535", + "size_bytes": 7871, + "source": "https://files.pythonhosted.org/packages/f2/58/bc8954bda5fcda97bd7c19be11b85f91973d67a706ed4a3aec33e7de22db/jaraco_context-6.1.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jaraco.context/6.1.2/json" + }, + { + "name": "jaraco.functools", + "version": "4.6.0", + "sha256": "99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30", + "size_bytes": 11677, + "source": "https://files.pythonhosted.org/packages/02/36/ecc85bc96c273dc8a11273ed4782272975e6338d4a3e9228621175edf0e3/jaraco_functools-4.6.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jaraco.functools/4.6.0/json" + }, + { + "name": "jeepney", + "version": "0.9.0", + "sha256": "97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683", + "size_bytes": 49010, + "source": "https://files.pythonhosted.org/packages/b2/a3/e137168c9c44d18eff0376253da9f1e9234d0239e0ee230d2fee6cea8e55/jeepney-0.9.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jeepney/0.9.0/json" + }, + { + "name": "Jinja2", + "version": "3.1.6", + "sha256": "85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", + "size_bytes": 134899, + "source": "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/Jinja2/3.1.6/json" + }, + { + "name": "jiter", + "version": "0.17.0", + "sha256": "8c21265b251d99bbb40080d178a8953e35601d3a1564e05c4de4c0d2ca616797", + "size_bytes": 345025, + "source": "https://files.pythonhosted.org/packages/52/f8/b6e513ecbdf3b3cebe587c2279281ecf775b729a58cf4cc7bdf898ded029/jiter-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/jiter/0.17.0/json" + }, + { + "name": "joserfc", + "version": "1.7.5", + "sha256": "add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159", + "size_bytes": 71269, + "source": "https://files.pythonhosted.org/packages/67/c5/82addfd375e5ee6520644e0553e4aadde92d668c4fc99cc716d337fe7bb3/joserfc-1.7.5-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/joserfc/1.7.5/json" + }, + { + "name": "jsonref", + "version": "1.1.0", + "sha256": "590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9", + "size_bytes": 9425, + "source": "https://files.pythonhosted.org/packages/0c/ec/e1db9922bceb168197a558a2b8c03a7963f1afe93517ddd3cf99f202f996/jsonref-1.1.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jsonref/1.1.0/json" + }, + { + "name": "jsonschema", + "version": "4.26.0", + "sha256": "d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", + "size_bytes": 90630, + "source": "https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jsonschema/4.26.0/json" + }, + { + "name": "jsonschema-path", + "version": "0.5.0", + "sha256": "2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2", + "size_bytes": 24077, + "source": "https://files.pythonhosted.org/packages/04/2c/9e69d73c4297508be9e3b64a970ea3971b3eb8db64ffc5802d40bd25981f/jsonschema_path-0.5.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jsonschema-path/0.5.0/json" + }, + { + "name": "jsonschema-specifications", + "version": "2025.9.1", + "sha256": "98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", + "size_bytes": 18437, + "source": "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jsonschema-specifications/2025.9.1/json" + }, + { + "name": "keyring", + "version": "25.7.0", + "sha256": "be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", + "size_bytes": 39160, + "source": "https://files.pythonhosted.org/packages/81/db/e655086b7f3a705df045bf0933bdd9c2f79bb3c97bfef1384598bb79a217/keyring-25.7.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/keyring/25.7.0/json" + }, + { + "name": "markdown-it-py", + "version": "4.2.0", + "sha256": "9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a", + "size_bytes": 91687, + "source": "https://files.pythonhosted.org/packages/b3/81/4da04ced5a082363ecfa159c010d200ecbd959ae410c10c0264a38cac0f5/markdown_it_py-4.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/markdown-it-py/4.2.0/json" + }, + { + "name": "MarkupSafe", + "version": "3.0.4", + "sha256": "8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581", + "size_bytes": 22985, + "source": "https://files.pythonhosted.org/packages/4f/a7/aeedb5140afa41fc74c225e9184ab96723a6e873b6ee1c9fede7283456d8/markupsafe-3.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/MarkupSafe/3.0.4/json" + }, + { + "name": "mcp", + "version": "1.30.0", + "sha256": "666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0", + "size_bytes": 234581, + "source": "https://files.pythonhosted.org/packages/f5/f4/e58bc33317c92a0203664daaf00bf6f41166cc0149e5d6870a03f7cd004a/mcp-1.30.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/mcp/1.30.0/json" + }, + { + "name": "mdurl", + "version": "0.1.2", + "sha256": "84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", + "size_bytes": 9979, + "source": "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/mdurl/0.1.2/json" + }, + { + "name": "more-itertools", + "version": "11.1.0", + "sha256": "4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192", + "size_bytes": 72226, + "source": "https://files.pythonhosted.org/packages/e8/3d/1087453384dbde46a8c7f9356eead2c58be8a7bf156bca40243377c85715/more_itertools-11.1.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/more-itertools/11.1.0/json" + }, + { + "name": "numpy", + "version": "2.5.3", + "sha256": "b7e18c623bb5c95acb3b3328861272816ba199fb531921c5d6d0b675f1fde9e3", + "size_bytes": 16717410, + "source": "https://files.pythonhosted.org/packages/65/af/aa78d1a88805456e212b65461354cd943197fb9acecc4c90fd12295123a3/numpy-2.5.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/numpy/2.5.3/json" + }, + { + "name": "openai", + "version": "3.28.0", + "sha256": "1ea40a084ffe2f9f16fd3bea6e870f757853b536b18d8e737c518ef849a2920c", + "size_bytes": 2171532, + "source": "https://files.pythonhosted.org/packages/5b/4a/5c807ade1a86ab8accad20dc993ca7de5d1f7b2e78d4674c300c2e6a47b9/openai-3.28.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/openai/3.28.0/json" + }, + { + "name": "openapi-pydantic", + "version": "0.6.0", + "sha256": "8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3", + "size_bytes": 96931, + "source": "https://files.pythonhosted.org/packages/31/57/9d3eb823a03c33e9d4c810e6a3276e3a6dc820a7fdc0961db2c04e613817/openapi_pydantic-0.6.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/openapi-pydantic/0.6.0/json" + }, + { + "name": "openenv", + "version": "0.6.1.dev0", + "sha256": "93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a", + "size_bytes": 700304, + "source": "https://github.com/meta-pytorch/OpenEnv/tree/86a180ede21e044f7929b9a7783ad83aa67d83a3", + "metadata_source": null + }, + { + "name": "opentelemetry-api", + "version": "1.45.1", + "sha256": "b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb", + "size_bytes": 60256, + "source": "https://files.pythonhosted.org/packages/1e/41/f7dcf80b81ee8e71c1a2b59f14208bc723edbd89ed027a73b175abf6348e/opentelemetry_api-1.45.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/opentelemetry-api/1.45.1/json" + }, + { + "name": "orjson", + "version": "3.13.0", + "sha256": "bceadfd314bd238f584fc229a4bbaf0e573597e7a026dec5429fbf29fd66c641", + "size_bytes": 130612, + "source": "https://files.pythonhosted.org/packages/ea/8c/bb07c368abbf4021c4cd01c12edb526e00090f7f750ff1b88da6e6b6c7a6/orjson-3.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/orjson/3.13.0/json" + }, + { + "name": "packaging", + "version": "26.3", + "sha256": "d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", + "size_bytes": 129956, + "source": "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/packaging/26.3/json" + }, + { + "name": "pandas", + "version": "3.0.6", + "sha256": "0704044b676496b8350e023b09f174a26772456c974a2b11c36bebb558c9490d", + "size_bytes": 10788193, + "source": "https://files.pythonhosted.org/packages/cb/67/0c0f18e38d7f2d2af8c24b3315bc4046e73bbdd4a5540405506671ad0c0d/pandas-3.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/pandas/3.0.6/json" + }, + { + "name": "pathable", + "version": "0.6.0", + "sha256": "82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566", + "size_bytes": 18983, + "source": "https://files.pythonhosted.org/packages/a2/e8/6d75ffd9784bce2e93d1ae4415649427e39a53bb172d4672b2b59c6f0a7b/pathable-0.6.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pathable/0.6.0/json" + }, + { + "name": "pillow", + "version": "12.3.0", + "sha256": "78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91", + "size_bytes": 6940830, + "source": "https://files.pythonhosted.org/packages/84/21/a35af28dcc61f37ed850a2d64c65c701321dfbf25085e469d5559360cbbf/pillow-12.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/pillow/12.3.0/json" + }, + { + "name": "platformdirs", + "version": "4.12.4", + "sha256": "78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7", + "size_bytes": 32596, + "source": "https://files.pythonhosted.org/packages/f4/ba/223e00b885e960edd5d4b4d178c88acce019bd5b83786093681b8c393492/platformdirs-4.12.4-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/platformdirs/4.12.4/json" + }, + { + "name": "pluggy", + "version": "1.6.0", + "sha256": "e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", + "size_bytes": 20538, + "source": "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pluggy/1.6.0/json" + }, + { + "name": "py-key-value-aio", + "version": "0.4.6", + "sha256": "820b30c7959fc738ea3d00160cdb10cd258f51e38737b2add530defeea1ded77", + "size_bytes": 171289, + "source": "https://files.pythonhosted.org/packages/9a/46/12871550fb0613d149144bb9d41f22680d5f46717bc45a76eb5798c20c3f/py_key_value_aio-0.4.6-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/py-key-value-aio/0.4.6/json" + }, + { + "name": "pycparser", + "version": "3.11", + "sha256": "51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", + "size_bytes": 51178, + "source": "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pycparser/3.11/json" + }, + { + "name": "pydantic", + "version": "2.14.0", + "sha256": "15fab1bea6f1dc5003b54fc2ecab230c1fd1dbade2acd4addc52d81e32416d4b", + "size_bytes": 487109, + "source": "https://files.pythonhosted.org/packages/2d/eb/9146591cc819d040475bf7f2be786710c7f7eb8083693bf859728da2ca9c/pydantic-2.14.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pydantic/2.14.0/json" + }, + { + "name": "pydantic_core", + "version": "2.50.0", + "sha256": "f187030fc3d62c668feb0f09e92852e0eb414d7fcefc4748f2e67d245aade37e", + "size_bytes": 2160358, + "source": "https://files.pythonhosted.org/packages/ca/e2/2f793fa2f1b338aa03124efd4362956c84d7bf1b331dc86050bc0151e67d/pydantic_core-2.50.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/pydantic_core/2.50.0/json" + }, + { + "name": "pydantic-settings", + "version": "2.15.0", + "sha256": "0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42", + "size_bytes": 69413, + "source": "https://files.pythonhosted.org/packages/30/a4/2bffa9f8e804325a09867f0e9d30795c80ea9f8d62560bd1b6ad6220eb2f/pydantic_settings-2.15.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pydantic-settings/2.15.0/json" + }, + { + "name": "pydub", + "version": "0.25.1", + "sha256": "65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6", + "size_bytes": 32327, + "source": "https://files.pythonhosted.org/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pydub/0.25.1/json" + }, + { + "name": "Pygments", + "version": "2.21.0", + "sha256": "2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", + "size_bytes": 1250147, + "source": "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/Pygments/2.21.0/json" + }, + { + "name": "PyJWT", + "version": "2.15.1", + "sha256": "42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193", + "size_bytes": 33860, + "source": "https://files.pythonhosted.org/packages/50/ca/44de4e75f8aadc457f0634be3b542815078ded46dca30efb960edeecad6e/pyjwt-2.15.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/PyJWT/2.15.1/json" + }, + { + "name": "pyperclip", + "version": "1.11.0", + "sha256": "299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273", + "size_bytes": 11063, + "source": "https://files.pythonhosted.org/packages/df/80/fc9d01d5ed37ba4c42ca2b55b4339ae6e200b456be3a1aaddf4a9fa99b8c/pyperclip-1.11.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pyperclip/1.11.0/json" + }, + { + "name": "pytest", + "version": "9.1.1", + "sha256": "37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", + "size_bytes": 386536, + "source": "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pytest/9.1.1/json" + }, + { + "name": "python-dateutil", + "version": "2.9.0.post0", + "sha256": "a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", + "size_bytes": 229892, + "source": "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/python-dateutil/2.9.0.post0/json" + }, + { + "name": "python-dotenv", + "version": "1.2.4", + "sha256": "42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", + "size_bytes": 23266, + "source": "https://files.pythonhosted.org/packages/60/d1/38f3a3405989a89ac18390803e70c6ad7c7760da4f9b83cbeca0c44a0c72/python_dotenv-1.2.4-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/python-dotenv/1.2.4/json" + }, + { + "name": "python-multipart", + "version": "0.0.32", + "sha256": "ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23", + "size_bytes": 30042, + "source": "https://files.pythonhosted.org/packages/e1/04/e8135ebd1ad02c56ec633277529b2602ff99ff634be76cdba5744cf554fd/python_multipart-0.0.32-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/python-multipart/0.0.32/json" + }, + { + "name": "pytz", + "version": "2026.5", + "sha256": "e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", + "size_bytes": 506342, + "source": "https://files.pythonhosted.org/packages/4f/ef/c66110d46fb800dda0bf33164182dfadabe26a90e4476844d502a23dca8e/pytz-2026.5-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pytz/2026.5/json" + }, + { + "name": "PyYAML", + "version": "6.0.3", + "sha256": "ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", + "size_bytes": 807870, + "source": "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/PyYAML/6.0.3/json" + }, + { + "name": "referencing", + "version": "0.37.0", + "sha256": "381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", + "size_bytes": 26766, + "source": "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/referencing/0.37.0/json" + }, + { + "name": "requests", + "version": "2.34.2", + "sha256": "2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", + "size_bytes": 73075, + "source": "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/requests/2.34.2/json" + }, + { + "name": "rich", + "version": "15.0.0", + "sha256": "33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", + "size_bytes": 310654, + "source": "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/rich/15.0.0/json" + }, + { + "name": "rich-rst", + "version": "2.2.0", + "sha256": "1ea1c43813dc4a8d86475fce27ffb74e0ada3d4656c9f8130ba2a59868055fe9", + "size_bytes": 279274, + "source": "https://files.pythonhosted.org/packages/d1/4e/716b42bf066e180c1235783b46f095a5d871d05dca7006d2295aac29c491/rich_rst-2.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/rich-rst/2.2.0/json" + }, + { + "name": "rpds-py", + "version": "2026.9.1", + "sha256": "addeda51556dac7c1a2f14cda62db8b621cd12afba3091d03a96c72932387eab", + "size_bytes": 371261, + "source": "https://files.pythonhosted.org/packages/1d/6d/b26eb1e75395925b3a142ed351cbed2ec8212f5c9d937aee3df32c701baa/rpds_py-2026.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/rpds-py/2026.9.1/json" + }, + { + "name": "safehttpx", + "version": "0.1.7", + "sha256": "c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde", + "size_bytes": 8959, + "source": "https://files.pythonhosted.org/packages/2e/a3/0f0b7d78e2f1eb9e8e1afbff1d2bff8d60144aee17aca51c065b516743dd/safehttpx-0.1.7-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/safehttpx/0.1.7/json" + }, + { + "name": "SecretStorage", + "version": "3.5.0", + "sha256": "0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", + "size_bytes": 15554, + "source": "https://files.pythonhosted.org/packages/b7/46/f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552/secretstorage-3.5.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/SecretStorage/3.5.0/json" + }, + { + "name": "semantic-version", + "version": "2.10.0", + "sha256": "de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177", + "size_bytes": 15552, + "source": "https://files.pythonhosted.org/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/semantic-version/2.10.0/json" + }, + { + "name": "shellingham", + "version": "1.5.4", + "sha256": "7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", + "size_bytes": 9755, + "source": "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/shellingham/1.5.4/json" + }, + { + "name": "six", + "version": "1.17.0", + "sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", + "size_bytes": 11050, + "source": "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/six/1.17.0/json" + }, + { + "name": "sniffio", + "version": "1.3.1", + "sha256": "2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "size_bytes": 10235, + "source": "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/sniffio/1.3.1/json" + }, + { + "name": "sse-starlette", + "version": "3.5.0", + "sha256": "3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997", + "size_bytes": 17407, + "source": "https://files.pythonhosted.org/packages/be/e4/cdda14023c316d71493bc54fdffc3dd006631b88866145c9d3cc33e0f1df/sse_starlette-3.5.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/sse-starlette/3.5.0/json" + }, + { + "name": "starlette", + "version": "1.7.0", + "sha256": "67f8e99895493dd2911a03f11314af6ceebeae4e704bb9f43dfc6a9db151c93e", + "size_bytes": 78980, + "source": "https://files.pythonhosted.org/packages/4e/d6/1ec1b290f9e0fb067899b61e1d37a30c923068bad260b216dbe37a7d2967/starlette-1.7.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/starlette/1.7.0/json" + }, + { + "name": "tomli", + "version": "2.5.0", + "sha256": "6cf74416bdc94ae458b14e37286c1073081850ac8459a00d0c5efef5d44294c6", + "size_bytes": 286435, + "source": "https://files.pythonhosted.org/packages/43/90/6090e706ff27a6f89f4a40578e3324b95c3cd8c4150868aabf33a8f414c3/tomli-2.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/tomli/2.5.0/json" + }, + { + "name": "tomli_w", + "version": "1.2.0", + "sha256": "188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", + "size_bytes": 6675, + "source": "https://files.pythonhosted.org/packages/c7/18/c86eb8e0202e32dd3df50d43d7ff9854f8e0603945ff398974c1d91ac1ef/tomli_w-1.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/tomli_w/1.2.0/json" + }, + { + "name": "tomlkit", + "version": "0.14.0", + "sha256": "592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680", + "size_bytes": 39310, + "source": "https://files.pythonhosted.org/packages/b5/11/87d6d29fb5d237229d67973a6c9e06e048f01cf4994dee194ab0ea841814/tomlkit-0.14.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/tomlkit/0.14.0/json" + }, + { + "name": "tqdm", + "version": "4.70.1", + "sha256": "c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", + "size_bytes": 80199, + "source": "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/tqdm/4.70.1/json" + }, + { + "name": "truststore", + "version": "0.10.4", + "sha256": "adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981", + "size_bytes": 18660, + "source": "https://files.pythonhosted.org/packages/19/97/56608b2249fe206a67cd573bc93cd9896e1efb9e98bce9c163bcdc704b88/truststore-0.10.4-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/truststore/0.10.4/json" + }, + { + "name": "typer", + "version": "0.27.3", + "sha256": "e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff", + "size_bytes": 123312, + "source": "https://files.pythonhosted.org/packages/07/ea/2e31b67051e91a133189e9c000c222502ddc6969856416de0d095de4c0b0/typer-0.27.3-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/typer/0.27.3/json" + }, + { + "name": "typing_extensions", + "version": "4.16.0", + "sha256": "481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", + "size_bytes": 45571, + "source": "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/typing_extensions/4.16.0/json" + }, + { + "name": "typing-inspection", + "version": "0.4.4", + "sha256": "65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", + "size_bytes": 14750, + "source": "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/typing-inspection/0.4.4/json" + }, + { + "name": "uncalled-for", + "version": "0.4.1", + "sha256": "b611b38879d9fe5088297e7bb28f2ddd12d2d73dad933d93da107fb63eb4058e", + "size_bytes": 14889, + "source": "https://files.pythonhosted.org/packages/bf/a6/ba763e3812e572de7291676c3a41adfac1ef1209a6acda6bae055970f127/uncalled_for-0.4.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/uncalled-for/0.4.1/json" + }, + { + "name": "urllib3", + "version": "2.8.0", + "sha256": "0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", + "size_bytes": 135717, + "source": "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/urllib3/2.8.0/json" + }, + { + "name": "uvicorn", + "version": "0.54.0", + "sha256": "505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf", + "size_bytes": 87427, + "source": "https://files.pythonhosted.org/packages/38/0c/b54a4fdd7f90a3af8b02ebc9ce6712c2c208b7926a2f7bad95c33ebbe943/uvicorn-0.54.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/uvicorn/0.54.0/json" + }, + { + "name": "watchfiles", + "version": "1.3.0", + "sha256": "b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1", + "size_bytes": 458353, + "source": "https://files.pythonhosted.org/packages/8a/cf/e3ad894ed5909a7c44b0707e89bc25d19a3d78b3a7aec846119443b6ae56/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/watchfiles/1.3.0/json" + }, + { + "name": "websockets", + "version": "17.2", + "sha256": "6627b913b8586b1c06db9516b31dd0dfbc621de3bb9312616d92a7e44f268a5b", + "size_bytes": 225299, + "source": "https://files.pythonhosted.org/packages/03/c0/a6d8be9c43e4456fb9597fdf8b5e0ce1f0a5df41503acce6d869536e4e23/websockets-17.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/websockets/17.2/json" + }, + { + "name": "libseccomp2", + "version": "2.5.4-1+deb12u1", + "sha256": "108fe67957ca7cf9ba51d801118a1b37d404bea7b6e365025cd00779e9eca38d", + "size_bytes": 46808, + "source": "https://deb.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.4-1+deb12u1_amd64.deb", + "metadata_source": "https://deb.debian.org/debian/dists/bookworm/main/binary-amd64/Packages.xz" + } + ], + "scope": "Dependency identifiers and hashes; wheel binaries and container images are distributed separately." +} diff --git a/components/pdbthink/Dockerfile b/components/pdbthink/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..66652b545f1a210b519d3f783f875d3efbc13bc0 --- /dev/null +++ b/components/pdbthink/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.12-slim-bookworm@sha256:392307d22300de8b5986851a12d9176dfc0fc073e65bf6523ebd7dcbeb23564e +USER root +COPY wheels /tmp/wheels +COPY requirements.lock /opt/pdbthink/requirements.lock +RUN python -m pip install --no-cache-dir --no-index --find-links=/tmp/wheels --require-hashes -r /opt/pdbthink/requirements.lock && python -m pip check && rm -rf /tmp/wheels +COPY runtime /opt/pdbthink/runtime +COPY private /opt/pdbthink/private +COPY licenses /opt/pdbthink/licenses +COPY config.json /opt/pdbthink/config.json +RUN chmod -R go-rwx /opt/pdbthink && mkdir -p /var/lib/pdbthink && chmod 700 /var/lib/pdbthink +ENV PYTHONPATH=/opt/pdbthink/runtime PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1 ENABLE_WEB_INTERFACE=false OPENENV_MODE=simulation GRADIO_ANALYTICS_ENABLED=false HF_HUB_OFFLINE=1 +WORKDIR /opt/pdbthink +EXPOSE 8000 +HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 CMD ["python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/health', timeout=3).read()"] +CMD ["python", "-m", "pdbthink.server"] diff --git a/components/pdbthink/config.json b/components/pdbthink/config.json new file mode 100644 index 0000000000000000000000000000000000000000..c975d22d65175895b82a05c1c3bac7d62c4fb2e2 --- /dev/null +++ b/components/pdbthink/config.json @@ -0,0 +1,56 @@ +{ + "source": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "delivery_profile": "pdbthink-json-delivery-v3", + "tasks": [ + { + "task_id": "pdbthink-s09-70c0778d985e571dde37", + "split": "train", + "public_sha256": "56e4865b7517b35a7d316a8881561b622f10af0b29bd8394c59a4316ae285e1c", + "original_checker_sha256": { + "gold.json": "1519e6cc81fa143b8fa97d394b831df6f896e0e8e3deab637f799bd23000e4b4", + "verifier.toml": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "verify.py": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "test.sh": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "coordinate_scoring/scorers.py": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "coordinate_scoring/__init__.py": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "coordinate_scoring/parse.py": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c" + }, + "scientific_span_sha256": "75a066b15eeb1d2a4b2bd9875494392e34fa1da46ada49fce902aa452ca1d683", + "original_instruction_sha256": "33d86986d7b9d0a12678be7326d02048cf812cb536fc45fdb2837c9772c64ddf" + }, + { + "task_id": "pdbthink-s09-7ba4aa076b6bb5633953", + "split": "train", + "public_sha256": "7d267c32438351a4d92533f6e9960da36a1e39c768ad56988904029cb90da0c5", + "original_checker_sha256": { + "gold.json": "4ed8e4260bc71b5a863888cd3fa2c7bca6210fc5138f96fd2207462c348318b7", + "verifier.toml": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "verify.py": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "test.sh": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "coordinate_scoring/scorers.py": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "coordinate_scoring/__init__.py": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "coordinate_scoring/parse.py": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c" + }, + "scientific_span_sha256": "a265b362543c5790b45e4bcac05dd85fcf6dedcc154d35446d2711a8ea13a358", + "original_instruction_sha256": "21dc586748f23a8630118831399e1c40d62443444d454bf6f5e7f60ba334b06f" + }, + { + "task_id": "pdbthink-s09-772d9c283d4255fc0a11", + "split": "train", + "public_sha256": "5d2dfa7c57a5c628a9c12cd097e7b644a155e380f1f6af48233560dbab0b4376", + "original_checker_sha256": { + "gold.json": "995383611b5cf7f9f9d766df703fa00d02e445329f992f4c1a31f8e1e508a390", + "verifier.toml": "628bca2d87aa70d0176cb3a79879c64bbfb07fc53dd094fd3060173b24a76ef4", + "verify.py": "91441587561c00649cec98159d22f64d11b01fff459601cce79579737f0fa37c", + "test.sh": "bf3f533beddf0e9db369e092e297d2905013f2aedad52919cb1db76ed7a566f7", + "coordinate_scoring/scorers.py": "8046af2d8ca0e74d40ca60624ea3c678b81fa3b76b634818fd96757282f12c34", + "coordinate_scoring/__init__.py": "8f8067d6fbd793412dd078f35617d367999a644cf040ef4996dfd96c2b2e936f", + "coordinate_scoring/parse.py": "72035a296ec599f0e4743141a76f8dc908be5ac6a7fd500d36fcbb29b8b3687c" + }, + "scientific_span_sha256": "3d56da09dc7961b02ab312c0e03fad7321c570802e7f69513aa16339d5fef1df", + "original_instruction_sha256": "1eba6ac44775863993c8215f0d146cdccc7e8874a05b694e79db776e375dd7b1" + } + ], + "selection": "Three fixed original train examples of one chi1 family; all three categories within phenylalanine." +} diff --git a/components/pdbthink/licenses/DEPENDENCIES.json b/components/pdbthink/licenses/DEPENDENCIES.json new file mode 100644 index 0000000000000000000000000000000000000000..f0185a4ba4f02efc6c89c26dfc534c0db281b258 --- /dev/null +++ b/components/pdbthink/licenses/DEPENDENCIES.json @@ -0,0 +1,1009 @@ +{ + "schema_version": 1, + "platform": "linux/amd64", + "python": "3.12", + "base_image": "python:3.12-slim-bookworm@sha256:34386ef0cb081344d7ec1c103ba398e6e9f64e9ab3a1509accc92a4e24a07258", + "openenv_commit": "86a180ede21e044f7929b9a7783ad83aa67d83a3", + "requirements_sha256": "0078892ae5870080b3417677926bc64f4f87ba9e8110ff400f18954e361455fc", + "files": [ + { + "path": "vendor/wheels/aiofile-3.12.3-py3-none-any.whl", + "name": "aiofile", + "version": "3.12.3", + "sha256": "5c1bcc9e929c50834608e8cc1a4cc1d7503eb60c15a535b779fd39e2f372c017", + "size_bytes": 22122, + "source": "https://files.pythonhosted.org/packages/4e/79/6e45e778c4c3cab39e0937b007b720c15f76c50c6453d153282d0fcc3588/aiofile-3.12.3-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/aiofile/3.12.3/json" + }, + { + "path": "vendor/wheels/annotated_doc-0.0.5-py3-none-any.whl", + "name": "annotated-doc", + "version": "0.0.5", + "sha256": "117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101", + "size_bytes": 5302, + "source": "https://files.pythonhosted.org/packages/3e/30/e900b21425a860e195f32e37657aa1f7c7f2b1bfb26f03ca209b90933c06/annotated_doc-0.0.5-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/annotated-doc/0.0.5/json" + }, + { + "path": "vendor/wheels/annotated_types-0.8.0-py3-none-any.whl", + "name": "annotated-types", + "version": "0.8.0", + "sha256": "f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0", + "size_bytes": 13427, + "source": "https://files.pythonhosted.org/packages/99/91/8acff4f5e50511b911bbccb72b8628a49c68ce14148cd9f6431094859a90/annotated_types-0.8.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/annotated-types/0.8.0/json" + }, + { + "path": "vendor/wheels/anyio-4.15.1-py3-none-any.whl", + "name": "anyio", + "version": "4.15.1", + "sha256": "6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101", + "size_bytes": 132079, + "source": "https://files.pythonhosted.org/packages/12/b8/4bd346e22b28902df4d651910f5242c28d84e4a5c2435ca5c3f797ed7e2e/anyio-4.15.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/anyio/4.15.1/json" + }, + { + "path": "vendor/wheels/attrs-26.1.0-py3-none-any.whl", + "name": "attrs", + "version": "26.1.0", + "sha256": "c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309", + "size_bytes": 67548, + "source": "https://files.pythonhosted.org/packages/64/b4/17d4b0b2a2dc85a6df63d1157e028ed19f90d4cd97c36717afef2bc2f395/attrs-26.1.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/attrs/26.1.0/json" + }, + { + "path": "vendor/wheels/authlib-1.8.0-py2.py3-none-any.whl", + "name": "Authlib", + "version": "1.8.0", + "sha256": "88aebbd9af6757e14e912d5dc007ae1dc1f3e27e3b2152ce7c552ee2c3b3c121", + "size_bytes": 260804, + "source": "https://files.pythonhosted.org/packages/b8/c6/6f124bcfbbfb20fba22c939b4e43a06dccfc0e1ca20e5634ca573cb1e271/authlib-1.8.0-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/Authlib/1.8.0/json" + }, + { + "path": "vendor/wheels/beartype-0.22.9-py3-none-any.whl", + "name": "beartype", + "version": "0.22.9", + "sha256": "d16c9bbc61ea14637596c5f6fbff2ee99cbe3573e46a716401734ef50c3060c2", + "size_bytes": 1333658, + "source": "https://files.pythonhosted.org/packages/71/cc/18245721fa7747065ab478316c7fea7c74777d07f37ae60db2e84f8172e8/beartype-0.22.9-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/beartype/0.22.9/json" + }, + { + "path": "vendor/wheels/brotli-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "name": "brotli", + "version": "1.2.0", + "sha256": "072e7624b1fc4d601036ab3f4f27942ef772887e876beff0301d261210bca97f", + "size_bytes": 1419762, + "source": "https://files.pythonhosted.org/packages/03/a7/03aa61fbc3c5cbf99b44d158665f9b0dd3d8059be16c460208d9e385c837/brotli-1.2.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/brotli/1.2.0/json" + }, + { + "path": "vendor/wheels/cachetools-7.2.1-py3-none-any.whl", + "name": "cachetools", + "version": "7.2.1", + "sha256": "63aa53dfe7473c10cccdd5a01dedf76ef2c4b73a58840d9396e7d0752cbdac3b", + "size_bytes": 17006, + "source": "https://files.pythonhosted.org/packages/f0/c9/2a61d784caf0d869a3326728c57c7203f50cc53f3cca2ee76bf924769eb4/cachetools-7.2.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/cachetools/7.2.1/json" + }, + { + "path": "vendor/wheels/caio-0.12.9-py3-none-any.whl", + "name": "caio", + "version": "0.12.9", + "sha256": "bf12d4f014b2a33e642ed7905b5787656ede2fc24be21f7c086826ff0d32cec3", + "size_bytes": 26154, + "source": "https://files.pythonhosted.org/packages/c0/99/96888ad510c9adf42bfbad9ba139831b58055fd61e1301f6268e9bb490b8/caio-0.12.9-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/caio/0.12.9/json" + }, + { + "path": "vendor/wheels/certifi-2026.7.22-py3-none-any.whl", + "name": "certifi", + "version": "2026.7.22", + "sha256": "62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775", + "size_bytes": 136983, + "source": "https://files.pythonhosted.org/packages/0b/a7/71ac2cff56fec219ed242bb11b8efb69fcc4bec75db06fb7bfe35de520e6/certifi-2026.7.22-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/certifi/2026.7.22/json" + }, + { + "path": "vendor/wheels/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "name": "cffi", + "version": "2.1.1", + "sha256": "c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf", + "size_bytes": 221822, + "source": "https://files.pythonhosted.org/packages/b1/db/dceb9dd5b231e1da801793f8acc9f3c52a7e1afe40bb1aae37e02b0faad5/cffi-2.1.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/cffi/2.1.1/json" + }, + { + "path": "vendor/wheels/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "name": "charset-normalizer", + "version": "3.5.2", + "sha256": "3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649", + "size_bytes": 257601, + "source": "https://files.pythonhosted.org/packages/7f/c5/38806a25ab5e65fc178f39affeda20858efafede2fce1ffc2556cfc9fe73/charset_normalizer-3.5.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/charset-normalizer/3.5.2/json" + }, + { + "path": "vendor/wheels/click-8.5.0-py3-none-any.whl", + "name": "click", + "version": "8.5.0", + "sha256": "255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360", + "size_bytes": 125251, + "source": "https://files.pythonhosted.org/packages/58/50/6c0d534c5f134586a8e1ba4e330569e32f057e33372ae556463212fb4cd3/click-8.5.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/click/8.5.0/json" + }, + { + "path": "vendor/wheels/cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", + "name": "cryptography", + "version": "50.0.2", + "sha256": "4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856", + "size_bytes": 4753050, + "source": "https://files.pythonhosted.org/packages/1a/f1/b474e930c4d910328780e3940da76f5aa5cbc48ce1fc14e44d239d9ea9db/cryptography-50.0.2-cp311-abi3-manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/cryptography/50.0.2/json" + }, + { + "path": "vendor/wheels/cyclopts-5.2.0-py3-none-any.whl", + "name": "cyclopts", + "version": "5.2.0", + "sha256": "5da2a5d65164e03008621fc4795946b88a722b881398b5dfa58afa6218342cff", + "size_bytes": 289196, + "source": "https://files.pythonhosted.org/packages/d4/dd/3f73d04c95f6acc6a54700011637e49362e337139b518be895edf4786f87/cyclopts-5.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/cyclopts/5.2.0/json" + }, + { + "path": "vendor/wheels/dnspython-2.9.0-py3-none-any.whl", + "name": "dnspython", + "version": "2.9.0", + "sha256": "9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9", + "size_bytes": 354822, + "source": "https://files.pythonhosted.org/packages/10/02/cdcc9b7c051786a103c3b09e1003a82fa0c66bcb91ffbdabcfbf7b4163b9/dnspython-2.9.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/dnspython/2.9.0/json" + }, + { + "path": "vendor/wheels/docstring_parser-0.18.0-py3-none-any.whl", + "name": "docstring_parser", + "version": "0.18.0", + "sha256": "b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b", + "size_bytes": 22484, + "source": "https://files.pythonhosted.org/packages/a7/5f/ed01f9a3cdffbd5a008556fc7b2a08ddb1cc6ace7effa7340604b1d16699/docstring_parser-0.18.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/docstring_parser/0.18.0/json" + }, + { + "path": "vendor/wheels/email_validator-2.3.0-py3-none-any.whl", + "name": "email-validator", + "version": "2.3.0", + "sha256": "80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4", + "size_bytes": 35604, + "source": "https://files.pythonhosted.org/packages/de/15/545e2b6cf2e3be84bc1ed85613edd75b8aea69807a71c26f4ca6a9258e82/email_validator-2.3.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/email-validator/2.3.0/json" + }, + { + "path": "vendor/wheels/exceptiongroup-1.3.1-py3-none-any.whl", + "name": "exceptiongroup", + "version": "1.3.1", + "sha256": "a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598", + "size_bytes": 16740, + "source": "https://files.pythonhosted.org/packages/8a/0e/97c33bf5009bdbac74fd2beace167cab3f978feb69cc36f1ef79360d6c4e/exceptiongroup-1.3.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/exceptiongroup/1.3.1/json" + }, + { + "path": "vendor/wheels/fastapi-0.143.0-py3-none-any.whl", + "name": "fastapi", + "version": "0.143.0", + "sha256": "3e9395fd35276425b61b516a31fdd7c77fe2af83e41b4da22e30696fb1304c5d", + "size_bytes": 144665, + "source": "https://files.pythonhosted.org/packages/bd/f4/27e386913417ad32aae42bba48b0c0cce40e9ff2fba1a871ca2702c37324/fastapi-0.143.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/fastapi/0.143.0/json" + }, + { + "path": "vendor/wheels/fastmcp-3.4.8-py3-none-any.whl", + "name": "fastmcp", + "version": "3.4.8", + "sha256": "ab4e8abe6c9d50b110f367e8c29f82b90c1478ac9180be61af10354f84f0ad8c", + "size_bytes": 8018, + "source": "https://files.pythonhosted.org/packages/19/5a/2272a1111fd2efd171bd703ab6a6c91ea17b212fe10dfef37e55a57139b8/fastmcp-3.4.8-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/fastmcp/3.4.8/json" + }, + { + "path": "vendor/wheels/fastmcp_slim-3.4.8-py3-none-any.whl", + "name": "fastmcp-slim", + "version": "3.4.8", + "sha256": "e72c6b74e90c5dcdc8f58087fbdf213636d8b5d339384a498de1c5df6fc037a7", + "size_bytes": 784136, + "source": "https://files.pythonhosted.org/packages/f1/59/2dcee23ff81cdcc4b4fcc581c6677da4da09a3abdba82305ae554bfd3fcd/fastmcp_slim-3.4.8-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/fastmcp-slim/3.4.8/json" + }, + { + "path": "vendor/wheels/filelock-4.1.0-py3-none-any.whl", + "name": "filelock", + "version": "4.1.0", + "sha256": "2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1", + "size_bytes": 133003, + "source": "https://files.pythonhosted.org/packages/ee/86/032133892a5de43b5a98200b01aadcad68cc255e274a762f08b8a76d2912/filelock-4.1.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/filelock/4.1.0/json" + }, + { + "path": "vendor/wheels/fsspec-2026.9.0-py3-none-any.whl", + "name": "fsspec", + "version": "2026.9.0", + "sha256": "8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f", + "size_bytes": 221738, + "source": "https://files.pythonhosted.org/packages/6c/c0/a98505f18594f1bce828bb159cec0fcf9860562f1a2c85913409fc8f3d9e/fsspec-2026.9.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/fsspec/2026.9.0/json" + }, + { + "path": "vendor/wheels/gradio-6.30.0-py3-none-any.whl", + "name": "gradio", + "version": "6.30.0", + "sha256": "aae3aa81ec9f44e55781b498ad2ba12b117aa512e8d2bb0ef3e52af7f2ee6305", + "size_bytes": 31365745, + "source": "https://files.pythonhosted.org/packages/4a/dc/508968f50e8c6d067f7821b5e18a180a74589621f10f4680f8d23b90564f/gradio-6.30.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/gradio/6.30.0/json" + }, + { + "path": "vendor/wheels/gradio_client-2.7.2-py3-none-any.whl", + "name": "gradio_client", + "version": "2.7.2", + "sha256": "12c9d2d940df28eb8dce58eef61f5e808265ad87bbbca53704d1330aa701e5e2", + "size_bytes": 64458, + "source": "https://files.pythonhosted.org/packages/b5/56/ce1104ac287709af37628c4bd3b24f0e78c925facda3dc8915d10b787846/gradio_client-2.7.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/gradio_client/2.7.2/json" + }, + { + "path": "vendor/wheels/griffelib-2.3.2-py3-none-any.whl", + "name": "griffelib", + "version": "2.3.2", + "sha256": "8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274", + "size_bytes": 169420, + "source": "https://files.pythonhosted.org/packages/04/e5/0ae74c83c1cab2c14daadf28bd0143eb14bb81503834af987b66badc7b61/griffelib-2.3.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/griffelib/2.3.2/json" + }, + { + "path": "vendor/wheels/groovy-0.1.2-py3-none-any.whl", + "name": "groovy", + "version": "0.1.2", + "sha256": "7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64", + "size_bytes": 14090, + "source": "https://files.pythonhosted.org/packages/28/27/3d6dcadc8a3214d8522c1e7f6a19554e33659be44546d44a2f7572ac7d2a/groovy-0.1.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/groovy/0.1.2/json" + }, + { + "path": "vendor/wheels/h11-0.16.0-py3-none-any.whl", + "name": "h11", + "version": "0.16.0", + "sha256": "63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", + "size_bytes": 37515, + "source": "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/h11/0.16.0/json" + }, + { + "path": "vendor/wheels/hf_gradio-0.4.1-py3-none-any.whl", + "name": "hf-gradio", + "version": "0.4.1", + "sha256": "76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3", + "size_bytes": 4482, + "source": "https://files.pythonhosted.org/packages/30/2d/afff2ee87e75d8eb85c92bb8cf0e15b05c23c2ebd8fd8dec781d8601ed7f/hf_gradio-0.4.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/hf-gradio/0.4.1/json" + }, + { + "path": "vendor/wheels/hf_xet-1.7.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "name": "hf-xet", + "version": "1.7.0", + "sha256": "2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8", + "size_bytes": 4212180, + "source": "https://files.pythonhosted.org/packages/a3/4c/2bf3b66c215d409655f28de1622393dde04c9461280d48c7924bb3b2decd/hf_xet-1.7.0-cp38-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/hf-xet/1.7.0/json" + }, + { + "path": "vendor/wheels/httpcore-1.0.9-py3-none-any.whl", + "name": "httpcore", + "version": "1.0.9", + "sha256": "2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", + "size_bytes": 78784, + "source": "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpcore/1.0.9/json" + }, + { + "path": "vendor/wheels/httpcore2-2.13.1-py3-none-any.whl", + "name": "httpcore2", + "version": "2.13.1", + "sha256": "e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a", + "size_bytes": 83423, + "source": "https://files.pythonhosted.org/packages/09/ba/a4568248771ce81957bfb7cc600264a40fbcda092391ee1c415c50be4bea/httpcore2-2.13.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpcore2/2.13.1/json" + }, + { + "path": "vendor/wheels/httpx-0.28.1-py3-none-any.whl", + "name": "httpx", + "version": "0.28.1", + "sha256": "d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", + "size_bytes": 73517, + "source": "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpx/0.28.1/json" + }, + { + "path": "vendor/wheels/httpx2-2.13.1-py3-none-any.whl", + "name": "httpx2", + "version": "2.13.1", + "sha256": "6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4", + "size_bytes": 95597, + "source": "https://files.pythonhosted.org/packages/d8/9c/6fe8931fd9f381042a9e4c7d5a7b4cbf7016b252bec0c99a49fce42c3326/httpx2-2.13.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpx2/2.13.1/json" + }, + { + "path": "vendor/wheels/httpx_sse-0.4.3-py3-none-any.whl", + "name": "httpx-sse", + "version": "0.4.3", + "sha256": "0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc", + "size_bytes": 8960, + "source": "https://files.pythonhosted.org/packages/d2/fd/6668e5aec43ab844de6fc74927e155a3b37bf40d7c3790e49fc0406b6578/httpx_sse-0.4.3-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/httpx-sse/0.4.3/json" + }, + { + "path": "vendor/wheels/huggingface_hub-2.2.0-py3-none-any.whl", + "name": "huggingface_hub", + "version": "2.2.0", + "sha256": "1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3", + "size_bytes": 839884, + "source": "https://files.pythonhosted.org/packages/eb/b0/0f7b430fd100b3a3b037fdbb314878200241082e607b3383c63d91a13a72/huggingface_hub-2.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/huggingface_hub/2.2.0/json" + }, + { + "path": "vendor/wheels/idna-3.20-py3-none-any.whl", + "name": "idna", + "version": "3.20", + "sha256": "ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c", + "size_bytes": 69583, + "source": "https://files.pythonhosted.org/packages/58/a2/bb081bab032533a855d44de1d56f8e8426114ff1ba5d1f07a438a0a654f8/idna-3.20-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/idna/3.20/json" + }, + { + "path": "vendor/wheels/iniconfig-2.3.1-py3-none-any.whl", + "name": "iniconfig", + "version": "2.3.1", + "sha256": "9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7", + "size_bytes": 7552, + "source": "https://files.pythonhosted.org/packages/56/43/4ca9e49d27a1fcf6bece6f6aec0ea46bb9112489b93d4b688fb415457bdb/iniconfig-2.3.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/iniconfig/2.3.1/json" + }, + { + "path": "vendor/wheels/jaraco.classes-3.4.0-py3-none-any.whl", + "name": "jaraco.classes", + "version": "3.4.0", + "sha256": "f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790", + "size_bytes": 6777, + "source": "https://files.pythonhosted.org/packages/7f/66/b15ce62552d84bbfcec9a4873ab79d993a1dd4edb922cbfccae192bd5b5f/jaraco.classes-3.4.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jaraco.classes/3.4.0/json" + }, + { + "path": "vendor/wheels/jaraco_context-6.1.2-py3-none-any.whl", + "name": "jaraco.context", + "version": "6.1.2", + "sha256": "bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535", + "size_bytes": 7871, + "source": "https://files.pythonhosted.org/packages/f2/58/bc8954bda5fcda97bd7c19be11b85f91973d67a706ed4a3aec33e7de22db/jaraco_context-6.1.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jaraco.context/6.1.2/json" + }, + { + "path": "vendor/wheels/jaraco_functools-4.6.0-py3-none-any.whl", + "name": "jaraco.functools", + "version": "4.6.0", + "sha256": "99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30", + "size_bytes": 11677, + "source": "https://files.pythonhosted.org/packages/02/36/ecc85bc96c273dc8a11273ed4782272975e6338d4a3e9228621175edf0e3/jaraco_functools-4.6.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jaraco.functools/4.6.0/json" + }, + { + "path": "vendor/wheels/jeepney-0.9.0-py3-none-any.whl", + "name": "jeepney", + "version": "0.9.0", + "sha256": "97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683", + "size_bytes": 49010, + "source": "https://files.pythonhosted.org/packages/b2/a3/e137168c9c44d18eff0376253da9f1e9234d0239e0ee230d2fee6cea8e55/jeepney-0.9.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jeepney/0.9.0/json" + }, + { + "path": "vendor/wheels/jinja2-3.1.6-py3-none-any.whl", + "name": "Jinja2", + "version": "3.1.6", + "sha256": "85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", + "size_bytes": 134899, + "source": "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/Jinja2/3.1.6/json" + }, + { + "path": "vendor/wheels/jiter-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "name": "jiter", + "version": "0.17.0", + "sha256": "8c21265b251d99bbb40080d178a8953e35601d3a1564e05c4de4c0d2ca616797", + "size_bytes": 345025, + "source": "https://files.pythonhosted.org/packages/52/f8/b6e513ecbdf3b3cebe587c2279281ecf775b729a58cf4cc7bdf898ded029/jiter-0.17.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/jiter/0.17.0/json" + }, + { + "path": "vendor/wheels/joserfc-1.7.5-py3-none-any.whl", + "name": "joserfc", + "version": "1.7.5", + "sha256": "add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159", + "size_bytes": 71269, + "source": "https://files.pythonhosted.org/packages/67/c5/82addfd375e5ee6520644e0553e4aadde92d668c4fc99cc716d337fe7bb3/joserfc-1.7.5-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/joserfc/1.7.5/json" + }, + { + "path": "vendor/wheels/jsonref-1.1.0-py3-none-any.whl", + "name": "jsonref", + "version": "1.1.0", + "sha256": "590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9", + "size_bytes": 9425, + "source": "https://files.pythonhosted.org/packages/0c/ec/e1db9922bceb168197a558a2b8c03a7963f1afe93517ddd3cf99f202f996/jsonref-1.1.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jsonref/1.1.0/json" + }, + { + "path": "vendor/wheels/jsonschema-4.26.0-py3-none-any.whl", + "name": "jsonschema", + "version": "4.26.0", + "sha256": "d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce", + "size_bytes": 90630, + "source": "https://files.pythonhosted.org/packages/69/90/f63fb5873511e014207a475e2bb4e8b2e570d655b00ac19a9a0ca0a385ee/jsonschema-4.26.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jsonschema/4.26.0/json" + }, + { + "path": "vendor/wheels/jsonschema_path-0.5.0-py3-none-any.whl", + "name": "jsonschema-path", + "version": "0.5.0", + "sha256": "2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2", + "size_bytes": 24077, + "source": "https://files.pythonhosted.org/packages/04/2c/9e69d73c4297508be9e3b64a970ea3971b3eb8db64ffc5802d40bd25981f/jsonschema_path-0.5.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jsonschema-path/0.5.0/json" + }, + { + "path": "vendor/wheels/jsonschema_specifications-2025.9.1-py3-none-any.whl", + "name": "jsonschema-specifications", + "version": "2025.9.1", + "sha256": "98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", + "size_bytes": 18437, + "source": "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/jsonschema-specifications/2025.9.1/json" + }, + { + "path": "vendor/wheels/keyring-25.7.0-py3-none-any.whl", + "name": "keyring", + "version": "25.7.0", + "sha256": "be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f", + "size_bytes": 39160, + "source": "https://files.pythonhosted.org/packages/81/db/e655086b7f3a705df045bf0933bdd9c2f79bb3c97bfef1384598bb79a217/keyring-25.7.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/keyring/25.7.0/json" + }, + { + "path": "vendor/wheels/markdown_it_py-4.2.0-py3-none-any.whl", + "name": "markdown-it-py", + "version": "4.2.0", + "sha256": "9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a", + "size_bytes": 91687, + "source": "https://files.pythonhosted.org/packages/b3/81/4da04ced5a082363ecfa159c010d200ecbd959ae410c10c0264a38cac0f5/markdown_it_py-4.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/markdown-it-py/4.2.0/json" + }, + { + "path": "vendor/wheels/markupsafe-3.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "name": "MarkupSafe", + "version": "3.0.4", + "sha256": "8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581", + "size_bytes": 22985, + "source": "https://files.pythonhosted.org/packages/4f/a7/aeedb5140afa41fc74c225e9184ab96723a6e873b6ee1c9fede7283456d8/markupsafe-3.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/MarkupSafe/3.0.4/json" + }, + { + "path": "vendor/wheels/mcp-1.30.0-py3-none-any.whl", + "name": "mcp", + "version": "1.30.0", + "sha256": "666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0", + "size_bytes": 234581, + "source": "https://files.pythonhosted.org/packages/f5/f4/e58bc33317c92a0203664daaf00bf6f41166cc0149e5d6870a03f7cd004a/mcp-1.30.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/mcp/1.30.0/json" + }, + { + "path": "vendor/wheels/mdurl-0.1.2-py3-none-any.whl", + "name": "mdurl", + "version": "0.1.2", + "sha256": "84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8", + "size_bytes": 9979, + "source": "https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/mdurl/0.1.2/json" + }, + { + "path": "vendor/wheels/more_itertools-11.1.0-py3-none-any.whl", + "name": "more-itertools", + "version": "11.1.0", + "sha256": "4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192", + "size_bytes": 72226, + "source": "https://files.pythonhosted.org/packages/e8/3d/1087453384dbde46a8c7f9356eead2c58be8a7bf156bca40243377c85715/more_itertools-11.1.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/more-itertools/11.1.0/json" + }, + { + "path": "vendor/wheels/numpy-2.5.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "name": "numpy", + "version": "2.5.3", + "sha256": "b7e18c623bb5c95acb3b3328861272816ba199fb531921c5d6d0b675f1fde9e3", + "size_bytes": 16717410, + "source": "https://files.pythonhosted.org/packages/65/af/aa78d1a88805456e212b65461354cd943197fb9acecc4c90fd12295123a3/numpy-2.5.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/numpy/2.5.3/json" + }, + { + "path": "vendor/wheels/openai-3.28.0-py3-none-any.whl", + "name": "openai", + "version": "3.28.0", + "sha256": "1ea40a084ffe2f9f16fd3bea6e870f757853b536b18d8e737c518ef849a2920c", + "size_bytes": 2171532, + "source": "https://files.pythonhosted.org/packages/5b/4a/5c807ade1a86ab8accad20dc993ca7de5d1f7b2e78d4674c300c2e6a47b9/openai-3.28.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/openai/3.28.0/json" + }, + { + "path": "vendor/wheels/openapi_pydantic-0.6.0-py3-none-any.whl", + "name": "openapi-pydantic", + "version": "0.6.0", + "sha256": "8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3", + "size_bytes": 96931, + "source": "https://files.pythonhosted.org/packages/31/57/9d3eb823a03c33e9d4c810e6a3276e3a6dc820a7fdc0961db2c04e613817/openapi_pydantic-0.6.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/openapi-pydantic/0.6.0/json" + }, + { + "path": "vendor/wheels/openenv-0.6.1.dev0-py3-none-any.whl", + "name": "openenv", + "version": "0.6.1.dev0", + "sha256": "93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a", + "size_bytes": 700304, + "source": "https://github.com/meta-pytorch/OpenEnv/tree/86a180ede21e044f7929b9a7783ad83aa67d83a3", + "metadata_source": null + }, + { + "path": "vendor/wheels/opentelemetry_api-1.45.1-py3-none-any.whl", + "name": "opentelemetry-api", + "version": "1.45.1", + "sha256": "b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb", + "size_bytes": 60256, + "source": "https://files.pythonhosted.org/packages/1e/41/f7dcf80b81ee8e71c1a2b59f14208bc723edbd89ed027a73b175abf6348e/opentelemetry_api-1.45.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/opentelemetry-api/1.45.1/json" + }, + { + "path": "vendor/wheels/orjson-3.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "name": "orjson", + "version": "3.13.0", + "sha256": "bceadfd314bd238f584fc229a4bbaf0e573597e7a026dec5429fbf29fd66c641", + "size_bytes": 130612, + "source": "https://files.pythonhosted.org/packages/ea/8c/bb07c368abbf4021c4cd01c12edb526e00090f7f750ff1b88da6e6b6c7a6/orjson-3.13.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/orjson/3.13.0/json" + }, + { + "path": "vendor/wheels/packaging-26.3-py3-none-any.whl", + "name": "packaging", + "version": "26.3", + "sha256": "d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", + "size_bytes": 129956, + "source": "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/packaging/26.3/json" + }, + { + "path": "vendor/wheels/pandas-3.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", + "name": "pandas", + "version": "3.0.6", + "sha256": "0704044b676496b8350e023b09f174a26772456c974a2b11c36bebb558c9490d", + "size_bytes": 10788193, + "source": "https://files.pythonhosted.org/packages/cb/67/0c0f18e38d7f2d2af8c24b3315bc4046e73bbdd4a5540405506671ad0c0d/pandas-3.0.6-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/pandas/3.0.6/json" + }, + { + "path": "vendor/wheels/pathable-0.6.0-py3-none-any.whl", + "name": "pathable", + "version": "0.6.0", + "sha256": "82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566", + "size_bytes": 18983, + "source": "https://files.pythonhosted.org/packages/a2/e8/6d75ffd9784bce2e93d1ae4415649427e39a53bb172d4672b2b59c6f0a7b/pathable-0.6.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pathable/0.6.0/json" + }, + { + "path": "vendor/wheels/pillow-12.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "name": "pillow", + "version": "12.3.0", + "sha256": "78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91", + "size_bytes": 6940830, + "source": "https://files.pythonhosted.org/packages/84/21/a35af28dcc61f37ed850a2d64c65c701321dfbf25085e469d5559360cbbf/pillow-12.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/pillow/12.3.0/json" + }, + { + "path": "vendor/wheels/platformdirs-4.12.4-py3-none-any.whl", + "name": "platformdirs", + "version": "4.12.4", + "sha256": "78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7", + "size_bytes": 32596, + "source": "https://files.pythonhosted.org/packages/f4/ba/223e00b885e960edd5d4b4d178c88acce019bd5b83786093681b8c393492/platformdirs-4.12.4-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/platformdirs/4.12.4/json" + }, + { + "path": "vendor/wheels/pluggy-1.6.0-py3-none-any.whl", + "name": "pluggy", + "version": "1.6.0", + "sha256": "e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", + "size_bytes": 20538, + "source": "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pluggy/1.6.0/json" + }, + { + "path": "vendor/wheels/py_key_value_aio-0.4.6-py3-none-any.whl", + "name": "py-key-value-aio", + "version": "0.4.6", + "sha256": "820b30c7959fc738ea3d00160cdb10cd258f51e38737b2add530defeea1ded77", + "size_bytes": 171289, + "source": "https://files.pythonhosted.org/packages/9a/46/12871550fb0613d149144bb9d41f22680d5f46717bc45a76eb5798c20c3f/py_key_value_aio-0.4.6-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/py-key-value-aio/0.4.6/json" + }, + { + "path": "vendor/wheels/pycparser-3.11-py3-none-any.whl", + "name": "pycparser", + "version": "3.11", + "sha256": "51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80", + "size_bytes": 51178, + "source": "https://files.pythonhosted.org/packages/90/11/0e6f11117525ff0eec40ebac3d313376f102df93ca44ad9e893ee85e4f89/pycparser-3.11-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pycparser/3.11/json" + }, + { + "path": "vendor/wheels/pydantic-2.14.0-py3-none-any.whl", + "name": "pydantic", + "version": "2.14.0", + "sha256": "15fab1bea6f1dc5003b54fc2ecab230c1fd1dbade2acd4addc52d81e32416d4b", + "size_bytes": 487109, + "source": "https://files.pythonhosted.org/packages/2d/eb/9146591cc819d040475bf7f2be786710c7f7eb8083693bf859728da2ca9c/pydantic-2.14.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pydantic/2.14.0/json" + }, + { + "path": "vendor/wheels/pydantic_core-2.50.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "name": "pydantic_core", + "version": "2.50.0", + "sha256": "f187030fc3d62c668feb0f09e92852e0eb414d7fcefc4748f2e67d245aade37e", + "size_bytes": 2160358, + "source": "https://files.pythonhosted.org/packages/ca/e2/2f793fa2f1b338aa03124efd4362956c84d7bf1b331dc86050bc0151e67d/pydantic_core-2.50.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/pydantic_core/2.50.0/json" + }, + { + "path": "vendor/wheels/pydantic_settings-2.15.0-py3-none-any.whl", + "name": "pydantic-settings", + "version": "2.15.0", + "sha256": "0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42", + "size_bytes": 69413, + "source": "https://files.pythonhosted.org/packages/30/a4/2bffa9f8e804325a09867f0e9d30795c80ea9f8d62560bd1b6ad6220eb2f/pydantic_settings-2.15.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pydantic-settings/2.15.0/json" + }, + { + "path": "vendor/wheels/pydub-0.25.1-py2.py3-none-any.whl", + "name": "pydub", + "version": "0.25.1", + "sha256": "65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6", + "size_bytes": 32327, + "source": "https://files.pythonhosted.org/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pydub/0.25.1/json" + }, + { + "path": "vendor/wheels/pygments-2.21.0-py3-none-any.whl", + "name": "Pygments", + "version": "2.21.0", + "sha256": "2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9", + "size_bytes": 1250147, + "source": "https://files.pythonhosted.org/packages/71/46/17f022dd3e953bf20a04a028a21ec746d942f8d2af30fa0f124fa0e6a684/pygments-2.21.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/Pygments/2.21.0/json" + }, + { + "path": "vendor/wheels/pyjwt-2.15.1-py3-none-any.whl", + "name": "PyJWT", + "version": "2.15.1", + "sha256": "42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193", + "size_bytes": 33860, + "source": "https://files.pythonhosted.org/packages/50/ca/44de4e75f8aadc457f0634be3b542815078ded46dca30efb960edeecad6e/pyjwt-2.15.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/PyJWT/2.15.1/json" + }, + { + "path": "vendor/wheels/pyperclip-1.11.0-py3-none-any.whl", + "name": "pyperclip", + "version": "1.11.0", + "sha256": "299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273", + "size_bytes": 11063, + "source": "https://files.pythonhosted.org/packages/df/80/fc9d01d5ed37ba4c42ca2b55b4339ae6e200b456be3a1aaddf4a9fa99b8c/pyperclip-1.11.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pyperclip/1.11.0/json" + }, + { + "path": "vendor/wheels/pytest-9.1.1-py3-none-any.whl", + "name": "pytest", + "version": "9.1.1", + "sha256": "37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", + "size_bytes": 386536, + "source": "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pytest/9.1.1/json" + }, + { + "path": "vendor/wheels/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", + "name": "python-dateutil", + "version": "2.9.0.post0", + "sha256": "a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", + "size_bytes": 229892, + "source": "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/python-dateutil/2.9.0.post0/json" + }, + { + "path": "vendor/wheels/python_dotenv-1.2.4-py3-none-any.whl", + "name": "python-dotenv", + "version": "1.2.4", + "sha256": "42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc", + "size_bytes": 23266, + "source": "https://files.pythonhosted.org/packages/60/d1/38f3a3405989a89ac18390803e70c6ad7c7760da4f9b83cbeca0c44a0c72/python_dotenv-1.2.4-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/python-dotenv/1.2.4/json" + }, + { + "path": "vendor/wheels/python_multipart-0.0.32-py3-none-any.whl", + "name": "python-multipart", + "version": "0.0.32", + "sha256": "ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23", + "size_bytes": 30042, + "source": "https://files.pythonhosted.org/packages/e1/04/e8135ebd1ad02c56ec633277529b2602ff99ff634be76cdba5744cf554fd/python_multipart-0.0.32-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/python-multipart/0.0.32/json" + }, + { + "path": "vendor/wheels/pytz-2026.5-py2.py3-none-any.whl", + "name": "pytz", + "version": "2026.5", + "sha256": "e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03", + "size_bytes": 506342, + "source": "https://files.pythonhosted.org/packages/4f/ef/c66110d46fb800dda0bf33164182dfadabe26a90e4476844d502a23dca8e/pytz-2026.5-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/pytz/2026.5/json" + }, + { + "path": "vendor/wheels/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "name": "PyYAML", + "version": "6.0.3", + "sha256": "ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", + "size_bytes": 807870, + "source": "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/PyYAML/6.0.3/json" + }, + { + "path": "vendor/wheels/referencing-0.37.0-py3-none-any.whl", + "name": "referencing", + "version": "0.37.0", + "sha256": "381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", + "size_bytes": 26766, + "source": "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/referencing/0.37.0/json" + }, + { + "path": "vendor/wheels/requests-2.34.2-py3-none-any.whl", + "name": "requests", + "version": "2.34.2", + "sha256": "2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0", + "size_bytes": 73075, + "source": "https://files.pythonhosted.org/packages/a0/f4/c67b0b3f1b9245e8d266f0f112c500d50e5b4e83cb6f3b71b6528104182a/requests-2.34.2-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/requests/2.34.2/json" + }, + { + "path": "vendor/wheels/rich-15.0.0-py3-none-any.whl", + "name": "rich", + "version": "15.0.0", + "sha256": "33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb", + "size_bytes": 310654, + "source": "https://files.pythonhosted.org/packages/82/3b/64d4899d73f91ba49a8c18a8ff3f0ea8f1c1d75481760df8c68ef5235bf5/rich-15.0.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/rich/15.0.0/json" + }, + { + "path": "vendor/wheels/rich_rst-2.2.0-py3-none-any.whl", + "name": "rich-rst", + "version": "2.2.0", + "sha256": "1ea1c43813dc4a8d86475fce27ffb74e0ada3d4656c9f8130ba2a59868055fe9", + "size_bytes": 279274, + "source": "https://files.pythonhosted.org/packages/d1/4e/716b42bf066e180c1235783b46f095a5d871d05dca7006d2295aac29c491/rich_rst-2.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/rich-rst/2.2.0/json" + }, + { + "path": "vendor/wheels/rpds_py-2026.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "name": "rpds-py", + "version": "2026.9.1", + "sha256": "addeda51556dac7c1a2f14cda62db8b621cd12afba3091d03a96c72932387eab", + "size_bytes": 371261, + "source": "https://files.pythonhosted.org/packages/1d/6d/b26eb1e75395925b3a142ed351cbed2ec8212f5c9d937aee3df32c701baa/rpds_py-2026.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/rpds-py/2026.9.1/json" + }, + { + "path": "vendor/wheels/safehttpx-0.1.7-py3-none-any.whl", + "name": "safehttpx", + "version": "0.1.7", + "sha256": "c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde", + "size_bytes": 8959, + "source": "https://files.pythonhosted.org/packages/2e/a3/0f0b7d78e2f1eb9e8e1afbff1d2bff8d60144aee17aca51c065b516743dd/safehttpx-0.1.7-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/safehttpx/0.1.7/json" + }, + { + "path": "vendor/wheels/secretstorage-3.5.0-py3-none-any.whl", + "name": "SecretStorage", + "version": "3.5.0", + "sha256": "0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137", + "size_bytes": 15554, + "source": "https://files.pythonhosted.org/packages/b7/46/f5af3402b579fd5e11573ce652019a67074317e18c1935cc0b4ba9b35552/secretstorage-3.5.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/SecretStorage/3.5.0/json" + }, + { + "path": "vendor/wheels/semantic_version-2.10.0-py2.py3-none-any.whl", + "name": "semantic-version", + "version": "2.10.0", + "sha256": "de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177", + "size_bytes": 15552, + "source": "https://files.pythonhosted.org/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/semantic-version/2.10.0/json" + }, + { + "path": "vendor/wheels/shellingham-1.5.4-py2.py3-none-any.whl", + "name": "shellingham", + "version": "1.5.4", + "sha256": "7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686", + "size_bytes": 9755, + "source": "https://files.pythonhosted.org/packages/e0/f9/0595336914c5619e5f28a1fb793285925a8cd4b432c9da0a987836c7f822/shellingham-1.5.4-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/shellingham/1.5.4/json" + }, + { + "path": "vendor/wheels/six-1.17.0-py2.py3-none-any.whl", + "name": "six", + "version": "1.17.0", + "sha256": "4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", + "size_bytes": 11050, + "source": "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/six/1.17.0/json" + }, + { + "path": "vendor/wheels/sniffio-1.3.1-py3-none-any.whl", + "name": "sniffio", + "version": "1.3.1", + "sha256": "2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2", + "size_bytes": 10235, + "source": "https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/sniffio/1.3.1/json" + }, + { + "path": "vendor/wheels/sse_starlette-3.5.0-py3-none-any.whl", + "name": "sse-starlette", + "version": "3.5.0", + "sha256": "3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997", + "size_bytes": 17407, + "source": "https://files.pythonhosted.org/packages/be/e4/cdda14023c316d71493bc54fdffc3dd006631b88866145c9d3cc33e0f1df/sse_starlette-3.5.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/sse-starlette/3.5.0/json" + }, + { + "path": "vendor/wheels/starlette-1.7.0-py3-none-any.whl", + "name": "starlette", + "version": "1.7.0", + "sha256": "67f8e99895493dd2911a03f11314af6ceebeae4e704bb9f43dfc6a9db151c93e", + "size_bytes": 78980, + "source": "https://files.pythonhosted.org/packages/4e/d6/1ec1b290f9e0fb067899b61e1d37a30c923068bad260b216dbe37a7d2967/starlette-1.7.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/starlette/1.7.0/json" + }, + { + "path": "vendor/wheels/tomli-2.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "name": "tomli", + "version": "2.5.0", + "sha256": "6cf74416bdc94ae458b14e37286c1073081850ac8459a00d0c5efef5d44294c6", + "size_bytes": 286435, + "source": "https://files.pythonhosted.org/packages/43/90/6090e706ff27a6f89f4a40578e3324b95c3cd8c4150868aabf33a8f414c3/tomli-2.5.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/tomli/2.5.0/json" + }, + { + "path": "vendor/wheels/tomli_w-1.2.0-py3-none-any.whl", + "name": "tomli_w", + "version": "1.2.0", + "sha256": "188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90", + "size_bytes": 6675, + "source": "https://files.pythonhosted.org/packages/c7/18/c86eb8e0202e32dd3df50d43d7ff9854f8e0603945ff398974c1d91ac1ef/tomli_w-1.2.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/tomli_w/1.2.0/json" + }, + { + "path": "vendor/wheels/tomlkit-0.14.0-py3-none-any.whl", + "name": "tomlkit", + "version": "0.14.0", + "sha256": "592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680", + "size_bytes": 39310, + "source": "https://files.pythonhosted.org/packages/b5/11/87d6d29fb5d237229d67973a6c9e06e048f01cf4994dee194ab0ea841814/tomlkit-0.14.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/tomlkit/0.14.0/json" + }, + { + "path": "vendor/wheels/tqdm-4.70.1-py3-none-any.whl", + "name": "tqdm", + "version": "4.70.1", + "sha256": "c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73", + "size_bytes": 80199, + "source": "https://files.pythonhosted.org/packages/a7/03/921a3d3c75785aca9ebfbfcabfbc3a1be12e2ab5265deb026d55a5a3f83e/tqdm-4.70.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/tqdm/4.70.1/json" + }, + { + "path": "vendor/wheels/truststore-0.10.4-py3-none-any.whl", + "name": "truststore", + "version": "0.10.4", + "sha256": "adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981", + "size_bytes": 18660, + "source": "https://files.pythonhosted.org/packages/19/97/56608b2249fe206a67cd573bc93cd9896e1efb9e98bce9c163bcdc704b88/truststore-0.10.4-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/truststore/0.10.4/json" + }, + { + "path": "vendor/wheels/typer-0.27.3-py3-none-any.whl", + "name": "typer", + "version": "0.27.3", + "sha256": "e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff", + "size_bytes": 123312, + "source": "https://files.pythonhosted.org/packages/07/ea/2e31b67051e91a133189e9c000c222502ddc6969856416de0d095de4c0b0/typer-0.27.3-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/typer/0.27.3/json" + }, + { + "path": "vendor/wheels/typing_extensions-4.16.0-py3-none-any.whl", + "name": "typing_extensions", + "version": "4.16.0", + "sha256": "481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8", + "size_bytes": 45571, + "source": "https://files.pythonhosted.org/packages/49/d3/b8441a820a491ddfc024b0b0cf0393375b75ea13866d9c66727e54c2fc80/typing_extensions-4.16.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/typing_extensions/4.16.0/json" + }, + { + "path": "vendor/wheels/typing_inspection-0.4.4-py3-none-any.whl", + "name": "typing-inspection", + "version": "0.4.4", + "sha256": "65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147", + "size_bytes": 14750, + "source": "https://files.pythonhosted.org/packages/67/81/4add07e5172b7ac40d8ed5ff580409a7801a4fe26d529bdd915401dabfbe/typing_inspection-0.4.4-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/typing-inspection/0.4.4/json" + }, + { + "path": "vendor/wheels/uncalled_for-0.4.1-py3-none-any.whl", + "name": "uncalled-for", + "version": "0.4.1", + "sha256": "b611b38879d9fe5088297e7bb28f2ddd12d2d73dad933d93da107fb63eb4058e", + "size_bytes": 14889, + "source": "https://files.pythonhosted.org/packages/bf/a6/ba763e3812e572de7291676c3a41adfac1ef1209a6acda6bae055970f127/uncalled_for-0.4.1-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/uncalled-for/0.4.1/json" + }, + { + "path": "vendor/wheels/urllib3-2.8.0-py3-none-any.whl", + "name": "urllib3", + "version": "2.8.0", + "sha256": "0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3", + "size_bytes": 135717, + "source": "https://files.pythonhosted.org/packages/92/9d/c4e665119135114480843e7ab388fa94d8480650450e6f8e26b70d323a4c/urllib3-2.8.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/urllib3/2.8.0/json" + }, + { + "path": "vendor/wheels/uvicorn-0.54.0-py3-none-any.whl", + "name": "uvicorn", + "version": "0.54.0", + "sha256": "505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf", + "size_bytes": 87427, + "source": "https://files.pythonhosted.org/packages/38/0c/b54a4fdd7f90a3af8b02ebc9ce6712c2c208b7926a2f7bad95c33ebbe943/uvicorn-0.54.0-py3-none-any.whl", + "metadata_source": "https://pypi.org/pypi/uvicorn/0.54.0/json" + }, + { + "path": "vendor/wheels/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "name": "watchfiles", + "version": "1.3.0", + "sha256": "b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1", + "size_bytes": 458353, + "source": "https://files.pythonhosted.org/packages/8a/cf/e3ad894ed5909a7c44b0707e89bc25d19a3d78b3a7aec846119443b6ae56/watchfiles-1.3.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/watchfiles/1.3.0/json" + }, + { + "path": "vendor/wheels/websockets-17.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", + "name": "websockets", + "version": "17.2", + "sha256": "6627b913b8586b1c06db9516b31dd0dfbc621de3bb9312616d92a7e44f268a5b", + "size_bytes": 225299, + "source": "https://files.pythonhosted.org/packages/03/c0/a6d8be9c43e4456fb9597fdf8b5e0ce1f0a5df41503acce6d869536e4e23/websockets-17.2-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", + "metadata_source": "https://pypi.org/pypi/websockets/17.2/json" + }, + { + "path": "vendor/debs/libseccomp2_2.5.4-1+deb12u1_amd64.deb", + "name": "libseccomp2", + "version": "2.5.4-1+deb12u1", + "sha256": "108fe67957ca7cf9ba51d801118a1b37d404bea7b6e365025cd00779e9eca38d", + "size_bytes": 46808, + "source": "https://deb.debian.org/debian/pool/main/libs/libseccomp/libseccomp2_2.5.4-1+deb12u1_amd64.deb", + "metadata_source": "https://deb.debian.org/debian/dists/bookworm/main/binary-amd64/Packages.xz" + } + ] +} diff --git a/components/pdbthink/licenses/LICENSE-PDBTHINK b/components/pdbthink/licenses/LICENSE-PDBTHINK new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 --- /dev/null +++ b/components/pdbthink/licenses/LICENSE-PDBTHINK @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/components/pdbthink/licenses/SOURCE.json b/components/pdbthink/licenses/SOURCE.json new file mode 100644 index 0000000000000000000000000000000000000000..e7308017bbd7711aa8ecdeac5913f7ceafeb5460 --- /dev/null +++ b/components/pdbthink/licenses/SOURCE.json @@ -0,0 +1,14 @@ +{ + "dataset": "open-athena/pdbthink-coordinate-tasks", + "revision": "3734406cb97b1702844319f9a5d860cbbf8fe660", + "split": "train", + "source_url": "https://huggingface.co/datasets/open-athena/pdbthink-coordinate-tasks/tree/3734406cb97b1702844319f9a5d860cbbf8fe660", + "license": "Apache-2.0", + "coordinates": "PDB / wwPDB CC0", + "adaptation": "Only answer delivery changes: required answer plus optional visible reasoning string inside one JSON action. Only answer reaches the unchanged original checker; original scientific task and no-tools single-answer boundary are preserved.", + "original_no_tools_boundary": true, + "single_submission": true, + "openenv_revision": "86a180ede21e044f7929b9a7783ad83aa67d83a3", + "fixed_task_count": 3, + "selection": "Three explicit original train task IDs, one chi1 family with all three categories. No random task routing." +} diff --git a/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/public_task.json b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/public_task.json new file mode 100644 index 0000000000000000000000000000000000000000..d8ad328155f3d392bc5f966be93f54d89a781679 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/public_task.json @@ -0,0 +1,10 @@ +{ + "task_id": "pdbthink-s09-70c0778d985e571dde37", + "instruction": "You will be given one or more molecular structures and a question about them.\nAnswer using only the information supplied in the prompt. Do not use tools or\nexternal resources.\n\nProtein residues are identified as :. For example, A:V22 is valine 22 in chain A. When asked for a\nresidue, use exactly this format. When asked for a list, put the complete residue identifiers in a JSON\narray. Do not include additional residues.\n\nDeliver the answer as exactly one JSON object with op=\"call\",\ntool=\"submit_answer\", and an arguments object containing the required answer.\nYou may put visible working in an optional arguments.reasoning string before\narguments.answer; key order is not graded. Omit reasoning if it is unnecessary,\nand do not repeat work already completed in internal thinking.\nAfter any internal thinking, the reply must contain only the JSON object,\nwithout prose, Markdown fences, or a FINAL: line outside it.\nUse a number for a distance, an array of complete identifiers for a residue\nlist, or the specified label string for a category. Only answer is graded.\nThe first submission ends the episode. This delivery operation provides\nno computational tools or answer revisions.\n\nYou are given one molecular structure.\n\nThe structure is given below in PDB format. Only coordinate records are included; there are no header, annotation, connectivity or secondary-structure records, hydrogens have been removed, and B-factors are zero.\nThe coordinates have been rigidly rotated and translated; distances and angles are unchanged.\n\nStructure:\nATOM 1 N PHE L 300 7.874 1.311 3.240 1.00 0.00 N\nATOM 2 CA PHE L 300 6.757 1.980 2.582 1.00 0.00 C\nATOM 3 C PHE L 300 5.615 1.002 2.300 1.00 0.00 C\nATOM 4 O PHE L 300 5.774 0.033 1.559 1.00 0.00 O\nATOM 5 CB PHE L 300 7.221 2.663 1.284 1.00 0.00 C\nATOM 6 CG PHE L 300 7.834 1.726 0.276 1.00 0.00 C\nATOM 7 CD1 PHE L 300 9.130 1.256 0.437 1.00 0.00 C\nATOM 8 CD2 PHE L 300 7.122 1.337 -0.848 1.00 0.00 C\nATOM 9 CE1 PHE L 300 9.693 0.401 -0.492 1.00 0.00 C\nATOM 10 CE2 PHE L 300 7.680 0.483 -1.780 1.00 0.00 C\nATOM 11 CZ PHE L 300 8.968 0.015 -1.602 1.00 0.00 C\nATOM 12 N VAL L 301 4.467 1.257 2.914 1.00 0.00 N\nATOM 13 CA VAL L 301 3.301 0.385 2.744 1.00 0.00 C\nATOM 14 C VAL L 301 2.621 0.725 1.420 1.00 0.00 C\nATOM 15 O VAL L 301 2.314 1.902 1.176 1.00 0.00 O\nATOM 16 CB VAL L 301 2.335 0.541 3.913 1.00 0.00 C\nATOM 17 CG1 VAL L 301 1.085 -0.295 3.682 1.00 0.00 C\nATOM 18 CG2 VAL L 301 3.012 0.138 5.207 1.00 0.00 C\nATOM 19 N PRO L 302 2.369 -0.254 0.557 1.00 0.00 N\nATOM 20 CA PRO L 302 1.670 0.023 -0.701 1.00 0.00 C\nATOM 21 C PRO L 302 0.219 0.383 -0.442 1.00 0.00 C\nATOM 22 O PRO L 302 -0.315 0.101 0.642 1.00 0.00 O\nATOM 23 CB PRO L 302 1.789 -1.302 -1.468 1.00 0.00 C\nATOM 24 CG PRO L 302 1.928 -2.334 -0.401 1.00 0.00 C\nATOM 25 CD PRO L 302 2.720 -1.679 0.696 1.00 0.00 C\nATOM 26 N PRO L 303 -0.462 1.010 -1.415 1.00 0.00 N\nATOM 27 CA PRO L 303 -1.874 1.354 -1.229 1.00 0.00 C\nATOM 28 C PRO L 303 -2.789 0.138 -1.313 1.00 0.00 C\nATOM 29 O PRO L 303 -2.472 -0.830 -2.007 1.00 0.00 O\nATOM 30 CB PRO L 303 -2.150 2.325 -2.380 1.00 0.00 C\nATOM 31 CG PRO L 303 -1.174 1.935 -3.432 1.00 0.00 C\nATOM 32 CD PRO L 303 0.068 1.528 -2.689 1.00 0.00 C\nATOM 33 N SEP L 304 -3.911 0.194 -0.604 1.00 0.00 N\nATOM 34 CA SEP L 304 -4.873 -0.902 -0.586 1.00 0.00 C\nATOM 35 CB SEP L 304 -5.848 -0.723 0.579 1.00 0.00 C\nATOM 36 OG SEP L 304 -5.145 -0.456 1.778 1.00 0.00 O\nATOM 37 C SEP L 304 -5.640 -0.988 -1.899 1.00 0.00 C\nATOM 38 O SEP L 304 -6.062 0.033 -2.443 1.00 0.00 O\nATOM 39 P SEP L 304 -5.841 0.746 2.590 1.00 0.00 P\nATOM 40 O1P SEP L 304 -5.232 2.147 2.087 1.00 0.00 O\nATOM 41 O2P SEP L 304 -7.428 0.726 2.345 1.00 0.00 O\nATOM 42 O3P SEP L 304 -5.541 0.556 4.159 1.00 0.00 O\nATOM 43 N PRO L 305 -5.824 -2.213 -2.411 1.00 0.00 N\nATOM 44 CA PRO L 305 -6.534 -2.440 -3.675 1.00 0.00 C\nATOM 45 C PRO L 305 -8.015 -2.075 -3.599 1.00 0.00 C\nATOM 46 O PRO L 305 -8.545 -1.932 -2.497 1.00 0.00 O\nATOM 47 CB PRO L 305 -6.356 -3.942 -3.908 1.00 0.00 C\nATOM 48 CG PRO L 305 -6.164 -4.509 -2.543 1.00 0.00 C\nATOM 49 CD PRO L 305 -5.368 -3.475 -1.803 1.00 0.00 C\nTER 50 PRO L 305\nEND\n\nQuestion: Classify the chi1 side-chain rotamer of residue L:F300. Chi1 is the N-CA-CB-CG dihedral angle, normalised to [-180, 180) degrees. Answer g+ for 0 <= chi1 < 120, t for chi1 >= 120 or chi1 < -120, and g- for -120 <= chi1 < 0.\n\nAnswer with exactly one of the listed categories.\nDelivery example: {\"op\":\"call\",\"tool\":\"submit_answer\",\"arguments\":{\"answer\":\"g+\"}}\n", + "answer_schema": "category", + "categories": [ + "g+", + "t", + "g-" + ] +} diff --git a/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e0495cb114e72c83fe317c202aa1b870049adc3 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/__init__.py @@ -0,0 +1,74 @@ +"""Deterministic answer parsing and scoring.""" + +from __future__ import annotations + +from typing import Any + +from .parse import ( + AnswerFormatError, + ParsedAnswer, + canonical_atom, + canonical_pair, + canonical_residue, + extract_final, + looks_like_refusal, + parse_answer, +) +from .scorers import SCORING_VERSION, score_answer, set_scores + +__all__ = [ + "AnswerFormatError", + "ParsedAnswer", + "canonical_atom", + "canonical_pair", + "canonical_residue", + "extract_final", + "looks_like_refusal", + "parse_answer", + "score_answer", + "score_response", + "set_scores", +] + + +def score_response( + raw_response: str, + answer_schema: str, + gold_answer: dict[str, Any], + *, + parameters: dict[str, Any] | None = None, + truncated: bool = False, + provider_refusal: bool = False, +) -> dict[str, Any]: + """Parse and score one raw model response end to end. + + Returns ``{"parsed": ..., "score": ..., "format_error": ..., "refusal": ...}``. + Malformed, refused and truncated answers score zero and are reported under + their own failure category (section 12). ``provider_refusal`` covers an + explicit terminal API signal even when partial text happens to parse. + + ``format_error`` and ``refusal`` are mutually exclusive. Both score zero, but + they are opposite events: a refusal is a model saying the question cannot be + answered from what it was given, which on a context-only control is the + correct response; a format error is a model failing to say anything the + scorer can read. Counting a refusal under both made a model that declines + to guess look like one that cannot write an answer. + """ + parameters = parameters or {} + parsed = parse_answer(raw_response, answer_schema, parameters) + refusal = provider_refusal or ( + parsed.format_error and looks_like_refusal(raw_response) + ) + result = score_answer(answer_schema, gold_answer, parsed, parameters) + if truncated or provider_refusal: + result = {**result, "score": 0.0, "correct": False} + if truncated: + result["truncated"] = True + return { + "scoring_version": SCORING_VERSION, + "parsed": parsed.as_dict(), + "score": result, + "format_error": bool(parsed.format_error and not refusal), + "refusal": bool(refusal), + "truncated": bool(truncated), + } diff --git a/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py new file mode 100644 index 0000000000000000000000000000000000000000..a75ee7d22a8cd9e97700b510cb070ddfb401b128 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/parse.py @@ -0,0 +1,383 @@ +"""Parsing and canonicalisation of model answers (specification section 7). + +Only the ``FINAL`` field is scored. The parser is deliberately forgiving about +harmless surface variation (whitespace, markdown emphasis, trailing full stops, +case) and deliberately strict about content: an answer that names extra items, +uses the wrong separator or omits the field scores zero and is reported as a +format error. +""" + +from __future__ import annotations + +import re +from dataclasses import dataclass, field +from typing import Any + +# Only horizontal whitespace is allowed around the marker: a class containing +# `\s` would swallow the newline of a bare ``FINAL`` line and mistake the first +# field of a multi-field answer for a single-line answer. +FINAL_PATTERN = re.compile( + r"(?im)^[^\S\n]*[*_`#>]*[^\S\n]*final\b[*_`]*[^\S\n]*(:)?[*_`]*[^\S\n]*(.*)$" +) +FIELD_PATTERN = re.compile(r"^[^\S\n]*[*_`]*([A-Za-z][A-Za-z0-9_ \-]*?)[*_`]*[^\S\n]*:[^\S\n]*(.*)$") +RESIDUE_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z])[\s]*(-?\d+)$") +ATOM_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z])[\s]*(-?\d+)[:\s]+([A-Za-z0-9']{1,4})$") +# Non-greedy component name so ``M:ZN501`` parses as ZN/501 and ``L:L2401`` as +# L/2401 -- either way the parse is deterministic and round-trips the renderer. +ENTITY_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z][A-Za-z0-9]{0,2}?)[\s]*(-?\d+)$") +NUMBER_PATTERN = re.compile(r"[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?") + +PAIR_SEPARATOR = "--" +PATH_SEPARATOR = "->" + +#: A residue left on the marker line that is only a label, e.g. the "Answer:" of +#: "### Final Answer:". Requires the trailing colon, so real one-word answers +#: such as `helix` or `yes` are never mistaken for a label. +LABEL_ONLY = re.compile(r"^[A-Za-z][A-Za-z ]*:$") + +#: Phrases that mark a response as a declared inability to answer rather than a +#: malformed one. The two are different events and are counted separately: a +#: model that says the question cannot be answered from what it was given has +#: understood the task, and one that emits an unparseable answer has not. +#: +#: The second group covers a model declining a context-only control, where "this +#: cannot be determined from the information supplied" is the epistemically +#: correct response and the benchmark should record it as such. +REFUSAL_MARKERS = ( + "i cannot", "i can't", "i am unable", "i'm unable", "cannot answer", + "as an ai", "i do not have access", "i don't have access", "unable to determine", + "insufficient information to answer", + "cannot be determined", "can't be determined", "can not be determined", + "cannot be established", "not determinable", "impossible to determine", + "no coordinates", "not enough information", "insufficient information", +) + + +class AnswerFormatError(ValueError): + """The model output did not contain a parseable FINAL answer.""" + + +@dataclass +class ParsedAnswer: + """Result of parsing one model response.""" + + raw_final: str = "" + fields: dict[str, str] = field(default_factory=dict) + value: Any = None + format_error: bool = False + error: str = "" + + def as_dict(self) -> dict[str, Any]: + return { + "raw_final": self.raw_final, + "fields": self.fields, + "value": self.value, + "format_error": self.format_error, + "error": self.error, + } + + +# --------------------------------------------------------------------------- # +# Locating the FINAL block +# --------------------------------------------------------------------------- # + +def strip_markup(text: str) -> str: + out = text.strip() + out = out.strip("`") + out = re.sub(r"\*\*(.*?)\*\*", r"\1", out) + out = re.sub(r"^[*_`\s]+|[*_`\s]+$", "", out) + out = out.rstrip(".") + return out.strip() + + +def extract_final(text: str) -> tuple[str, dict[str, str]]: + """Return ``(inline_value, fields)`` for the last FINAL block in ``text``. + + A single-line answer yields a non-empty ``inline_value``. A multi-field + answer yields ``fields`` keyed by lowercase field name. + """ + if not text: + raise AnswerFormatError("empty response") + matches = list(FINAL_PATTERN.finditer(text)) + if not matches: + raise AnswerFormatError("no FINAL field found") + match = matches[-1] + inline = strip_markup(match.group(2) or "") + lines = text[match.end():].splitlines() + + # Continuation lines for long single-line lists that wrapped. The split + # leaves an empty first element for the newline itself, so skip it. + if inline and inline.endswith(","): + continuation = list(lines) + while continuation and not continuation[0].strip(): + continuation.pop(0) + for line in continuation: + candidate = strip_markup(line) + if not candidate: + break + inline = f"{inline} {candidate}".strip() + if not inline.endswith(","): + break + + fields: dict[str, str] = {} + if not inline: + for line in lines: + if not line.strip(): + if fields: + break + continue + field_match = FIELD_PATTERN.match(line) + if not field_match: + break + key = field_match.group(1).strip().lower().replace(" ", "_") + if len(key) == 1: + break # `A:V22` is a residue identifier, not a named field + fields[key] = strip_markup(field_match.group(2)) + # A marker followed by nothing usable on its own line: take the next + # non-empty line as the value. Models routinely write "Final answer:" and + # put the value underneath, and the specification's own multi-field layout + # already places answers on the lines after the marker. This does not widen + # what counts as an answer -- text elsewhere in the response is still + # ignored, and a non-answer on that line still fails to canonicalise. + if not fields and (not inline or LABEL_ONLY.match(inline)): + for line in lines: + candidate = strip_markup(line) + if candidate: + inline = candidate + break + + if not inline and not fields: + raise AnswerFormatError("FINAL field is empty") + return inline, fields + + +def looks_like_refusal(text: str) -> bool: + lowered = (text or "").lower() + return any(marker in lowered for marker in REFUSAL_MARKERS) + + +# --------------------------------------------------------------------------- # +# Canonicalisation of individual tokens +# --------------------------------------------------------------------------- # + +def canonical_residue(token: str) -> str: + """``a: v 22`` -> ``A:V22``; raises for anything that is not a residue id. + + Chain identifiers are upper-cased. The dataset builder rejects any rendering + whose chains differ only by case, so this cannot merge distinct chains. + """ + text = strip_markup(token).replace(" ", "") + match = RESIDUE_PATTERN.match(text) + if match: + return f"{match.group(1).upper()}:{match.group(2).upper()}{int(match.group(3))}" + entity = ENTITY_PATTERN.match(text) + if entity: + return f"{entity.group(1).upper()}:{entity.group(2).upper()}{int(entity.group(3))}" + raise AnswerFormatError(f"not a residue identifier: {token!r}") + + +def canonical_atom(token: str) -> str: + text = strip_markup(token).replace(" ", "") + match = ATOM_PATTERN.match(text) + if not match: + raise AnswerFormatError(f"not an atom identifier: {token!r}") + return ( + f"{match.group(1).upper()}:{match.group(2).upper()}{int(match.group(3))}" + f":{match.group(4).upper()}" + ) + + +def canonical_pair(token: str) -> str: + """Unordered residue pair, canonicalised to sorted ``A--B`` form.""" + text = strip_markup(token) + parts = [p for p in re.split(r"--+|\s+--\s+|—|–", text) if p.strip()] + if len(parts) != 2: + raise AnswerFormatError(f"not a residue pair: {token!r}") + a, b = (canonical_residue(parts[0]), canonical_residue(parts[1])) + first, second = sorted((a, b)) + return f"{first}{PAIR_SEPARATOR}{second}" + + +def split_list(text: str) -> list[str]: + """Split a comma or semicolon separated list, tolerating ``and``/newlines.""" + cleaned = strip_markup(text) + if not cleaned or cleaned.lower() in ("none", "no residues", "empty", "n/a", "-"): + return [] + cleaned = re.sub(r"\band\b", ",", cleaned, flags=re.IGNORECASE) + parts = re.split(r"[,;\n]+", cleaned) + return [p.strip() for p in parts if p.strip()] + + +def canonical_residue_set(text: str) -> list[str]: + return sorted({canonical_residue(p) for p in split_list(text)}) + + +def canonical_pair_set(text: str) -> list[str]: + return sorted({canonical_pair(p) for p in split_list(text)}) + + +def canonical_string_set(text: str) -> list[str]: + return sorted({strip_markup(p).upper() for p in split_list(text) if strip_markup(p)}) + + +def canonical_category(text: str, allowed: list[str] | None = None) -> str: + cleaned = re.sub(r"\s+", " ", strip_markup(text)).strip().lower() + if allowed is None: + return cleaned + lookup = {a.lower(): a for a in allowed} + if cleaned in lookup: + return lookup[cleaned] + # Tolerate a model that answers with the option in a longer sentence. + for option in sorted(allowed, key=len, reverse=True): + if re.search(rf"\b{re.escape(option.lower())}\b", cleaned): + return option + raise AnswerFormatError(f"category {text!r} is not one of {allowed}") + + +def canonical_boolean(text: str) -> bool: + cleaned = strip_markup(text).lower() + if cleaned in ("yes", "y", "true", "t"): + return True + if cleaned in ("no", "n", "false", "f"): + return False + raise AnswerFormatError(f"not a boolean: {text!r}") + + +def canonical_choice(text: str, options: list[str] | None = None) -> str: + cleaned = strip_markup(text).upper() + match = re.match(r"^\(?([A-Z])\)?\b", cleaned) + if not match: + raise AnswerFormatError(f"not a multiple-choice letter: {text!r}") + letter = match.group(1) + if options and letter not in [o.upper() for o in options]: + raise AnswerFormatError(f"option {letter!r} is not among {options}") + return letter + + +def canonical_number(text: str) -> float: + cleaned = strip_markup(text).replace("Å", "").replace("angstrom", "").strip() + match = NUMBER_PATTERN.search(cleaned) + if not match: + raise AnswerFormatError(f"no number found in {text!r}") + return float(match.group(0)) + + +def canonical_integer(text: str) -> int: + value = canonical_number(text) + if abs(value - round(value)) > 1e-9: + raise AnswerFormatError(f"not an integer: {text!r}") + return int(round(value)) + + +def canonical_triple(text: str) -> list[float]: + cleaned = strip_markup(text).replace("(", " ").replace(")", " ").replace("[", " ").replace("]", " ") + numbers = NUMBER_PATTERN.findall(cleaned) + if len(numbers) != 3: + raise AnswerFormatError(f"expected three numbers, found {len(numbers)} in {text!r}") + return [float(n) for n in numbers] + + +def canonical_path(text: str) -> list[str]: + cleaned = strip_markup(text) + parts = [p for p in re.split(r"->|→", cleaned) if p.strip()] + if len(parts) < 2: + raise AnswerFormatError(f"not an ordered path: {text!r}") + return [canonical_residue(p) for p in parts] + + +# --------------------------------------------------------------------------- # +# Schema dispatch +# --------------------------------------------------------------------------- # + +def parse_answer(text: str, answer_schema: str, parameters: dict[str, Any] | None = None) -> ParsedAnswer: + """Parse a raw model response into the canonical form for ``answer_schema``.""" + parameters = parameters or {} + try: + inline, fields = extract_final(text) + except AnswerFormatError as exc: + return ParsedAnswer(format_error=True, error=str(exc)) + + parsed = ParsedAnswer(raw_final=inline or _fields_repr(fields), fields=fields) + try: + parsed.value = _dispatch(answer_schema, inline, fields, parameters) + except AnswerFormatError as exc: + parsed.format_error = True + parsed.error = str(exc) + return parsed + + +def _fields_repr(fields: dict[str, str]) -> str: + return "\n".join(f"{k}: {v}" for k, v in fields.items()) + + +def _dispatch( + schema: str, inline: str, fields: dict[str, str], parameters: dict[str, Any] +) -> Any: + if schema == "string_set": + return canonical_string_set(inline) + if schema == "integer": + return canonical_integer(inline) + if schema == "numeric_triple": + return canonical_triple(inline) + if schema == "distance": + return canonical_number(inline) + if schema == "atom": + return canonical_atom(inline) + if schema == "residue": + return canonical_residue(inline) + if schema == "residue_set": + return canonical_residue_set(inline) + if schema == "residue_pair": + return canonical_pair(inline) + if schema == "residue_pair_set": + return canonical_pair_set(inline) + if schema == "category": + return canonical_category(inline, parameters.get("categories")) + if schema == "boolean": + return canonical_boolean(inline) + if schema == "multiple_choice": + return canonical_choice(inline, parameters.get("options")) + if schema == "ordered_path": + return canonical_path(inline) + if schema == "two_interaction_sets": + return _parse_two_sets(inline, fields) + if schema == "multi_field": + return _parse_multi_field(fields, parameters) + raise AnswerFormatError(f"unknown answer schema {schema!r}") + + +def _parse_two_sets(inline: str, fields: dict[str, str]) -> dict[str, list[str]]: + source = dict(fields) + if inline and not source: + # Tolerate "gained: ...; lost: ..." on one line. + for chunk in re.split(r";|\|", inline): + m = FIELD_PATTERN.match(chunk.strip()) + if m: + source[m.group(1).strip().lower()] = m.group(2) + missing = [k for k in ("gained", "lost") if k not in source] + if missing: + raise AnswerFormatError(f"missing required field(s) {missing}") + return { + "gained": canonical_pair_set(source["gained"]), + "lost": canonical_pair_set(source["lost"]), + } + + +def _parse_multi_field(fields: dict[str, str], parameters: dict[str, Any]) -> dict[str, Any]: + spec: dict[str, str] = parameters.get("field_schemas") or {} + if not spec: + raise AnswerFormatError("multi_field answers require a field_schemas parameter") + missing = [name for name in spec if name not in fields] + if missing: + raise AnswerFormatError(f"missing required field(s) {missing}") + out: dict[str, Any] = {} + errors: list[str] = [] + for name, sub_schema in spec.items(): + try: + out[name] = _dispatch(sub_schema, fields[name], {}, parameters.get(name, {})) + except AnswerFormatError as exc: + out[name] = None + errors.append(f"{name}: {exc}") + if errors and len(errors) == len(spec): + raise AnswerFormatError("; ".join(errors)) + return out diff --git a/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py new file mode 100644 index 0000000000000000000000000000000000000000..f541597e6f7d19ecf5993fa7ac5a9b8cea4e2554 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/coordinate_scoring/scorers.py @@ -0,0 +1,173 @@ +"""Deterministic scorers (specification section 12). + +No scorer consults a language model. Every scorer returns a dictionary with a +primary ``score`` in [0, 1] plus the secondary metrics the report needs. +""" + +from __future__ import annotations + +from fractions import Fraction +from math import isfinite +from typing import Any + +from .parse import ParsedAnswer, canonical_pair, canonical_residue + +DEFAULT_DISTANCE_TOLERANCE = 0.02 # A.4 +DEFAULT_COORDINATE_TOLERANCE = 0.001 # section 8, P03 +SCORING_VERSION = "1.1.0" + + +def numeric_error(predicted: float, expected: float) -> Fraction | float: + """Compare parsed decimal values without binary subtraction at the boundary.""" + if not isfinite(predicted): + return float("inf") + return abs(Fraction(str(predicted)) - Fraction(str(expected))) + + +def set_scores(gold: list[str], predicted: list[str]) -> dict[str, Any]: + """Set F1 (primary) and exact-set accuracy (strict secondary).""" + gold_set, pred_set = set(gold), set(predicted) + true_positive = len(gold_set & pred_set) + precision = true_positive / len(pred_set) if pred_set else (1.0 if not gold_set else 0.0) + recall = true_positive / len(gold_set) if gold_set else (1.0 if not pred_set else 0.0) + f1 = 0.0 if (precision + recall) == 0 else 2 * precision * recall / (precision + recall) + if not gold_set and not pred_set: + precision = recall = f1 = 1.0 + return { + "score": f1, + "f1": f1, + "precision": precision, + "recall": recall, + "exact_set": float(gold_set == pred_set), + "correct": bool(gold_set == pred_set), + "n_gold": len(gold_set), + "n_predicted": len(pred_set), + "missing": sorted(gold_set - pred_set), + "spurious": sorted(pred_set - gold_set), + } + + +def score_answer( + answer_schema: str, + gold: dict[str, Any], + parsed: ParsedAnswer, + parameters: dict[str, Any] | None = None, +) -> dict[str, Any]: + """Score one parsed answer against its gold label.""" + parameters = parameters or {} + if parsed.format_error or parsed.value is None: + return { + "score": 0.0, + "correct": False, + "format_error": True, + "error": parsed.error or "unparseable answer", + } + + predicted = parsed.value + if answer_schema in ("residue", "atom", "category", "multiple_choice"): + expected = gold["value"] + correct = str(predicted) == str(expected) + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "boolean": + expected = bool(gold["value"]) + correct = bool(predicted) == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "integer": + expected = int(gold["value"]) + correct = int(predicted) == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "distance": + tolerance = float(parameters.get("tolerance", DEFAULT_DISTANCE_TOLERANCE)) + expected = float(gold["value"]) + error = numeric_error(float(predicted), expected) + correct = error <= Fraction(str(tolerance)) + return { + "score": float(correct), + "correct": correct, + "absolute_error": float(error), + "tolerance": tolerance, + "predicted": predicted, + "gold": expected, + } + + if answer_schema == "numeric_triple": + tolerance = float(parameters.get("tolerance", DEFAULT_COORDINATE_TOLERANCE)) + expected = [float(v) for v in gold["value"]] + errors = [numeric_error(float(p), e) for p, e in zip(predicted, expected)] + within = [e <= Fraction(str(tolerance)) for e in errors] + correct = all(within) + return { + "score": float(correct), + "correct": correct, + "component_errors": [float(e) for e in errors], + "components_within_tolerance": sum(within), + "tolerance": tolerance, + "predicted": predicted, + "gold": expected, + } + + if answer_schema == "residue_pair": + expected = canonical_pair(gold["value"]) + correct = predicted == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema in ("string_set", "residue_set", "residue_pair_set"): + expected = list(gold["value"]) + out = set_scores(expected, list(predicted)) + out.update({"predicted": sorted(predicted), "gold": sorted(expected)}) + return out + + if answer_schema == "ordered_path": + expected = [canonical_residue(v) for v in gold["value"]] + exact = list(predicted) == expected + positions = sum( + 1 for a, b in zip(predicted, expected) if a == b + ) / max(len(expected), 1) + return { + "score": float(exact), + "correct": exact, + "per_position": positions, + "predicted": list(predicted), + "gold": expected, + } + + if answer_schema == "two_interaction_sets": + gained = set_scores(list(gold.get("gained", [])), list(predicted.get("gained", []))) + lost = set_scores(list(gold.get("lost", [])), list(predicted.get("lost", []))) + mean = (gained["score"] + lost["score"]) / 2.0 + return { + "score": mean, + "correct": bool(gained["correct"] and lost["correct"]), + "gained": gained, + "lost": lost, + "exact_set": float(gained["correct"] and lost["correct"]), + } + + if answer_schema == "multi_field": + return _score_multi_field(gold, predicted, parameters) + + raise ValueError(f"no scorer for answer schema {answer_schema!r}") + + +def _score_multi_field( + gold: dict[str, Any], predicted: dict[str, Any], parameters: dict[str, Any] +) -> dict[str, Any]: + fields = gold.get("fields") or {} + per_field: dict[str, Any] = {} + for name, spec in fields.items(): + sub_schema = spec["schema"] + sub_gold = {k: v for k, v in spec.items() if k != "schema"} + value = predicted.get(name) + sub_parsed = ParsedAnswer(value=value, format_error=value is None) + per_field[name] = score_answer( + sub_schema, sub_gold, sub_parsed, parameters.get(name, {}) + ) + scores = [v["score"] for v in per_field.values()] + return { + "score": sum(scores) / len(scores) if scores else 0.0, + "correct": all(v["correct"] for v in per_field.values()) if per_field else False, + "fields": per_field, + } diff --git a/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/gold.json b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/gold.json new file mode 100644 index 0000000000000000000000000000000000000000..cc27c924b6587bf25a14d19c84ed29e839c96f68 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/gold.json @@ -0,0 +1 @@ +{"answer_schema": "category", "definition_version": "v1.0.0", "gold_answer": {"value": "g+"}, "parameters": {"atom4": "CG", "categories": ["g+", "t", "g-"], "residue": "L:F300"}, "reward": "exact_correct", "scoring_version": "1.1.0", "version": "1.1.0"} \ No newline at end of file diff --git a/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/test.sh b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..cdba8796c64e2d36448c41092163144f8da304eb --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh +set -eu +python /tests/verify.py diff --git a/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml new file mode 100644 index 0000000000000000000000000000000000000000..07563b64a6afac2846c2f50ad59df56f79887254 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verifier.toml @@ -0,0 +1,6 @@ +version = "1.1.0" +mode = "pdbthink-coordinate" +scoring_version = "1.1.0" +answer_path = "/app/answer.txt" +contract = "/tests/gold.json" +reward = "exact_correct" diff --git a/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verify.py b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verify.py new file mode 100644 index 0000000000000000000000000000000000000000..c8da25a86cba2b415036d0a6975a7d9dc2c8cf26 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-70c0778d985e571dde37/tests/verify.py @@ -0,0 +1,28 @@ +"""Run only after the model response has been saved by the host harness.""" +import json +import os +from pathlib import Path +from coordinate_scoring import score_response + +def verify(root=Path("/tests"), answer=Path("/app/answer.txt"), output=Path("/logs/verifier")): + output.mkdir(parents=True, exist_ok=True) + (output / "reward.txt").write_text("0\n") + contract = json.loads((root / "gold.json").read_text()) + raw = answer.read_text() if answer.exists() and answer.stat().st_size <= 8000000 else "" + status_path = answer.with_name("answer_status.json") + status = json.loads(status_path.read_text()) if status_path.exists() else {} + outcome = score_response(raw, contract["answer_schema"], contract["gold_answer"], + parameters=contract["parameters"], truncated=status.get("truncated", False), + provider_refusal=status.get("provider_refusal", False)) + tool_violation = bool(status.get("tool_events", [])) + reward = float(outcome["score"].get("correct", False) and not tool_violation) + details = {"reward": reward, "partial_credit": outcome["score"]["score"], + "tool_violation": tool_violation, "outcome": outcome} + (output / "details.json").write_text(json.dumps(details, indent=2)) + (output / "reward.txt").write_text(str(reward) + "\n") + return details + +if __name__ == "__main__": + verify(Path(os.environ.get("PDBTHINK_TEST_ROOT", "/tests")), + Path(os.environ.get("PDBTHINK_ANSWER", "/app/answer.txt")), + Path(os.environ.get("PDBTHINK_REWARD_DIR", "/logs/verifier"))) diff --git a/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/public_task.json b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/public_task.json new file mode 100644 index 0000000000000000000000000000000000000000..ac05a7f7b7649059872865285051fabb74d3e2ad --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/public_task.json @@ -0,0 +1,10 @@ +{ + "task_id": "pdbthink-s09-772d9c283d4255fc0a11", + "instruction": "You will be given one or more molecular structures and a question about them.\nAnswer using only the information supplied in the prompt. Do not use tools or\nexternal resources.\n\nProtein residues are identified as :. For example, A:V22 is valine 22 in chain A. When asked for a\nresidue, use exactly this format. When asked for a list, put the complete residue identifiers in a JSON\narray. Do not include additional residues.\n\nDeliver the answer as exactly one JSON object with op=\"call\",\ntool=\"submit_answer\", and an arguments object containing the required answer.\nYou may put visible working in an optional arguments.reasoning string before\narguments.answer; key order is not graded. Omit reasoning if it is unnecessary,\nand do not repeat work already completed in internal thinking.\nAfter any internal thinking, the reply must contain only the JSON object,\nwithout prose, Markdown fences, or a FINAL: line outside it.\nUse a number for a distance, an array of complete identifiers for a residue\nlist, or the specified label string for a category. Only answer is graded.\nThe first submission ends the episode. This delivery operation provides\nno computational tools or answer revisions.\n\nYou are given one molecular structure.\n\nThe structure is given below in PDB format. Only coordinate records are included; there are no header, annotation, connectivity or secondary-structure records, hydrogens have been removed, and B-factors are zero.\nThe coordinates have been rigidly rotated and translated; distances and angles are unchanged.\n\nStructure:\nATOM 1 N PHE E 8 4.112 0.802 -6.009 1.00 0.00 N\nATOM 2 CA PHE E 8 3.301 0.004 -5.092 1.00 0.00 C\nATOM 3 C PHE E 8 1.959 0.682 -4.790 1.00 0.00 C\nATOM 4 O PHE E 8 1.798 1.299 -3.743 1.00 0.00 O\nATOM 5 CB PHE E 8 4.044 -0.242 -3.775 1.00 0.00 C\nATOM 6 CG PHE E 8 5.419 -0.843 -3.933 1.00 0.00 C\nATOM 7 CD1 PHE E 8 6.498 -0.062 -4.331 1.00 0.00 C\nATOM 8 CD2 PHE E 8 5.644 -2.175 -3.634 1.00 0.00 C\nATOM 9 CE1 PHE E 8 7.772 -0.609 -4.460 1.00 0.00 C\nATOM 10 CE2 PHE E 8 6.910 -2.725 -3.753 1.00 0.00 C\nATOM 11 CZ PHE E 8 7.978 -1.938 -4.167 1.00 0.00 C\nATOM 12 N PRO E 9 0.997 0.574 -5.702 1.00 0.00 N\nATOM 13 CA PRO E 9 -0.290 1.247 -5.486 1.00 0.00 C\nATOM 14 C PRO E 9 -1.077 0.626 -4.344 1.00 0.00 C\nATOM 15 O PRO E 9 -0.968 -0.569 -4.054 1.00 0.00 O\nATOM 16 CB PRO E 9 -1.019 1.060 -6.824 1.00 0.00 C\nATOM 17 CG PRO E 9 0.061 0.785 -7.812 1.00 0.00 C\nATOM 18 CD PRO E 9 1.104 0.015 -7.058 1.00 0.00 C\nATOM 19 N GLN E 10 -1.860 1.480 -3.675 1.00 0.00 N\nATOM 20 CA GLN E 10 -2.833 1.091 -2.655 1.00 0.00 C\nATOM 21 C GLN E 10 -2.252 0.180 -1.573 1.00 0.00 C\nATOM 22 O GLN E 10 -3.001 -0.390 -0.774 1.00 0.00 O\nATOM 23 CB GLN E 10 -4.040 0.417 -3.315 1.00 0.00 C\nATOM 24 N PHE E 11 -0.926 0.050 -1.535 1.00 0.00 N\nATOM 25 CA PHE E 11 -0.224 -0.778 -0.554 1.00 0.00 C\nATOM 26 C PHE E 11 -0.457 -0.287 0.864 1.00 0.00 C\nATOM 27 O PHE E 11 -0.457 -1.060 1.817 1.00 0.00 O\nATOM 28 CB PHE E 11 1.278 -0.789 -0.857 1.00 0.00 C\nATOM 29 CG PHE E 11 2.129 -1.175 0.315 1.00 0.00 C\nATOM 30 CD1 PHE E 11 2.577 -0.212 1.218 1.00 0.00 C\nATOM 31 CD2 PHE E 11 2.494 -2.493 0.511 1.00 0.00 C\nATOM 32 CE1 PHE E 11 3.351 -0.559 2.303 1.00 0.00 C\nATOM 33 CE2 PHE E 11 3.276 -2.850 1.589 1.00 0.00 C\nATOM 34 CZ PHE E 11 3.706 -1.879 2.489 1.00 0.00 C\nATOM 35 N SEP E 12 -0.610 1.022 0.987 1.00 0.00 N\nATOM 36 CA SEP E 12 -0.827 1.686 2.260 1.00 0.00 C\nATOM 37 CB SEP E 12 -0.831 3.200 2.025 1.00 0.00 C\nATOM 38 OG SEP E 12 0.324 3.610 1.285 1.00 0.00 O\nATOM 39 C SEP E 12 -2.151 1.220 2.871 1.00 0.00 C\nATOM 40 O SEP E 12 -3.112 0.968 2.148 1.00 0.00 O\nATOM 41 P SEP E 12 0.114 3.814 -0.321 1.00 0.00 P\nATOM 42 O1P SEP E 12 0.366 2.419 -1.083 1.00 0.00 O\nATOM 43 O2P SEP E 12 1.194 4.877 -0.867 1.00 0.00 O\nATOM 44 O3P SEP E 12 -1.363 4.352 -0.688 1.00 0.00 O\nATOM 45 N TYR E 13 -2.194 1.084 4.194 1.00 0.00 N\nATOM 46 CA TYR E 13 -3.408 0.656 4.898 1.00 0.00 C\nATOM 47 C TYR E 13 -3.291 0.912 6.411 1.00 0.00 C\nATOM 48 O TYR E 13 -2.222 0.764 6.995 1.00 0.00 O\nATOM 49 CB TYR E 13 -3.697 -0.827 4.593 1.00 0.00 C\nATOM 50 CG TYR E 13 -4.029 -1.726 5.777 1.00 0.00 C\nATOM 51 CD1 TYR E 13 -5.287 -1.698 6.382 1.00 0.00 C\nATOM 52 CD2 TYR E 13 -3.097 -2.638 6.256 1.00 0.00 C\nATOM 53 CE1 TYR E 13 -5.584 -2.532 7.452 1.00 0.00 C\nATOM 54 CE2 TYR E 13 -3.386 -3.474 7.318 1.00 0.00 C\nATOM 55 CZ TYR E 13 -4.625 -3.420 7.909 1.00 0.00 C\nATOM 56 OH TYR E 13 -4.891 -4.261 8.966 1.00 0.00 O\nATOM 57 N SER E 14 -4.395 1.316 7.034 1.00 0.00 N\nTER 58 SER E 14\nEND\n\nQuestion: Classify the chi1 side-chain rotamer of residue E:F11. Chi1 is the N-CA-CB-CG dihedral angle, normalised to [-180, 180) degrees. Answer g+ for 0 <= chi1 < 120, t for chi1 >= 120 or chi1 < -120, and g- for -120 <= chi1 < 0.\n\nAnswer with exactly one of the listed categories.\nDelivery example: {\"op\":\"call\",\"tool\":\"submit_answer\",\"arguments\":{\"answer\":\"g+\"}}\n", + "answer_schema": "category", + "categories": [ + "g+", + "t", + "g-" + ] +} diff --git a/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e0495cb114e72c83fe317c202aa1b870049adc3 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/__init__.py @@ -0,0 +1,74 @@ +"""Deterministic answer parsing and scoring.""" + +from __future__ import annotations + +from typing import Any + +from .parse import ( + AnswerFormatError, + ParsedAnswer, + canonical_atom, + canonical_pair, + canonical_residue, + extract_final, + looks_like_refusal, + parse_answer, +) +from .scorers import SCORING_VERSION, score_answer, set_scores + +__all__ = [ + "AnswerFormatError", + "ParsedAnswer", + "canonical_atom", + "canonical_pair", + "canonical_residue", + "extract_final", + "looks_like_refusal", + "parse_answer", + "score_answer", + "score_response", + "set_scores", +] + + +def score_response( + raw_response: str, + answer_schema: str, + gold_answer: dict[str, Any], + *, + parameters: dict[str, Any] | None = None, + truncated: bool = False, + provider_refusal: bool = False, +) -> dict[str, Any]: + """Parse and score one raw model response end to end. + + Returns ``{"parsed": ..., "score": ..., "format_error": ..., "refusal": ...}``. + Malformed, refused and truncated answers score zero and are reported under + their own failure category (section 12). ``provider_refusal`` covers an + explicit terminal API signal even when partial text happens to parse. + + ``format_error`` and ``refusal`` are mutually exclusive. Both score zero, but + they are opposite events: a refusal is a model saying the question cannot be + answered from what it was given, which on a context-only control is the + correct response; a format error is a model failing to say anything the + scorer can read. Counting a refusal under both made a model that declines + to guess look like one that cannot write an answer. + """ + parameters = parameters or {} + parsed = parse_answer(raw_response, answer_schema, parameters) + refusal = provider_refusal or ( + parsed.format_error and looks_like_refusal(raw_response) + ) + result = score_answer(answer_schema, gold_answer, parsed, parameters) + if truncated or provider_refusal: + result = {**result, "score": 0.0, "correct": False} + if truncated: + result["truncated"] = True + return { + "scoring_version": SCORING_VERSION, + "parsed": parsed.as_dict(), + "score": result, + "format_error": bool(parsed.format_error and not refusal), + "refusal": bool(refusal), + "truncated": bool(truncated), + } diff --git a/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py new file mode 100644 index 0000000000000000000000000000000000000000..a75ee7d22a8cd9e97700b510cb070ddfb401b128 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/parse.py @@ -0,0 +1,383 @@ +"""Parsing and canonicalisation of model answers (specification section 7). + +Only the ``FINAL`` field is scored. The parser is deliberately forgiving about +harmless surface variation (whitespace, markdown emphasis, trailing full stops, +case) and deliberately strict about content: an answer that names extra items, +uses the wrong separator or omits the field scores zero and is reported as a +format error. +""" + +from __future__ import annotations + +import re +from dataclasses import dataclass, field +from typing import Any + +# Only horizontal whitespace is allowed around the marker: a class containing +# `\s` would swallow the newline of a bare ``FINAL`` line and mistake the first +# field of a multi-field answer for a single-line answer. +FINAL_PATTERN = re.compile( + r"(?im)^[^\S\n]*[*_`#>]*[^\S\n]*final\b[*_`]*[^\S\n]*(:)?[*_`]*[^\S\n]*(.*)$" +) +FIELD_PATTERN = re.compile(r"^[^\S\n]*[*_`]*([A-Za-z][A-Za-z0-9_ \-]*?)[*_`]*[^\S\n]*:[^\S\n]*(.*)$") +RESIDUE_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z])[\s]*(-?\d+)$") +ATOM_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z])[\s]*(-?\d+)[:\s]+([A-Za-z0-9']{1,4})$") +# Non-greedy component name so ``M:ZN501`` parses as ZN/501 and ``L:L2401`` as +# L/2401 -- either way the parse is deterministic and round-trips the renderer. +ENTITY_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z][A-Za-z0-9]{0,2}?)[\s]*(-?\d+)$") +NUMBER_PATTERN = re.compile(r"[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?") + +PAIR_SEPARATOR = "--" +PATH_SEPARATOR = "->" + +#: A residue left on the marker line that is only a label, e.g. the "Answer:" of +#: "### Final Answer:". Requires the trailing colon, so real one-word answers +#: such as `helix` or `yes` are never mistaken for a label. +LABEL_ONLY = re.compile(r"^[A-Za-z][A-Za-z ]*:$") + +#: Phrases that mark a response as a declared inability to answer rather than a +#: malformed one. The two are different events and are counted separately: a +#: model that says the question cannot be answered from what it was given has +#: understood the task, and one that emits an unparseable answer has not. +#: +#: The second group covers a model declining a context-only control, where "this +#: cannot be determined from the information supplied" is the epistemically +#: correct response and the benchmark should record it as such. +REFUSAL_MARKERS = ( + "i cannot", "i can't", "i am unable", "i'm unable", "cannot answer", + "as an ai", "i do not have access", "i don't have access", "unable to determine", + "insufficient information to answer", + "cannot be determined", "can't be determined", "can not be determined", + "cannot be established", "not determinable", "impossible to determine", + "no coordinates", "not enough information", "insufficient information", +) + + +class AnswerFormatError(ValueError): + """The model output did not contain a parseable FINAL answer.""" + + +@dataclass +class ParsedAnswer: + """Result of parsing one model response.""" + + raw_final: str = "" + fields: dict[str, str] = field(default_factory=dict) + value: Any = None + format_error: bool = False + error: str = "" + + def as_dict(self) -> dict[str, Any]: + return { + "raw_final": self.raw_final, + "fields": self.fields, + "value": self.value, + "format_error": self.format_error, + "error": self.error, + } + + +# --------------------------------------------------------------------------- # +# Locating the FINAL block +# --------------------------------------------------------------------------- # + +def strip_markup(text: str) -> str: + out = text.strip() + out = out.strip("`") + out = re.sub(r"\*\*(.*?)\*\*", r"\1", out) + out = re.sub(r"^[*_`\s]+|[*_`\s]+$", "", out) + out = out.rstrip(".") + return out.strip() + + +def extract_final(text: str) -> tuple[str, dict[str, str]]: + """Return ``(inline_value, fields)`` for the last FINAL block in ``text``. + + A single-line answer yields a non-empty ``inline_value``. A multi-field + answer yields ``fields`` keyed by lowercase field name. + """ + if not text: + raise AnswerFormatError("empty response") + matches = list(FINAL_PATTERN.finditer(text)) + if not matches: + raise AnswerFormatError("no FINAL field found") + match = matches[-1] + inline = strip_markup(match.group(2) or "") + lines = text[match.end():].splitlines() + + # Continuation lines for long single-line lists that wrapped. The split + # leaves an empty first element for the newline itself, so skip it. + if inline and inline.endswith(","): + continuation = list(lines) + while continuation and not continuation[0].strip(): + continuation.pop(0) + for line in continuation: + candidate = strip_markup(line) + if not candidate: + break + inline = f"{inline} {candidate}".strip() + if not inline.endswith(","): + break + + fields: dict[str, str] = {} + if not inline: + for line in lines: + if not line.strip(): + if fields: + break + continue + field_match = FIELD_PATTERN.match(line) + if not field_match: + break + key = field_match.group(1).strip().lower().replace(" ", "_") + if len(key) == 1: + break # `A:V22` is a residue identifier, not a named field + fields[key] = strip_markup(field_match.group(2)) + # A marker followed by nothing usable on its own line: take the next + # non-empty line as the value. Models routinely write "Final answer:" and + # put the value underneath, and the specification's own multi-field layout + # already places answers on the lines after the marker. This does not widen + # what counts as an answer -- text elsewhere in the response is still + # ignored, and a non-answer on that line still fails to canonicalise. + if not fields and (not inline or LABEL_ONLY.match(inline)): + for line in lines: + candidate = strip_markup(line) + if candidate: + inline = candidate + break + + if not inline and not fields: + raise AnswerFormatError("FINAL field is empty") + return inline, fields + + +def looks_like_refusal(text: str) -> bool: + lowered = (text or "").lower() + return any(marker in lowered for marker in REFUSAL_MARKERS) + + +# --------------------------------------------------------------------------- # +# Canonicalisation of individual tokens +# --------------------------------------------------------------------------- # + +def canonical_residue(token: str) -> str: + """``a: v 22`` -> ``A:V22``; raises for anything that is not a residue id. + + Chain identifiers are upper-cased. The dataset builder rejects any rendering + whose chains differ only by case, so this cannot merge distinct chains. + """ + text = strip_markup(token).replace(" ", "") + match = RESIDUE_PATTERN.match(text) + if match: + return f"{match.group(1).upper()}:{match.group(2).upper()}{int(match.group(3))}" + entity = ENTITY_PATTERN.match(text) + if entity: + return f"{entity.group(1).upper()}:{entity.group(2).upper()}{int(entity.group(3))}" + raise AnswerFormatError(f"not a residue identifier: {token!r}") + + +def canonical_atom(token: str) -> str: + text = strip_markup(token).replace(" ", "") + match = ATOM_PATTERN.match(text) + if not match: + raise AnswerFormatError(f"not an atom identifier: {token!r}") + return ( + f"{match.group(1).upper()}:{match.group(2).upper()}{int(match.group(3))}" + f":{match.group(4).upper()}" + ) + + +def canonical_pair(token: str) -> str: + """Unordered residue pair, canonicalised to sorted ``A--B`` form.""" + text = strip_markup(token) + parts = [p for p in re.split(r"--+|\s+--\s+|—|–", text) if p.strip()] + if len(parts) != 2: + raise AnswerFormatError(f"not a residue pair: {token!r}") + a, b = (canonical_residue(parts[0]), canonical_residue(parts[1])) + first, second = sorted((a, b)) + return f"{first}{PAIR_SEPARATOR}{second}" + + +def split_list(text: str) -> list[str]: + """Split a comma or semicolon separated list, tolerating ``and``/newlines.""" + cleaned = strip_markup(text) + if not cleaned or cleaned.lower() in ("none", "no residues", "empty", "n/a", "-"): + return [] + cleaned = re.sub(r"\band\b", ",", cleaned, flags=re.IGNORECASE) + parts = re.split(r"[,;\n]+", cleaned) + return [p.strip() for p in parts if p.strip()] + + +def canonical_residue_set(text: str) -> list[str]: + return sorted({canonical_residue(p) for p in split_list(text)}) + + +def canonical_pair_set(text: str) -> list[str]: + return sorted({canonical_pair(p) for p in split_list(text)}) + + +def canonical_string_set(text: str) -> list[str]: + return sorted({strip_markup(p).upper() for p in split_list(text) if strip_markup(p)}) + + +def canonical_category(text: str, allowed: list[str] | None = None) -> str: + cleaned = re.sub(r"\s+", " ", strip_markup(text)).strip().lower() + if allowed is None: + return cleaned + lookup = {a.lower(): a for a in allowed} + if cleaned in lookup: + return lookup[cleaned] + # Tolerate a model that answers with the option in a longer sentence. + for option in sorted(allowed, key=len, reverse=True): + if re.search(rf"\b{re.escape(option.lower())}\b", cleaned): + return option + raise AnswerFormatError(f"category {text!r} is not one of {allowed}") + + +def canonical_boolean(text: str) -> bool: + cleaned = strip_markup(text).lower() + if cleaned in ("yes", "y", "true", "t"): + return True + if cleaned in ("no", "n", "false", "f"): + return False + raise AnswerFormatError(f"not a boolean: {text!r}") + + +def canonical_choice(text: str, options: list[str] | None = None) -> str: + cleaned = strip_markup(text).upper() + match = re.match(r"^\(?([A-Z])\)?\b", cleaned) + if not match: + raise AnswerFormatError(f"not a multiple-choice letter: {text!r}") + letter = match.group(1) + if options and letter not in [o.upper() for o in options]: + raise AnswerFormatError(f"option {letter!r} is not among {options}") + return letter + + +def canonical_number(text: str) -> float: + cleaned = strip_markup(text).replace("Å", "").replace("angstrom", "").strip() + match = NUMBER_PATTERN.search(cleaned) + if not match: + raise AnswerFormatError(f"no number found in {text!r}") + return float(match.group(0)) + + +def canonical_integer(text: str) -> int: + value = canonical_number(text) + if abs(value - round(value)) > 1e-9: + raise AnswerFormatError(f"not an integer: {text!r}") + return int(round(value)) + + +def canonical_triple(text: str) -> list[float]: + cleaned = strip_markup(text).replace("(", " ").replace(")", " ").replace("[", " ").replace("]", " ") + numbers = NUMBER_PATTERN.findall(cleaned) + if len(numbers) != 3: + raise AnswerFormatError(f"expected three numbers, found {len(numbers)} in {text!r}") + return [float(n) for n in numbers] + + +def canonical_path(text: str) -> list[str]: + cleaned = strip_markup(text) + parts = [p for p in re.split(r"->|→", cleaned) if p.strip()] + if len(parts) < 2: + raise AnswerFormatError(f"not an ordered path: {text!r}") + return [canonical_residue(p) for p in parts] + + +# --------------------------------------------------------------------------- # +# Schema dispatch +# --------------------------------------------------------------------------- # + +def parse_answer(text: str, answer_schema: str, parameters: dict[str, Any] | None = None) -> ParsedAnswer: + """Parse a raw model response into the canonical form for ``answer_schema``.""" + parameters = parameters or {} + try: + inline, fields = extract_final(text) + except AnswerFormatError as exc: + return ParsedAnswer(format_error=True, error=str(exc)) + + parsed = ParsedAnswer(raw_final=inline or _fields_repr(fields), fields=fields) + try: + parsed.value = _dispatch(answer_schema, inline, fields, parameters) + except AnswerFormatError as exc: + parsed.format_error = True + parsed.error = str(exc) + return parsed + + +def _fields_repr(fields: dict[str, str]) -> str: + return "\n".join(f"{k}: {v}" for k, v in fields.items()) + + +def _dispatch( + schema: str, inline: str, fields: dict[str, str], parameters: dict[str, Any] +) -> Any: + if schema == "string_set": + return canonical_string_set(inline) + if schema == "integer": + return canonical_integer(inline) + if schema == "numeric_triple": + return canonical_triple(inline) + if schema == "distance": + return canonical_number(inline) + if schema == "atom": + return canonical_atom(inline) + if schema == "residue": + return canonical_residue(inline) + if schema == "residue_set": + return canonical_residue_set(inline) + if schema == "residue_pair": + return canonical_pair(inline) + if schema == "residue_pair_set": + return canonical_pair_set(inline) + if schema == "category": + return canonical_category(inline, parameters.get("categories")) + if schema == "boolean": + return canonical_boolean(inline) + if schema == "multiple_choice": + return canonical_choice(inline, parameters.get("options")) + if schema == "ordered_path": + return canonical_path(inline) + if schema == "two_interaction_sets": + return _parse_two_sets(inline, fields) + if schema == "multi_field": + return _parse_multi_field(fields, parameters) + raise AnswerFormatError(f"unknown answer schema {schema!r}") + + +def _parse_two_sets(inline: str, fields: dict[str, str]) -> dict[str, list[str]]: + source = dict(fields) + if inline and not source: + # Tolerate "gained: ...; lost: ..." on one line. + for chunk in re.split(r";|\|", inline): + m = FIELD_PATTERN.match(chunk.strip()) + if m: + source[m.group(1).strip().lower()] = m.group(2) + missing = [k for k in ("gained", "lost") if k not in source] + if missing: + raise AnswerFormatError(f"missing required field(s) {missing}") + return { + "gained": canonical_pair_set(source["gained"]), + "lost": canonical_pair_set(source["lost"]), + } + + +def _parse_multi_field(fields: dict[str, str], parameters: dict[str, Any]) -> dict[str, Any]: + spec: dict[str, str] = parameters.get("field_schemas") or {} + if not spec: + raise AnswerFormatError("multi_field answers require a field_schemas parameter") + missing = [name for name in spec if name not in fields] + if missing: + raise AnswerFormatError(f"missing required field(s) {missing}") + out: dict[str, Any] = {} + errors: list[str] = [] + for name, sub_schema in spec.items(): + try: + out[name] = _dispatch(sub_schema, fields[name], {}, parameters.get(name, {})) + except AnswerFormatError as exc: + out[name] = None + errors.append(f"{name}: {exc}") + if errors and len(errors) == len(spec): + raise AnswerFormatError("; ".join(errors)) + return out diff --git a/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py new file mode 100644 index 0000000000000000000000000000000000000000..f541597e6f7d19ecf5993fa7ac5a9b8cea4e2554 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/coordinate_scoring/scorers.py @@ -0,0 +1,173 @@ +"""Deterministic scorers (specification section 12). + +No scorer consults a language model. Every scorer returns a dictionary with a +primary ``score`` in [0, 1] plus the secondary metrics the report needs. +""" + +from __future__ import annotations + +from fractions import Fraction +from math import isfinite +from typing import Any + +from .parse import ParsedAnswer, canonical_pair, canonical_residue + +DEFAULT_DISTANCE_TOLERANCE = 0.02 # A.4 +DEFAULT_COORDINATE_TOLERANCE = 0.001 # section 8, P03 +SCORING_VERSION = "1.1.0" + + +def numeric_error(predicted: float, expected: float) -> Fraction | float: + """Compare parsed decimal values without binary subtraction at the boundary.""" + if not isfinite(predicted): + return float("inf") + return abs(Fraction(str(predicted)) - Fraction(str(expected))) + + +def set_scores(gold: list[str], predicted: list[str]) -> dict[str, Any]: + """Set F1 (primary) and exact-set accuracy (strict secondary).""" + gold_set, pred_set = set(gold), set(predicted) + true_positive = len(gold_set & pred_set) + precision = true_positive / len(pred_set) if pred_set else (1.0 if not gold_set else 0.0) + recall = true_positive / len(gold_set) if gold_set else (1.0 if not pred_set else 0.0) + f1 = 0.0 if (precision + recall) == 0 else 2 * precision * recall / (precision + recall) + if not gold_set and not pred_set: + precision = recall = f1 = 1.0 + return { + "score": f1, + "f1": f1, + "precision": precision, + "recall": recall, + "exact_set": float(gold_set == pred_set), + "correct": bool(gold_set == pred_set), + "n_gold": len(gold_set), + "n_predicted": len(pred_set), + "missing": sorted(gold_set - pred_set), + "spurious": sorted(pred_set - gold_set), + } + + +def score_answer( + answer_schema: str, + gold: dict[str, Any], + parsed: ParsedAnswer, + parameters: dict[str, Any] | None = None, +) -> dict[str, Any]: + """Score one parsed answer against its gold label.""" + parameters = parameters or {} + if parsed.format_error or parsed.value is None: + return { + "score": 0.0, + "correct": False, + "format_error": True, + "error": parsed.error or "unparseable answer", + } + + predicted = parsed.value + if answer_schema in ("residue", "atom", "category", "multiple_choice"): + expected = gold["value"] + correct = str(predicted) == str(expected) + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "boolean": + expected = bool(gold["value"]) + correct = bool(predicted) == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "integer": + expected = int(gold["value"]) + correct = int(predicted) == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "distance": + tolerance = float(parameters.get("tolerance", DEFAULT_DISTANCE_TOLERANCE)) + expected = float(gold["value"]) + error = numeric_error(float(predicted), expected) + correct = error <= Fraction(str(tolerance)) + return { + "score": float(correct), + "correct": correct, + "absolute_error": float(error), + "tolerance": tolerance, + "predicted": predicted, + "gold": expected, + } + + if answer_schema == "numeric_triple": + tolerance = float(parameters.get("tolerance", DEFAULT_COORDINATE_TOLERANCE)) + expected = [float(v) for v in gold["value"]] + errors = [numeric_error(float(p), e) for p, e in zip(predicted, expected)] + within = [e <= Fraction(str(tolerance)) for e in errors] + correct = all(within) + return { + "score": float(correct), + "correct": correct, + "component_errors": [float(e) for e in errors], + "components_within_tolerance": sum(within), + "tolerance": tolerance, + "predicted": predicted, + "gold": expected, + } + + if answer_schema == "residue_pair": + expected = canonical_pair(gold["value"]) + correct = predicted == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema in ("string_set", "residue_set", "residue_pair_set"): + expected = list(gold["value"]) + out = set_scores(expected, list(predicted)) + out.update({"predicted": sorted(predicted), "gold": sorted(expected)}) + return out + + if answer_schema == "ordered_path": + expected = [canonical_residue(v) for v in gold["value"]] + exact = list(predicted) == expected + positions = sum( + 1 for a, b in zip(predicted, expected) if a == b + ) / max(len(expected), 1) + return { + "score": float(exact), + "correct": exact, + "per_position": positions, + "predicted": list(predicted), + "gold": expected, + } + + if answer_schema == "two_interaction_sets": + gained = set_scores(list(gold.get("gained", [])), list(predicted.get("gained", []))) + lost = set_scores(list(gold.get("lost", [])), list(predicted.get("lost", []))) + mean = (gained["score"] + lost["score"]) / 2.0 + return { + "score": mean, + "correct": bool(gained["correct"] and lost["correct"]), + "gained": gained, + "lost": lost, + "exact_set": float(gained["correct"] and lost["correct"]), + } + + if answer_schema == "multi_field": + return _score_multi_field(gold, predicted, parameters) + + raise ValueError(f"no scorer for answer schema {answer_schema!r}") + + +def _score_multi_field( + gold: dict[str, Any], predicted: dict[str, Any], parameters: dict[str, Any] +) -> dict[str, Any]: + fields = gold.get("fields") or {} + per_field: dict[str, Any] = {} + for name, spec in fields.items(): + sub_schema = spec["schema"] + sub_gold = {k: v for k, v in spec.items() if k != "schema"} + value = predicted.get(name) + sub_parsed = ParsedAnswer(value=value, format_error=value is None) + per_field[name] = score_answer( + sub_schema, sub_gold, sub_parsed, parameters.get(name, {}) + ) + scores = [v["score"] for v in per_field.values()] + return { + "score": sum(scores) / len(scores) if scores else 0.0, + "correct": all(v["correct"] for v in per_field.values()) if per_field else False, + "fields": per_field, + } diff --git a/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json new file mode 100644 index 0000000000000000000000000000000000000000..fb9fadb8b80969409bab36038fd33528349d306c --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/gold.json @@ -0,0 +1 @@ +{"answer_schema": "category", "definition_version": "v1.0.0", "gold_answer": {"value": "t"}, "parameters": {"atom4": "CG", "categories": ["g+", "t", "g-"], "residue": "E:F11"}, "reward": "exact_correct", "scoring_version": "1.1.0", "version": "1.1.0"} \ No newline at end of file diff --git a/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..cdba8796c64e2d36448c41092163144f8da304eb --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh +set -eu +python /tests/verify.py diff --git a/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml new file mode 100644 index 0000000000000000000000000000000000000000..07563b64a6afac2846c2f50ad59df56f79887254 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verifier.toml @@ -0,0 +1,6 @@ +version = "1.1.0" +mode = "pdbthink-coordinate" +scoring_version = "1.1.0" +answer_path = "/app/answer.txt" +contract = "/tests/gold.json" +reward = "exact_correct" diff --git a/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py new file mode 100644 index 0000000000000000000000000000000000000000..c8da25a86cba2b415036d0a6975a7d9dc2c8cf26 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-772d9c283d4255fc0a11/tests/verify.py @@ -0,0 +1,28 @@ +"""Run only after the model response has been saved by the host harness.""" +import json +import os +from pathlib import Path +from coordinate_scoring import score_response + +def verify(root=Path("/tests"), answer=Path("/app/answer.txt"), output=Path("/logs/verifier")): + output.mkdir(parents=True, exist_ok=True) + (output / "reward.txt").write_text("0\n") + contract = json.loads((root / "gold.json").read_text()) + raw = answer.read_text() if answer.exists() and answer.stat().st_size <= 8000000 else "" + status_path = answer.with_name("answer_status.json") + status = json.loads(status_path.read_text()) if status_path.exists() else {} + outcome = score_response(raw, contract["answer_schema"], contract["gold_answer"], + parameters=contract["parameters"], truncated=status.get("truncated", False), + provider_refusal=status.get("provider_refusal", False)) + tool_violation = bool(status.get("tool_events", [])) + reward = float(outcome["score"].get("correct", False) and not tool_violation) + details = {"reward": reward, "partial_credit": outcome["score"]["score"], + "tool_violation": tool_violation, "outcome": outcome} + (output / "details.json").write_text(json.dumps(details, indent=2)) + (output / "reward.txt").write_text(str(reward) + "\n") + return details + +if __name__ == "__main__": + verify(Path(os.environ.get("PDBTHINK_TEST_ROOT", "/tests")), + Path(os.environ.get("PDBTHINK_ANSWER", "/app/answer.txt")), + Path(os.environ.get("PDBTHINK_REWARD_DIR", "/logs/verifier"))) diff --git a/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/public_task.json b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/public_task.json new file mode 100644 index 0000000000000000000000000000000000000000..e186642ba1267069e12f7ed17ad34d72c4bcb13b --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/public_task.json @@ -0,0 +1,10 @@ +{ + "task_id": "pdbthink-s09-7ba4aa076b6bb5633953", + "instruction": "You will be given one or more molecular structures and a question about them.\nAnswer using only the information supplied in the prompt. Do not use tools or\nexternal resources.\n\nProtein residues are identified as :. For example, A:V22 is valine 22 in chain A. When asked for a\nresidue, use exactly this format. When asked for a list, put the complete residue identifiers in a JSON\narray. Do not include additional residues.\n\nDeliver the answer as exactly one JSON object with op=\"call\",\ntool=\"submit_answer\", and an arguments object containing the required answer.\nYou may put visible working in an optional arguments.reasoning string before\narguments.answer; key order is not graded. Omit reasoning if it is unnecessary,\nand do not repeat work already completed in internal thinking.\nAfter any internal thinking, the reply must contain only the JSON object,\nwithout prose, Markdown fences, or a FINAL: line outside it.\nUse a number for a distance, an array of complete identifiers for a residue\nlist, or the specified label string for a category. Only answer is graded.\nThe first submission ends the episode. This delivery operation provides\nno computational tools or answer revisions.\n\nYou are given one molecular structure.\n\nThe structure is given below in PDB format. Only coordinate records are included; there are no header, annotation, connectivity or secondary-structure records, hydrogens have been removed, and B-factors are zero.\nThe coordinates have been rigidly rotated and translated; distances and angles are unchanged.\n\nStructure:\nATOM 1 N GLU B 482 -11.015 5.737 -3.681 1.00 0.00 N\nATOM 2 CA GLU B 482 -10.112 6.819 -3.302 1.00 0.00 C\nATOM 3 C GLU B 482 -8.676 6.522 -3.712 1.00 0.00 C\nATOM 4 O GLU B 482 -8.415 5.604 -4.492 1.00 0.00 O\nATOM 5 CB GLU B 482 -10.172 7.065 -1.794 1.00 0.00 C\nATOM 6 CG GLU B 482 -11.534 7.482 -1.277 1.00 0.00 C\nATOM 7 CD GLU B 482 -11.484 7.942 0.167 1.00 0.00 C\nATOM 8 OE1 GLU B 482 -10.473 7.657 0.848 1.00 0.00 O\nATOM 9 OE2 GLU B 482 -12.453 8.593 0.618 1.00 0.00 O\nATOM 10 N GLU B 483 -7.747 7.311 -3.181 1.00 0.00 N\nATOM 11 CA GLU B 483 -6.329 7.040 -3.361 1.00 0.00 C\nATOM 12 C GLU B 483 -5.775 6.378 -2.107 1.00 0.00 C\nATOM 13 O GLU B 483 -5.752 6.971 -1.022 1.00 0.00 O\nATOM 14 CB GLU B 483 -5.555 8.319 -3.676 1.00 0.00 C\nATOM 15 CG GLU B 483 -4.112 8.068 -4.079 1.00 0.00 C\nATOM 16 CD GLU B 483 -3.996 7.239 -5.347 1.00 0.00 C\nATOM 17 OE1 GLU B 483 -3.520 6.083 -5.264 1.00 0.00 O\nATOM 18 OE2 GLU B 483 -4.379 7.745 -6.426 1.00 0.00 O\nATOM 19 N PHE B 484 -5.343 5.135 -2.260 1.00 0.00 N\nATOM 20 CA PHE B 484 -4.799 4.376 -1.148 1.00 0.00 C\nATOM 21 C PHE B 484 -3.332 4.072 -1.363 1.00 0.00 C\nATOM 22 O PHE B 484 -2.960 3.445 -2.349 1.00 0.00 O\nATOM 23 CB PHE B 484 -5.578 3.077 -0.953 1.00 0.00 C\nATOM 24 CG PHE B 484 -7.033 3.293 -0.684 1.00 0.00 C\nATOM 25 CD1 PHE B 484 -7.456 3.741 0.561 1.00 0.00 C\nATOM 26 CD2 PHE B 484 -7.978 3.084 -1.677 1.00 0.00 C\nATOM 27 CE1 PHE B 484 -8.801 3.956 0.817 1.00 0.00 C\nATOM 28 CE2 PHE B 484 -9.328 3.300 -1.429 1.00 0.00 C\nATOM 29 CZ PHE B 484 -9.739 3.734 -0.180 1.00 0.00 C\nATOM 30 N GLU B 485 -2.505 4.527 -0.434 1.00 0.00 N\nATOM 31 CA GLU B 485 -1.085 4.249 -0.489 1.00 0.00 C\nATOM 32 C GLU B 485 -0.786 3.106 0.466 1.00 0.00 C\nATOM 33 O GLU B 485 -0.545 3.326 1.654 1.00 0.00 O\nATOM 34 CB GLU B 485 -0.269 5.489 -0.132 1.00 0.00 C\nATOM 35 CG GLU B 485 -0.581 6.703 -0.989 1.00 0.00 C\nATOM 36 CD GLU B 485 0.455 7.799 -0.845 1.00 0.00 C\nATOM 37 OE1 GLU B 485 1.548 7.515 -0.312 1.00 0.00 O\nATOM 38 OE2 GLU B 485 0.174 8.942 -1.266 1.00 0.00 O\nATOM 39 N LEU B 486 -0.819 1.882 -0.046 1.00 0.00 N\nATOM 40 CA LEU B 486 -0.627 0.725 0.817 1.00 0.00 C\nATOM 41 C LEU B 486 0.840 0.573 1.188 1.00 0.00 C\nATOM 42 O LEU B 486 1.734 0.793 0.363 1.00 0.00 O\nATOM 43 CB LEU B 486 -1.147 -0.549 0.150 1.00 0.00 C\nATOM 44 CG LEU B 486 -2.592 -0.494 -0.351 1.00 0.00 C\nATOM 45 CD1 LEU B 486 -3.034 -1.846 -0.871 1.00 0.00 C\nATOM 46 CD2 LEU B 486 -3.546 -0.009 0.757 1.00 0.00 C\nATOM 47 N LEU B 487 1.076 0.201 2.441 1.00 0.00 N\nATOM 48 CA LEU B 487 2.417 0.020 2.964 1.00 0.00 C\nATOM 49 C LEU B 487 2.593 -1.453 3.285 1.00 0.00 C\nATOM 50 O LEU B 487 2.361 -1.898 4.408 1.00 0.00 O\nATOM 51 CB LEU B 487 2.645 0.885 4.197 1.00 0.00 C\nATOM 52 CG LEU B 487 2.381 2.376 3.978 1.00 0.00 C\nATOM 53 CD1 LEU B 487 2.501 3.145 5.286 1.00 0.00 C\nATOM 54 CD2 LEU B 487 3.332 2.935 2.934 1.00 0.00 C\nATOM 55 N ILE B 488 2.974 -2.196 2.258 1.00 0.00 N\nATOM 56 CA ILE B 488 3.053 -3.641 2.303 1.00 0.00 C\nATOM 57 C ILE B 488 4.380 -4.028 1.683 1.00 0.00 C\nATOM 58 O ILE B 488 4.646 -3.679 0.536 1.00 0.00 O\nATOM 59 CB ILE B 488 1.889 -4.293 1.531 1.00 0.00 C\nATOM 60 CG1 ILE B 488 0.551 -3.936 2.190 1.00 0.00 C\nATOM 61 CG2 ILE B 488 2.072 -5.804 1.441 1.00 0.00 C\nATOM 62 CD1 ILE B 488 -0.653 -4.277 1.325 1.00 0.00 C\nATOM 63 N SEP B 489 5.227 -4.719 2.434 1.00 0.00 N\nATOM 64 CA SEP B 489 6.527 -5.113 1.887 1.00 0.00 C\nATOM 65 CB SEP B 489 7.503 -5.398 3.017 1.00 0.00 C\nATOM 66 OG SEP B 489 6.940 -6.405 3.816 1.00 0.00 O\nATOM 67 C SEP B 489 6.415 -6.360 1.009 1.00 0.00 C\nATOM 68 O SEP B 489 5.361 -6.991 0.942 1.00 0.00 O\nATOM 69 P SEP B 489 8.038 -7.289 4.557 1.00 0.00 P\nATOM 70 O1P SEP B 489 9.234 -7.617 3.531 1.00 0.00 O\nATOM 71 O2P SEP B 489 7.337 -8.665 4.988 1.00 0.00 O\nATOM 72 O3P SEP B 489 8.643 -6.479 5.796 1.00 0.00 O\nATOM 73 N ASN B 490 7.513 -6.718 0.350 1.00 0.00 N\nATOM 74 CA ASN B 490 7.547 -7.901 -0.513 1.00 0.00 C\nATOM 75 C ASN B 490 7.997 -9.176 0.194 1.00 0.00 C\nATOM 76 O ASN B 490 8.071 -9.231 1.420 1.00 0.00 O\nATOM 77 CB ASN B 490 8.457 -7.654 -1.715 1.00 0.00 C\nATOM 78 CG ASN B 490 7.733 -6.991 -2.861 1.00 0.00 C\nATOM 79 OD1 ASN B 490 6.726 -6.311 -2.662 1.00 0.00 O\nATOM 80 ND2 ASN B 490 8.235 -7.191 -4.074 1.00 0.00 N\nATOM 81 N SER B 491 8.291 -10.201 -0.597 1.00 0.00 N\nATOM 82 CA SER B 491 8.723 -11.489 -0.068 1.00 0.00 C\nATOM 83 C SER B 491 10.244 -11.587 -0.037 1.00 0.00 C\nATOM 84 O SER B 491 10.941 -10.868 -0.755 1.00 0.00 O\nATOM 85 CB SER B 491 8.136 -12.633 -0.900 1.00 0.00 C\nATOM 86 OG SER B 491 8.574 -13.894 -0.426 1.00 0.00 O\nTER 87 SER B 491\nEND\n\nQuestion: Classify the chi1 side-chain rotamer of residue B:F484. Chi1 is the N-CA-CB-CG dihedral angle, normalised to [-180, 180) degrees. Answer g+ for 0 <= chi1 < 120, t for chi1 >= 120 or chi1 < -120, and g- for -120 <= chi1 < 0.\n\nAnswer with exactly one of the listed categories.\nDelivery example: {\"op\":\"call\",\"tool\":\"submit_answer\",\"arguments\":{\"answer\":\"g+\"}}\n", + "answer_schema": "category", + "categories": [ + "g+", + "t", + "g-" + ] +} diff --git a/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..5e0495cb114e72c83fe317c202aa1b870049adc3 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/__init__.py @@ -0,0 +1,74 @@ +"""Deterministic answer parsing and scoring.""" + +from __future__ import annotations + +from typing import Any + +from .parse import ( + AnswerFormatError, + ParsedAnswer, + canonical_atom, + canonical_pair, + canonical_residue, + extract_final, + looks_like_refusal, + parse_answer, +) +from .scorers import SCORING_VERSION, score_answer, set_scores + +__all__ = [ + "AnswerFormatError", + "ParsedAnswer", + "canonical_atom", + "canonical_pair", + "canonical_residue", + "extract_final", + "looks_like_refusal", + "parse_answer", + "score_answer", + "score_response", + "set_scores", +] + + +def score_response( + raw_response: str, + answer_schema: str, + gold_answer: dict[str, Any], + *, + parameters: dict[str, Any] | None = None, + truncated: bool = False, + provider_refusal: bool = False, +) -> dict[str, Any]: + """Parse and score one raw model response end to end. + + Returns ``{"parsed": ..., "score": ..., "format_error": ..., "refusal": ...}``. + Malformed, refused and truncated answers score zero and are reported under + their own failure category (section 12). ``provider_refusal`` covers an + explicit terminal API signal even when partial text happens to parse. + + ``format_error`` and ``refusal`` are mutually exclusive. Both score zero, but + they are opposite events: a refusal is a model saying the question cannot be + answered from what it was given, which on a context-only control is the + correct response; a format error is a model failing to say anything the + scorer can read. Counting a refusal under both made a model that declines + to guess look like one that cannot write an answer. + """ + parameters = parameters or {} + parsed = parse_answer(raw_response, answer_schema, parameters) + refusal = provider_refusal or ( + parsed.format_error and looks_like_refusal(raw_response) + ) + result = score_answer(answer_schema, gold_answer, parsed, parameters) + if truncated or provider_refusal: + result = {**result, "score": 0.0, "correct": False} + if truncated: + result["truncated"] = True + return { + "scoring_version": SCORING_VERSION, + "parsed": parsed.as_dict(), + "score": result, + "format_error": bool(parsed.format_error and not refusal), + "refusal": bool(refusal), + "truncated": bool(truncated), + } diff --git a/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py new file mode 100644 index 0000000000000000000000000000000000000000..a75ee7d22a8cd9e97700b510cb070ddfb401b128 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/parse.py @@ -0,0 +1,383 @@ +"""Parsing and canonicalisation of model answers (specification section 7). + +Only the ``FINAL`` field is scored. The parser is deliberately forgiving about +harmless surface variation (whitespace, markdown emphasis, trailing full stops, +case) and deliberately strict about content: an answer that names extra items, +uses the wrong separator or omits the field scores zero and is reported as a +format error. +""" + +from __future__ import annotations + +import re +from dataclasses import dataclass, field +from typing import Any + +# Only horizontal whitespace is allowed around the marker: a class containing +# `\s` would swallow the newline of a bare ``FINAL`` line and mistake the first +# field of a multi-field answer for a single-line answer. +FINAL_PATTERN = re.compile( + r"(?im)^[^\S\n]*[*_`#>]*[^\S\n]*final\b[*_`]*[^\S\n]*(:)?[*_`]*[^\S\n]*(.*)$" +) +FIELD_PATTERN = re.compile(r"^[^\S\n]*[*_`]*([A-Za-z][A-Za-z0-9_ \-]*?)[*_`]*[^\S\n]*:[^\S\n]*(.*)$") +RESIDUE_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z])[\s]*(-?\d+)$") +ATOM_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z])[\s]*(-?\d+)[:\s]+([A-Za-z0-9']{1,4})$") +# Non-greedy component name so ``M:ZN501`` parses as ZN/501 and ``L:L2401`` as +# L/2401 -- either way the parse is deterministic and round-trips the renderer. +ENTITY_PATTERN = re.compile(r"^([A-Za-z0-9])[:\s]+([A-Za-z][A-Za-z0-9]{0,2}?)[\s]*(-?\d+)$") +NUMBER_PATTERN = re.compile(r"[-+]?\d*\.?\d+(?:[eE][-+]?\d+)?") + +PAIR_SEPARATOR = "--" +PATH_SEPARATOR = "->" + +#: A residue left on the marker line that is only a label, e.g. the "Answer:" of +#: "### Final Answer:". Requires the trailing colon, so real one-word answers +#: such as `helix` or `yes` are never mistaken for a label. +LABEL_ONLY = re.compile(r"^[A-Za-z][A-Za-z ]*:$") + +#: Phrases that mark a response as a declared inability to answer rather than a +#: malformed one. The two are different events and are counted separately: a +#: model that says the question cannot be answered from what it was given has +#: understood the task, and one that emits an unparseable answer has not. +#: +#: The second group covers a model declining a context-only control, where "this +#: cannot be determined from the information supplied" is the epistemically +#: correct response and the benchmark should record it as such. +REFUSAL_MARKERS = ( + "i cannot", "i can't", "i am unable", "i'm unable", "cannot answer", + "as an ai", "i do not have access", "i don't have access", "unable to determine", + "insufficient information to answer", + "cannot be determined", "can't be determined", "can not be determined", + "cannot be established", "not determinable", "impossible to determine", + "no coordinates", "not enough information", "insufficient information", +) + + +class AnswerFormatError(ValueError): + """The model output did not contain a parseable FINAL answer.""" + + +@dataclass +class ParsedAnswer: + """Result of parsing one model response.""" + + raw_final: str = "" + fields: dict[str, str] = field(default_factory=dict) + value: Any = None + format_error: bool = False + error: str = "" + + def as_dict(self) -> dict[str, Any]: + return { + "raw_final": self.raw_final, + "fields": self.fields, + "value": self.value, + "format_error": self.format_error, + "error": self.error, + } + + +# --------------------------------------------------------------------------- # +# Locating the FINAL block +# --------------------------------------------------------------------------- # + +def strip_markup(text: str) -> str: + out = text.strip() + out = out.strip("`") + out = re.sub(r"\*\*(.*?)\*\*", r"\1", out) + out = re.sub(r"^[*_`\s]+|[*_`\s]+$", "", out) + out = out.rstrip(".") + return out.strip() + + +def extract_final(text: str) -> tuple[str, dict[str, str]]: + """Return ``(inline_value, fields)`` for the last FINAL block in ``text``. + + A single-line answer yields a non-empty ``inline_value``. A multi-field + answer yields ``fields`` keyed by lowercase field name. + """ + if not text: + raise AnswerFormatError("empty response") + matches = list(FINAL_PATTERN.finditer(text)) + if not matches: + raise AnswerFormatError("no FINAL field found") + match = matches[-1] + inline = strip_markup(match.group(2) or "") + lines = text[match.end():].splitlines() + + # Continuation lines for long single-line lists that wrapped. The split + # leaves an empty first element for the newline itself, so skip it. + if inline and inline.endswith(","): + continuation = list(lines) + while continuation and not continuation[0].strip(): + continuation.pop(0) + for line in continuation: + candidate = strip_markup(line) + if not candidate: + break + inline = f"{inline} {candidate}".strip() + if not inline.endswith(","): + break + + fields: dict[str, str] = {} + if not inline: + for line in lines: + if not line.strip(): + if fields: + break + continue + field_match = FIELD_PATTERN.match(line) + if not field_match: + break + key = field_match.group(1).strip().lower().replace(" ", "_") + if len(key) == 1: + break # `A:V22` is a residue identifier, not a named field + fields[key] = strip_markup(field_match.group(2)) + # A marker followed by nothing usable on its own line: take the next + # non-empty line as the value. Models routinely write "Final answer:" and + # put the value underneath, and the specification's own multi-field layout + # already places answers on the lines after the marker. This does not widen + # what counts as an answer -- text elsewhere in the response is still + # ignored, and a non-answer on that line still fails to canonicalise. + if not fields and (not inline or LABEL_ONLY.match(inline)): + for line in lines: + candidate = strip_markup(line) + if candidate: + inline = candidate + break + + if not inline and not fields: + raise AnswerFormatError("FINAL field is empty") + return inline, fields + + +def looks_like_refusal(text: str) -> bool: + lowered = (text or "").lower() + return any(marker in lowered for marker in REFUSAL_MARKERS) + + +# --------------------------------------------------------------------------- # +# Canonicalisation of individual tokens +# --------------------------------------------------------------------------- # + +def canonical_residue(token: str) -> str: + """``a: v 22`` -> ``A:V22``; raises for anything that is not a residue id. + + Chain identifiers are upper-cased. The dataset builder rejects any rendering + whose chains differ only by case, so this cannot merge distinct chains. + """ + text = strip_markup(token).replace(" ", "") + match = RESIDUE_PATTERN.match(text) + if match: + return f"{match.group(1).upper()}:{match.group(2).upper()}{int(match.group(3))}" + entity = ENTITY_PATTERN.match(text) + if entity: + return f"{entity.group(1).upper()}:{entity.group(2).upper()}{int(entity.group(3))}" + raise AnswerFormatError(f"not a residue identifier: {token!r}") + + +def canonical_atom(token: str) -> str: + text = strip_markup(token).replace(" ", "") + match = ATOM_PATTERN.match(text) + if not match: + raise AnswerFormatError(f"not an atom identifier: {token!r}") + return ( + f"{match.group(1).upper()}:{match.group(2).upper()}{int(match.group(3))}" + f":{match.group(4).upper()}" + ) + + +def canonical_pair(token: str) -> str: + """Unordered residue pair, canonicalised to sorted ``A--B`` form.""" + text = strip_markup(token) + parts = [p for p in re.split(r"--+|\s+--\s+|—|–", text) if p.strip()] + if len(parts) != 2: + raise AnswerFormatError(f"not a residue pair: {token!r}") + a, b = (canonical_residue(parts[0]), canonical_residue(parts[1])) + first, second = sorted((a, b)) + return f"{first}{PAIR_SEPARATOR}{second}" + + +def split_list(text: str) -> list[str]: + """Split a comma or semicolon separated list, tolerating ``and``/newlines.""" + cleaned = strip_markup(text) + if not cleaned or cleaned.lower() in ("none", "no residues", "empty", "n/a", "-"): + return [] + cleaned = re.sub(r"\band\b", ",", cleaned, flags=re.IGNORECASE) + parts = re.split(r"[,;\n]+", cleaned) + return [p.strip() for p in parts if p.strip()] + + +def canonical_residue_set(text: str) -> list[str]: + return sorted({canonical_residue(p) for p in split_list(text)}) + + +def canonical_pair_set(text: str) -> list[str]: + return sorted({canonical_pair(p) for p in split_list(text)}) + + +def canonical_string_set(text: str) -> list[str]: + return sorted({strip_markup(p).upper() for p in split_list(text) if strip_markup(p)}) + + +def canonical_category(text: str, allowed: list[str] | None = None) -> str: + cleaned = re.sub(r"\s+", " ", strip_markup(text)).strip().lower() + if allowed is None: + return cleaned + lookup = {a.lower(): a for a in allowed} + if cleaned in lookup: + return lookup[cleaned] + # Tolerate a model that answers with the option in a longer sentence. + for option in sorted(allowed, key=len, reverse=True): + if re.search(rf"\b{re.escape(option.lower())}\b", cleaned): + return option + raise AnswerFormatError(f"category {text!r} is not one of {allowed}") + + +def canonical_boolean(text: str) -> bool: + cleaned = strip_markup(text).lower() + if cleaned in ("yes", "y", "true", "t"): + return True + if cleaned in ("no", "n", "false", "f"): + return False + raise AnswerFormatError(f"not a boolean: {text!r}") + + +def canonical_choice(text: str, options: list[str] | None = None) -> str: + cleaned = strip_markup(text).upper() + match = re.match(r"^\(?([A-Z])\)?\b", cleaned) + if not match: + raise AnswerFormatError(f"not a multiple-choice letter: {text!r}") + letter = match.group(1) + if options and letter not in [o.upper() for o in options]: + raise AnswerFormatError(f"option {letter!r} is not among {options}") + return letter + + +def canonical_number(text: str) -> float: + cleaned = strip_markup(text).replace("Å", "").replace("angstrom", "").strip() + match = NUMBER_PATTERN.search(cleaned) + if not match: + raise AnswerFormatError(f"no number found in {text!r}") + return float(match.group(0)) + + +def canonical_integer(text: str) -> int: + value = canonical_number(text) + if abs(value - round(value)) > 1e-9: + raise AnswerFormatError(f"not an integer: {text!r}") + return int(round(value)) + + +def canonical_triple(text: str) -> list[float]: + cleaned = strip_markup(text).replace("(", " ").replace(")", " ").replace("[", " ").replace("]", " ") + numbers = NUMBER_PATTERN.findall(cleaned) + if len(numbers) != 3: + raise AnswerFormatError(f"expected three numbers, found {len(numbers)} in {text!r}") + return [float(n) for n in numbers] + + +def canonical_path(text: str) -> list[str]: + cleaned = strip_markup(text) + parts = [p for p in re.split(r"->|→", cleaned) if p.strip()] + if len(parts) < 2: + raise AnswerFormatError(f"not an ordered path: {text!r}") + return [canonical_residue(p) for p in parts] + + +# --------------------------------------------------------------------------- # +# Schema dispatch +# --------------------------------------------------------------------------- # + +def parse_answer(text: str, answer_schema: str, parameters: dict[str, Any] | None = None) -> ParsedAnswer: + """Parse a raw model response into the canonical form for ``answer_schema``.""" + parameters = parameters or {} + try: + inline, fields = extract_final(text) + except AnswerFormatError as exc: + return ParsedAnswer(format_error=True, error=str(exc)) + + parsed = ParsedAnswer(raw_final=inline or _fields_repr(fields), fields=fields) + try: + parsed.value = _dispatch(answer_schema, inline, fields, parameters) + except AnswerFormatError as exc: + parsed.format_error = True + parsed.error = str(exc) + return parsed + + +def _fields_repr(fields: dict[str, str]) -> str: + return "\n".join(f"{k}: {v}" for k, v in fields.items()) + + +def _dispatch( + schema: str, inline: str, fields: dict[str, str], parameters: dict[str, Any] +) -> Any: + if schema == "string_set": + return canonical_string_set(inline) + if schema == "integer": + return canonical_integer(inline) + if schema == "numeric_triple": + return canonical_triple(inline) + if schema == "distance": + return canonical_number(inline) + if schema == "atom": + return canonical_atom(inline) + if schema == "residue": + return canonical_residue(inline) + if schema == "residue_set": + return canonical_residue_set(inline) + if schema == "residue_pair": + return canonical_pair(inline) + if schema == "residue_pair_set": + return canonical_pair_set(inline) + if schema == "category": + return canonical_category(inline, parameters.get("categories")) + if schema == "boolean": + return canonical_boolean(inline) + if schema == "multiple_choice": + return canonical_choice(inline, parameters.get("options")) + if schema == "ordered_path": + return canonical_path(inline) + if schema == "two_interaction_sets": + return _parse_two_sets(inline, fields) + if schema == "multi_field": + return _parse_multi_field(fields, parameters) + raise AnswerFormatError(f"unknown answer schema {schema!r}") + + +def _parse_two_sets(inline: str, fields: dict[str, str]) -> dict[str, list[str]]: + source = dict(fields) + if inline and not source: + # Tolerate "gained: ...; lost: ..." on one line. + for chunk in re.split(r";|\|", inline): + m = FIELD_PATTERN.match(chunk.strip()) + if m: + source[m.group(1).strip().lower()] = m.group(2) + missing = [k for k in ("gained", "lost") if k not in source] + if missing: + raise AnswerFormatError(f"missing required field(s) {missing}") + return { + "gained": canonical_pair_set(source["gained"]), + "lost": canonical_pair_set(source["lost"]), + } + + +def _parse_multi_field(fields: dict[str, str], parameters: dict[str, Any]) -> dict[str, Any]: + spec: dict[str, str] = parameters.get("field_schemas") or {} + if not spec: + raise AnswerFormatError("multi_field answers require a field_schemas parameter") + missing = [name for name in spec if name not in fields] + if missing: + raise AnswerFormatError(f"missing required field(s) {missing}") + out: dict[str, Any] = {} + errors: list[str] = [] + for name, sub_schema in spec.items(): + try: + out[name] = _dispatch(sub_schema, fields[name], {}, parameters.get(name, {})) + except AnswerFormatError as exc: + out[name] = None + errors.append(f"{name}: {exc}") + if errors and len(errors) == len(spec): + raise AnswerFormatError("; ".join(errors)) + return out diff --git a/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py new file mode 100644 index 0000000000000000000000000000000000000000..f541597e6f7d19ecf5993fa7ac5a9b8cea4e2554 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/coordinate_scoring/scorers.py @@ -0,0 +1,173 @@ +"""Deterministic scorers (specification section 12). + +No scorer consults a language model. Every scorer returns a dictionary with a +primary ``score`` in [0, 1] plus the secondary metrics the report needs. +""" + +from __future__ import annotations + +from fractions import Fraction +from math import isfinite +from typing import Any + +from .parse import ParsedAnswer, canonical_pair, canonical_residue + +DEFAULT_DISTANCE_TOLERANCE = 0.02 # A.4 +DEFAULT_COORDINATE_TOLERANCE = 0.001 # section 8, P03 +SCORING_VERSION = "1.1.0" + + +def numeric_error(predicted: float, expected: float) -> Fraction | float: + """Compare parsed decimal values without binary subtraction at the boundary.""" + if not isfinite(predicted): + return float("inf") + return abs(Fraction(str(predicted)) - Fraction(str(expected))) + + +def set_scores(gold: list[str], predicted: list[str]) -> dict[str, Any]: + """Set F1 (primary) and exact-set accuracy (strict secondary).""" + gold_set, pred_set = set(gold), set(predicted) + true_positive = len(gold_set & pred_set) + precision = true_positive / len(pred_set) if pred_set else (1.0 if not gold_set else 0.0) + recall = true_positive / len(gold_set) if gold_set else (1.0 if not pred_set else 0.0) + f1 = 0.0 if (precision + recall) == 0 else 2 * precision * recall / (precision + recall) + if not gold_set and not pred_set: + precision = recall = f1 = 1.0 + return { + "score": f1, + "f1": f1, + "precision": precision, + "recall": recall, + "exact_set": float(gold_set == pred_set), + "correct": bool(gold_set == pred_set), + "n_gold": len(gold_set), + "n_predicted": len(pred_set), + "missing": sorted(gold_set - pred_set), + "spurious": sorted(pred_set - gold_set), + } + + +def score_answer( + answer_schema: str, + gold: dict[str, Any], + parsed: ParsedAnswer, + parameters: dict[str, Any] | None = None, +) -> dict[str, Any]: + """Score one parsed answer against its gold label.""" + parameters = parameters or {} + if parsed.format_error or parsed.value is None: + return { + "score": 0.0, + "correct": False, + "format_error": True, + "error": parsed.error or "unparseable answer", + } + + predicted = parsed.value + if answer_schema in ("residue", "atom", "category", "multiple_choice"): + expected = gold["value"] + correct = str(predicted) == str(expected) + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "boolean": + expected = bool(gold["value"]) + correct = bool(predicted) == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "integer": + expected = int(gold["value"]) + correct = int(predicted) == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema == "distance": + tolerance = float(parameters.get("tolerance", DEFAULT_DISTANCE_TOLERANCE)) + expected = float(gold["value"]) + error = numeric_error(float(predicted), expected) + correct = error <= Fraction(str(tolerance)) + return { + "score": float(correct), + "correct": correct, + "absolute_error": float(error), + "tolerance": tolerance, + "predicted": predicted, + "gold": expected, + } + + if answer_schema == "numeric_triple": + tolerance = float(parameters.get("tolerance", DEFAULT_COORDINATE_TOLERANCE)) + expected = [float(v) for v in gold["value"]] + errors = [numeric_error(float(p), e) for p, e in zip(predicted, expected)] + within = [e <= Fraction(str(tolerance)) for e in errors] + correct = all(within) + return { + "score": float(correct), + "correct": correct, + "component_errors": [float(e) for e in errors], + "components_within_tolerance": sum(within), + "tolerance": tolerance, + "predicted": predicted, + "gold": expected, + } + + if answer_schema == "residue_pair": + expected = canonical_pair(gold["value"]) + correct = predicted == expected + return {"score": float(correct), "correct": correct, "predicted": predicted, "gold": expected} + + if answer_schema in ("string_set", "residue_set", "residue_pair_set"): + expected = list(gold["value"]) + out = set_scores(expected, list(predicted)) + out.update({"predicted": sorted(predicted), "gold": sorted(expected)}) + return out + + if answer_schema == "ordered_path": + expected = [canonical_residue(v) for v in gold["value"]] + exact = list(predicted) == expected + positions = sum( + 1 for a, b in zip(predicted, expected) if a == b + ) / max(len(expected), 1) + return { + "score": float(exact), + "correct": exact, + "per_position": positions, + "predicted": list(predicted), + "gold": expected, + } + + if answer_schema == "two_interaction_sets": + gained = set_scores(list(gold.get("gained", [])), list(predicted.get("gained", []))) + lost = set_scores(list(gold.get("lost", [])), list(predicted.get("lost", []))) + mean = (gained["score"] + lost["score"]) / 2.0 + return { + "score": mean, + "correct": bool(gained["correct"] and lost["correct"]), + "gained": gained, + "lost": lost, + "exact_set": float(gained["correct"] and lost["correct"]), + } + + if answer_schema == "multi_field": + return _score_multi_field(gold, predicted, parameters) + + raise ValueError(f"no scorer for answer schema {answer_schema!r}") + + +def _score_multi_field( + gold: dict[str, Any], predicted: dict[str, Any], parameters: dict[str, Any] +) -> dict[str, Any]: + fields = gold.get("fields") or {} + per_field: dict[str, Any] = {} + for name, spec in fields.items(): + sub_schema = spec["schema"] + sub_gold = {k: v for k, v in spec.items() if k != "schema"} + value = predicted.get(name) + sub_parsed = ParsedAnswer(value=value, format_error=value is None) + per_field[name] = score_answer( + sub_schema, sub_gold, sub_parsed, parameters.get(name, {}) + ) + scores = [v["score"] for v in per_field.values()] + return { + "score": sum(scores) / len(scores) if scores else 0.0, + "correct": all(v["correct"] for v in per_field.values()) if per_field else False, + "fields": per_field, + } diff --git a/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json new file mode 100644 index 0000000000000000000000000000000000000000..f7274de0ee8ddf65774fdc867c170efb34d81572 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/gold.json @@ -0,0 +1 @@ +{"answer_schema": "category", "definition_version": "v1.0.0", "gold_answer": {"value": "g-"}, "parameters": {"atom4": "CG", "categories": ["g+", "t", "g-"], "residue": "B:F484"}, "reward": "exact_correct", "scoring_version": "1.1.0", "version": "1.1.0"} \ No newline at end of file diff --git a/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh new file mode 100644 index 0000000000000000000000000000000000000000..cdba8796c64e2d36448c41092163144f8da304eb --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/test.sh @@ -0,0 +1,3 @@ +#!/bin/sh +set -eu +python /tests/verify.py diff --git a/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml new file mode 100644 index 0000000000000000000000000000000000000000..07563b64a6afac2846c2f50ad59df56f79887254 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verifier.toml @@ -0,0 +1,6 @@ +version = "1.1.0" +mode = "pdbthink-coordinate" +scoring_version = "1.1.0" +answer_path = "/app/answer.txt" +contract = "/tests/gold.json" +reward = "exact_correct" diff --git a/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py new file mode 100644 index 0000000000000000000000000000000000000000..c8da25a86cba2b415036d0a6975a7d9dc2c8cf26 --- /dev/null +++ b/components/pdbthink/private/tasks/pdbthink-s09-7ba4aa076b6bb5633953/tests/verify.py @@ -0,0 +1,28 @@ +"""Run only after the model response has been saved by the host harness.""" +import json +import os +from pathlib import Path +from coordinate_scoring import score_response + +def verify(root=Path("/tests"), answer=Path("/app/answer.txt"), output=Path("/logs/verifier")): + output.mkdir(parents=True, exist_ok=True) + (output / "reward.txt").write_text("0\n") + contract = json.loads((root / "gold.json").read_text()) + raw = answer.read_text() if answer.exists() and answer.stat().st_size <= 8000000 else "" + status_path = answer.with_name("answer_status.json") + status = json.loads(status_path.read_text()) if status_path.exists() else {} + outcome = score_response(raw, contract["answer_schema"], contract["gold_answer"], + parameters=contract["parameters"], truncated=status.get("truncated", False), + provider_refusal=status.get("provider_refusal", False)) + tool_violation = bool(status.get("tool_events", [])) + reward = float(outcome["score"].get("correct", False) and not tool_violation) + details = {"reward": reward, "partial_credit": outcome["score"]["score"], + "tool_violation": tool_violation, "outcome": outcome} + (output / "details.json").write_text(json.dumps(details, indent=2)) + (output / "reward.txt").write_text(str(reward) + "\n") + return details + +if __name__ == "__main__": + verify(Path(os.environ.get("PDBTHINK_TEST_ROOT", "/tests")), + Path(os.environ.get("PDBTHINK_ANSWER", "/app/answer.txt")), + Path(os.environ.get("PDBTHINK_REWARD_DIR", "/logs/verifier"))) diff --git a/components/pdbthink/requirements.lock b/components/pdbthink/requirements.lock new file mode 100644 index 0000000000000000000000000000000000000000..543936bbbe0a1b14059cdfb3aeae89aeac00fb4b --- /dev/null +++ b/components/pdbthink/requirements.lock @@ -0,0 +1,112 @@ +# Linux/amd64 CPython 3.12 wheel lock. Offline inputs: vendor/build-manifest.json. +# OpenEnv source commit: 86a180ede21e044f7929b9a7783ad83aa67d83a3. +aiofile==3.12.3 --hash=sha256:5c1bcc9e929c50834608e8cc1a4cc1d7503eb60c15a535b779fd39e2f372c017 +annotated-doc==0.0.5 --hash=sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101 +annotated-types==0.8.0 --hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0 +anyio==4.15.1 --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 +attrs==26.1.0 --hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 +Authlib==1.8.0 --hash=sha256:88aebbd9af6757e14e912d5dc007ae1dc1f3e27e3b2152ce7c552ee2c3b3c121 +beartype==0.22.9 --hash=sha256:d16c9bbc61ea14637596c5f6fbff2ee99cbe3573e46a716401734ef50c3060c2 +brotli==1.2.0 --hash=sha256:072e7624b1fc4d601036ab3f4f27942ef772887e876beff0301d261210bca97f +cachetools==7.2.1 --hash=sha256:63aa53dfe7473c10cccdd5a01dedf76ef2c4b73a58840d9396e7d0752cbdac3b +caio==0.12.9 --hash=sha256:bf12d4f014b2a33e642ed7905b5787656ede2fc24be21f7c086826ff0d32cec3 +certifi==2026.7.22 --hash=sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 +cffi==2.1.1 --hash=sha256:c1453022f490d2459a11819d83ad1d586e9ff65a12ac3e705ffebd46d3685dcf +charset-normalizer==3.5.2 --hash=sha256:3d31298449090ab8d47b7b1b2a555ff73cac7ed438a08b7ac160980c7ebed649 +click==8.5.0 --hash=sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360 +cryptography==50.0.2 --hash=sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856 +cyclopts==5.2.0 --hash=sha256:5da2a5d65164e03008621fc4795946b88a722b881398b5dfa58afa6218342cff +dnspython==2.9.0 --hash=sha256:9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9 +docstring_parser==0.18.0 --hash=sha256:b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b +email-validator==2.3.0 --hash=sha256:80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4 +exceptiongroup==1.3.1 --hash=sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598 +fastapi==0.143.0 --hash=sha256:3e9395fd35276425b61b516a31fdd7c77fe2af83e41b4da22e30696fb1304c5d +fastmcp==3.4.8 --hash=sha256:ab4e8abe6c9d50b110f367e8c29f82b90c1478ac9180be61af10354f84f0ad8c +fastmcp-slim==3.4.8 --hash=sha256:e72c6b74e90c5dcdc8f58087fbdf213636d8b5d339384a498de1c5df6fc037a7 +filelock==4.1.0 --hash=sha256:2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1 +fsspec==2026.9.0 --hash=sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f +gradio==6.30.0 --hash=sha256:aae3aa81ec9f44e55781b498ad2ba12b117aa512e8d2bb0ef3e52af7f2ee6305 +gradio_client==2.7.2 --hash=sha256:12c9d2d940df28eb8dce58eef61f5e808265ad87bbbca53704d1330aa701e5e2 +griffelib==2.3.2 --hash=sha256:8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274 +groovy==0.1.2 --hash=sha256:7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64 +h11==0.16.0 --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 +hf-gradio==0.4.1 --hash=sha256:76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3 +hf-xet==1.7.0 --hash=sha256:2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8 +httpcore==1.0.9 --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 +httpcore2==2.13.1 --hash=sha256:e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a +httpx==0.28.1 --hash=sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad +httpx-sse==0.4.3 --hash=sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc +httpx2==2.13.1 --hash=sha256:6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4 +huggingface_hub==2.2.0 --hash=sha256:1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3 +idna==3.20 --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c +iniconfig==2.3.1 --hash=sha256:9121e2c1fdb355232495be3194c8dfe87ccc2d5dee45947b78e68f499790d7a7 +jaraco.classes==3.4.0 --hash=sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790 +jaraco.context==6.1.2 --hash=sha256:bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535 +jaraco.functools==4.6.0 --hash=sha256:99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30 +jeepney==0.9.0 --hash=sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683 +Jinja2==3.1.6 --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 +jiter==0.17.0 --hash=sha256:8c21265b251d99bbb40080d178a8953e35601d3a1564e05c4de4c0d2ca616797 +joserfc==1.7.5 --hash=sha256:add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159 +jsonref==1.1.0 --hash=sha256:590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9 +jsonschema==4.26.0 --hash=sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce +jsonschema-path==0.5.0 --hash=sha256:2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2 +jsonschema-specifications==2025.9.1 --hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe +keyring==25.7.0 --hash=sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f +markdown-it-py==4.2.0 --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a +MarkupSafe==3.0.4 --hash=sha256:8e124f974786f831d6043728e38296969d3579db8896fe004682f5758e613581 +mcp==1.30.0 --hash=sha256:666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0 +mdurl==0.1.2 --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 +more-itertools==11.1.0 --hash=sha256:4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192 +numpy==2.5.3 --hash=sha256:b7e18c623bb5c95acb3b3328861272816ba199fb531921c5d6d0b675f1fde9e3 +openai==3.28.0 --hash=sha256:1ea40a084ffe2f9f16fd3bea6e870f757853b536b18d8e737c518ef849a2920c +openapi-pydantic==0.6.0 --hash=sha256:8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3 +openenv==0.6.1.dev0 --hash=sha256:93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a +opentelemetry-api==1.45.1 --hash=sha256:b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb +orjson==3.13.0 --hash=sha256:bceadfd314bd238f584fc229a4bbaf0e573597e7a026dec5429fbf29fd66c641 +packaging==26.3 --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c +pandas==3.0.6 --hash=sha256:0704044b676496b8350e023b09f174a26772456c974a2b11c36bebb558c9490d +pathable==0.6.0 --hash=sha256:82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566 +pillow==12.3.0 --hash=sha256:78cb2c6865a35ab8ff8b75fd122f6033b92a62c82801110e48ddd6c936a45d91 +platformdirs==4.12.4 --hash=sha256:78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7 +pluggy==1.6.0 --hash=sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746 +py-key-value-aio==0.4.6 --hash=sha256:820b30c7959fc738ea3d00160cdb10cd258f51e38737b2add530defeea1ded77 +pycparser==3.11 --hash=sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80 +pydantic==2.14.0 --hash=sha256:15fab1bea6f1dc5003b54fc2ecab230c1fd1dbade2acd4addc52d81e32416d4b +pydantic-settings==2.15.0 --hash=sha256:0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42 +pydantic_core==2.50.0 --hash=sha256:f187030fc3d62c668feb0f09e92852e0eb414d7fcefc4748f2e67d245aade37e +pydub==0.25.1 --hash=sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6 +Pygments==2.21.0 --hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 +PyJWT==2.15.1 --hash=sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193 +pyperclip==1.11.0 --hash=sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273 +pytest==9.1.1 --hash=sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c +python-dateutil==2.9.0.post0 --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 +python-dotenv==1.2.4 --hash=sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc +python-multipart==0.0.32 --hash=sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23 +pytz==2026.5 --hash=sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03 +PyYAML==6.0.3 --hash=sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc +referencing==0.37.0 --hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231 +requests==2.34.2 --hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 +rich==15.0.0 --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb +rich-rst==2.2.0 --hash=sha256:1ea1c43813dc4a8d86475fce27ffb74e0ada3d4656c9f8130ba2a59868055fe9 +rpds-py==2026.9.1 --hash=sha256:addeda51556dac7c1a2f14cda62db8b621cd12afba3091d03a96c72932387eab +safehttpx==0.1.7 --hash=sha256:c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde +SecretStorage==3.5.0 --hash=sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137 +semantic-version==2.10.0 --hash=sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177 +shellingham==1.5.4 --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 +six==1.17.0 --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 +sniffio==1.3.1 --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 +sse-starlette==3.5.0 --hash=sha256:3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997 +starlette==1.7.0 --hash=sha256:67f8e99895493dd2911a03f11314af6ceebeae4e704bb9f43dfc6a9db151c93e +tomli==2.5.0 --hash=sha256:6cf74416bdc94ae458b14e37286c1073081850ac8459a00d0c5efef5d44294c6 +tomli_w==1.2.0 --hash=sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90 +tomlkit==0.14.0 --hash=sha256:592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680 +tqdm==4.70.1 --hash=sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73 +truststore==0.10.4 --hash=sha256:adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981 +typer==0.27.3 --hash=sha256:e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff +typing-inspection==0.4.4 --hash=sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147 +typing_extensions==4.16.0 --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 +uncalled-for==0.4.1 --hash=sha256:b611b38879d9fe5088297e7bb28f2ddd12d2d73dad933d93da107fb63eb4058e +urllib3==2.8.0 --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 +uvicorn==0.54.0 --hash=sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf +watchfiles==1.3.0 --hash=sha256:b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1 +websockets==17.2 --hash=sha256:6627b913b8586b1c06db9516b31dd0dfbc621de3bb9312616d92a7e44f268a5b diff --git a/components/pdbthink/runtime/common/__init__.py b/components/pdbthink/runtime/common/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/components/pdbthink/runtime/common/__init__.py @@ -0,0 +1 @@ + diff --git a/components/pdbthink/runtime/common/contracts.py b/components/pdbthink/runtime/common/contracts.py new file mode 100644 index 0000000000000000000000000000000000000000..b33d03fd3c21f3b117be3a4664274c109ac6fa9d --- /dev/null +++ b/components/pdbthink/runtime/common/contracts.py @@ -0,0 +1,7 @@ + +from copy import deepcopy + +ACTION_SCHEMA = {'type': 'object', 'description': 'Return one action object per reply, then wait for its observation. To finish, send {"op":"finish"}. A command is a JSON string: encode newlines as \\n and internal double quotes as \\". Do not wrap the object in prose, Markdown, or tags.', 'examples': [{'op': 'finish'}], 'oneOf': [{'properties': {'op': {'const': 'exec'}, 'command': {'type': 'string'}}, 'required': ['op', 'command'], 'additionalProperties': False}, {'properties': {'op': {'const': 'call'}, 'tool': {'type': 'string'}, 'arguments': {'type': 'object'}}, 'required': ['op', 'tool', 'arguments'], 'additionalProperties': False}, {'properties': {'op': {'const': 'finish'}}, 'required': ['op'], 'additionalProperties': False}]} + +def observation_payload(task_id, message, data=None, reward=0.0, done=False): + return {"task_id": str(task_id), "message": str(message), "data": {} if data is None else data, "reward": reward, "done": bool(done), "metadata": {}} diff --git a/components/pdbthink/runtime/common/http_routes.py b/components/pdbthink/runtime/common/http_routes.py new file mode 100644 index 0000000000000000000000000000000000000000..a3ab94f85fc92d044895d022d16d4659be018d8b --- /dev/null +++ b/components/pdbthink/runtime/common/http_routes.py @@ -0,0 +1,64 @@ + +from threading import RLock +from contextlib import asynccontextmanager +from copy import deepcopy +from fastapi import HTTPException +from pydantic import ValidationError +from starlette.concurrency import run_in_threadpool +from openenv.core.env_server.serialization import serialize_observation +from openenv.core.env_server.types import ResetRequest,ResetResponse,StepRequest,StepResponse +from .models import ArenaAction + + +def install_persistent_http_routes(app,env,conflict_error=None): + lock=RLock() + app.router.routes=[route for route in app.router.routes if getattr(route,'path',None) not in {'/reset','/step','/state'}] + + def reset_sync(request): + with lock: + return ResetResponse(**serialize_observation(env.reset(**request.model_dump(exclude_unset=True)))) + + def step_sync(request): + with lock: + action=ArenaAction.model_validate(request.action) + return StepResponse(**serialize_observation(env.step(action,timeout_s=request.timeout_s))) + + def state_sync(): + with lock: + value=env.state + return value.model_copy(deep=True) if hasattr(value,'model_copy') else deepcopy(value) + + @app.post('/reset',response_model=ResetResponse) + async def reset(request:ResetRequest): + try:return await run_in_threadpool(reset_sync,request) + except (ValueError,IndexError) as exc:raise HTTPException(status_code=400,detail=str(exc)) from exc + except Exception as exc: + if conflict_error is not None and isinstance(exc,conflict_error): + raise HTTPException(status_code=409,detail=str(exc)) from exc + raise + + @app.post('/step',response_model=StepResponse) + async def step(request:StepRequest): + try:return await run_in_threadpool(step_sync,request) + except (ValueError,ValidationError) as exc:raise HTTPException(status_code=422,detail=str(exc)) from exc + + @app.get('/state') + async def state(): + return await run_in_threadpool(state_sync) + + def shutdown(): + with lock:env.close() + + + + + original_lifespan=app.router.lifespan_context + + @asynccontextmanager + async def lifespan(application): + async with original_lifespan(application) as state: + try:yield state + finally:await run_in_threadpool(shutdown) + + app.router.lifespan_context=lifespan + return lock diff --git a/components/pdbthink/runtime/common/models.py b/components/pdbthink/runtime/common/models.py new file mode 100644 index 0000000000000000000000000000000000000000..b862e2d3259ab1c55bbb46e6423587b742dbcc51 --- /dev/null +++ b/components/pdbthink/runtime/common/models.py @@ -0,0 +1,54 @@ + +from copy import deepcopy +import math +from typing import Any, Literal +import jsonschema +from openenv.core.env_server.types import Action, Observation +from pydantic import ConfigDict, Field, model_serializer, model_validator +from .contracts import ACTION_SCHEMA + + +class ArenaAction(Action): + model_config=ConfigDict(extra='forbid',frozen=True,validate_assignment=False) + op: Literal['exec', 'call', 'finish'] + command: str | None = None + tool: str | None = None + arguments: dict[str, Any] | None = None + + @model_validator(mode='before') + @classmethod + def exact_contract(cls, value): + if isinstance(value, cls): + return value + def finite(item): + if isinstance(item,float) and not math.isfinite(item): + raise ValueError('Non-finite JSON number') + if isinstance(item,dict): + for part in item.values():finite(part) + elif isinstance(item,list): + for part in item:finite(part) + finite(value) + try: + jsonschema.Draft202012Validator(ACTION_SCHEMA).validate(value) + except jsonschema.ValidationError as exc: + raise ValueError(exc.message) from exc + return value + + @classmethod + def __get_pydantic_json_schema__(cls, core_schema, handler): + return deepcopy(ACTION_SCHEMA) + + def action_payload(self): + if self.op=='exec':return {'op':'exec','command':self.command} + if self.op=='call':return {'op':'call','tool':self.tool,'arguments':self.arguments} + return {'op':'finish'} + + @model_serializer + def canonical_serialization(self): + return self.action_payload() + + +class ArenaObservation(Observation): + task_id: str = '' + message: str = '' + data: dict[str, Any] = Field(default_factory=dict) diff --git a/components/pdbthink/runtime/pdbthink/__init__.py b/components/pdbthink/runtime/pdbthink/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2ae28399f5fda2dfb1b04405f4a3b4895f5fac1e --- /dev/null +++ b/components/pdbthink/runtime/pdbthink/__init__.py @@ -0,0 +1 @@ +pass diff --git a/components/pdbthink/runtime/pdbthink/adapter.py b/components/pdbthink/runtime/pdbthink/adapter.py new file mode 100644 index 0000000000000000000000000000000000000000..d0632167010c9b5ed7ebede328c98f973aa9753c --- /dev/null +++ b/components/pdbthink/runtime/pdbthink/adapter.py @@ -0,0 +1,160 @@ + +from functools import wraps +import hashlib +import json +import math +import os +from pathlib import Path +import subprocess +import sys +import tempfile +from threading import RLock + +import jsonschema +from common.contracts import ACTION_SCHEMA, observation_payload +from .transport import Controller + + +class CheckerInfrastructureError(RuntimeError): + pass + + +def serialized(method): + @wraps(method) + def invoke(self, *args, **kwargs): + with self._lock: + return method(self, *args, **kwargs) + return invoke + + +class PDBThinkAdapter: + def __init__(self, task_entries, runtime_parent): + self._lock = RLock() + self.registry = dict(task_entries) + if not self.registry: + raise ValueError('At least one original train task is required') + for name, entry in self.registry.items(): + if entry['task_id'] != name or entry['split'] != 'train': + raise ValueError('Only matching original train entries are permitted') + public = Path(entry['directory']) / 'public_task.json' + if hashlib.sha256(public.read_bytes()).hexdigest() != entry['public_sha256']: + raise ValueError('Delivery profile text hash mismatch') + if json.loads(public.read_text())['task_id'] != name: + raise ValueError('Public task id does not match the registry') + for relative, expected in entry['original_checker_sha256'].items(): + path = Path(entry['directory']) / 'tests' / relative + if path.is_symlink() or hashlib.sha256(path.read_bytes()).hexdigest() != expected: + raise ValueError('Original checker or private contract hash mismatch') + self.runtime_parent = Path(runtime_parent) + self.runtime_parent.mkdir(parents=True, exist_ok=True) + self.temporary = None + self.controller = None + self.task_id = None + self.reward = None + self.checker_failure = None + + @serialized + def reset(self, task_id=None): + if task_id is None and len(self.registry) == 1: + task_id = next(iter(self.registry)) + if not isinstance(task_id, str) or task_id not in self.registry: + raise ValueError('Unknown or missing original train task id') + self.close() + self.task_id = task_id + self.temporary = tempfile.TemporaryDirectory(prefix='pdbthink-', dir=self.runtime_parent) + workspace = Path(self.temporary.name) + self.controller = Controller(private=Path(self.registry[task_id]['directory']), + state=workspace / 'state', answer=workspace / 'answer.txt') + self.reward = None + self.checker_failure = None + opening = self.controller.reset() + return observation_payload(task_id, opening['instructions'], + {'available_ops': ['call', 'finish'], 'tools': opening['tools'], + 'answer_delivery': opening['answer_delivery'], 'max_submissions': 1, + 'no_computational_tools': True, 'delivery_profile': 'pdbthink-json-delivery-v3'}, + reward=0.0, done=False) + + def _score(self): + if self.reward is not None: + return self.reward + if self.checker_failure is not None: + raise CheckerInfrastructureError(self.checker_failure) + entry = self.registry[self.task_id] + tests = Path(entry['directory']) / 'tests' + output = Path(self.temporary.name) / 'verifier' + + + + env = {'PATH': os.defpath, 'PYTHONDONTWRITEBYTECODE': '1', + 'PDBTHINK_TEST_ROOT': str(tests), 'PDBTHINK_ANSWER': str(self.controller.answer), + 'PDBTHINK_REWARD_DIR': str(output)} + try: + result = subprocess.run([sys.executable, str(tests / 'verify.py')], + env=env, capture_output=True, text=True, timeout=30) + except (OSError, subprocess.TimeoutExpired) as exc: + self.checker_failure = 'Original PDBThink checker did not complete' + raise CheckerInfrastructureError(self.checker_failure) from exc + if result.returncode: + self.checker_failure = 'Original PDBThink checker exited unsuccessfully' + raise CheckerInfrastructureError(self.checker_failure) + try: + reward = float((output / 'reward.txt').read_text()) + except (OSError, ValueError) as exc: + self.checker_failure = 'Original checker reward is missing or malformed' + raise CheckerInfrastructureError(self.checker_failure) from exc + if not math.isfinite(reward) or reward not in (0.0, 1.0): + self.checker_failure = 'Original checker returned an unexpected reward' + raise CheckerInfrastructureError(self.checker_failure) + self.reward = reward + return reward + + def _terminal(self): + attempted = bool(json.loads(self.controller.metadata.read_text())['submissions']) + return observation_payload(self.task_id, 'The answer attempt is complete. The episode has ended.', + {'answer_attempted': attempted}, reward=self._score(), done=True) + + @serialized + def step(self, action): + if self.controller is None: + raise ValueError('reset is required before step') + if hasattr(action, 'action_payload'): + action = action.action_payload() + json.dumps(action, allow_nan=False) + jsonschema.validate(action, ACTION_SCHEMA) + if json.loads(self.controller.metadata.read_text())['done']: + return self._terminal() + if action['op'] == 'finish': + return self.finalize() + if action['op'] == 'call': + self.controller.call(action['tool'], action['arguments']) + else: + + + self.controller.call('forbidden_exec', {}) + return self._terminal() + + @serialized + def finalize(self): + if self.controller is None: + raise ValueError('reset is required before finish') + self.controller.finalize() + return self._terminal() + + @property + @serialized + def state(self): + if self.controller is None: + return {'task_id': None, 'initialized': False, 'done': False} + original = json.loads(self.controller.metadata.read_text()) + return {'task_id': self.task_id, 'initialized': True, 'done': original['done'], + 'submissions': original['submissions']} + + @serialized + def close(self): + if self.temporary is not None: + self.temporary.cleanup() + self.temporary = None + self.controller = None + self.task_id = None + self.reward = None + self.checker_failure = None diff --git a/components/pdbthink/runtime/pdbthink/launch_service.py b/components/pdbthink/runtime/pdbthink/launch_service.py new file mode 100644 index 0000000000000000000000000000000000000000..44bdf9908242dc60b69bb0ccc503abc682f5c29c --- /dev/null +++ b/components/pdbthink/runtime/pdbthink/launch_service.py @@ -0,0 +1,52 @@ + +import argparse +import json +import os +from pathlib import Path +import subprocess +import time +import urllib.request + + +class RejectRedirects(urllib.request.HTTPRedirectHandler): + def redirect_request(self,*args,**kwargs): + raise RuntimeError('Redirects are forbidden for the local readiness probe') + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('--python',default='/usr/local/bin/python') + parser.add_argument('--config',default='/opt/pdbthink/config.json') + args=parser.parse_args() + if os.geteuid()!=0:raise PermissionError('Only the trusted supervisor may launch this service') + if args.config!='/opt/pdbthink/config.json':raise ValueError('This prototype uses its fixed image registry') + opener=urllib.request.build_opener(urllib.request.ProxyHandler({}),RejectRedirects()) + url='http://127.0.0.1:8000/metadata' + def ready(): + try: + with opener.open(url,timeout=2) as response: + return json.load(response).get('name')=='pdbthink_original' + except Exception:return False + if ready(): + print(json.dumps({'status':'already_running','base_url':'http://127.0.0.1:8000'}));return + private=Path('/opt/pdbthink/private');private.mkdir(parents=True,exist_ok=True);private.chmod(0o700) + log=private/'service.log' + env={'PATH':'/usr/local/bin:/usr/bin:/bin','HOME':'/root','LANG':'C.UTF-8','LC_ALL':'C.UTF-8', + 'PYTHONPATH':'/opt/pdbthink/runtime','PYTHONDONTWRITEBYTECODE':'1','PYTHONUNBUFFERED':'1', + 'ARENA_DEDICATED_CONTAINER':'1','ENABLE_WEB_INTERFACE':'false', + 'OPENENV_MODE':'simulation','GRADIO_ANALYTICS_ENABLED':'false','HF_HUB_OFFLINE':'1'} + with log.open('w') as stream: + process=subprocess.Popen([args.python,'-m','pdbthink.server'],env=env,stdin=subprocess.DEVNULL, + stdout=stream,stderr=subprocess.STDOUT,start_new_session=True) + (private/'service.pid').write_text(str(process.pid)+'\n') + deadline=time.monotonic()+90 + while time.monotonic() 2 else {} + if operation == 'reset': + result = controller.reset() + elif operation == 'call': + result = controller.call(request.get('name'), request.get('arguments')) + elif operation == 'finalize': + result = controller.finalize(request or None) + else: + raise ValueError('Unknown trusted controller operation') + print(json.dumps(result, ensure_ascii=False, allow_nan=False)) + + +if __name__ == '__main__': + main() diff --git a/components/pdbthink/runtime/pdbthink/wire_client.py b/components/pdbthink/runtime/pdbthink/wire_client.py new file mode 100644 index 0000000000000000000000000000000000000000..7863243bee03a0a205c2e5580e2eaa68b4079e81 --- /dev/null +++ b/components/pdbthink/runtime/pdbthink/wire_client.py @@ -0,0 +1,123 @@ + +import argparse +import base64 +import json +import math +import os +import sys +import urllib.error +import urllib.parse +import urllib.request + + +class WireProtocolError(RuntimeError): + pass + + +class RejectRedirects(urllib.request.HTTPRedirectHandler): + def redirect_request(self,request,fp,code,message,headers,new_url): + raise WireProtocolError('Redirects are forbidden for the local OpenEnv transport') + + +def _constant(value): + raise WireProtocolError('Non-finite JSON number: '+value) + + +def _unique(pairs): + result={} + for key,value in pairs: + if key in result:raise WireProtocolError('Duplicate JSON key') + result[key]=value + return result + + +def _finite(value): + if isinstance(value,float) and not math.isfinite(value): + raise WireProtocolError('Non-finite wire value') + if isinstance(value,dict): + for item in value.values():_finite(item) + elif isinstance(value,list): + for item in value:_finite(item) + + +def loads(raw): + value=json.loads(raw,parse_constant=_constant,object_pairs_hook=_unique) + _finite(value) + return value + + +def validate_envelope(value,*,require_done=False): + if not isinstance(value,dict) or not isinstance(value.get('observation'),dict): + raise WireProtocolError('Missing SDK observation object') + observation=value['observation'] + if (set(observation)!={'task_id','message','data','metadata'} or + not isinstance(observation['task_id'],str) or not isinstance(observation['message'],str) or + not isinstance(observation['data'],dict) or not isinstance(observation['metadata'],dict)): + raise WireProtocolError('Observation does not match the common public contract') + if type(value.get('done')) is not bool: + raise WireProtocolError('SDK done must be a JSON boolean') + reward=value.get('reward') + if reward is not None and (type(reward) not in (int,float) or not math.isfinite(reward) or not 0<=reward<=1): + raise WireProtocolError('SDK reward is not a finite number in [0,1]') + if require_done and (not value['done'] or reward is None): + raise WireProtocolError('Finish did not return a terminal numeric score') + _finite(value) + return value + + +class WireClient: + def __init__(self,base_url='http://127.0.0.1:8000',timeout=330): + if os.geteuid()!=0: + raise PermissionError('Wire client is reserved for the trusted supervisor') + url=urllib.parse.urlsplit(base_url) + if url.scheme!='http' or url.hostname not in ('127.0.0.1','localhost','::1') or url.username or url.password or url.query or url.fragment or url.path not in ('','/'): + raise ValueError('Only an unauthenticated local HTTP server is allowed') + self.base_url=base_url.rstrip('/') + self.timeout=timeout + self.opener=urllib.request.build_opener(urllib.request.ProxyHandler({}),RejectRedirects()) + + def _post(self,path,payload): + body=json.dumps(payload,ensure_ascii=False,allow_nan=False,separators=(',',':')).encode() + request=urllib.request.Request(self.base_url+path,data=body,headers={'Content-Type':'application/json'}) + try: + with self.opener.open(request,timeout=self.timeout) as response: + if response.status!=200:raise WireProtocolError('Unexpected HTTP status') + raw=response.read(2*1024*1024+1) + except urllib.error.HTTPError as exc: + raise WireProtocolError(f'OpenEnv HTTP {exc.code}: '+exc.read(2048).decode(errors='replace')) from exc + if len(raw)>2*1024*1024:raise WireProtocolError('SDK response exceeds the transport limit') + return validate_envelope(loads(raw)) + + def reset(self,**kwargs): + return self._post('/reset',kwargs) + + def step(self,action): + return self._post('/step',{'action':action}) + + def finish(self): + return validate_envelope(self.step({'op':'finish'}),require_done=True) + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('operation',choices=['reset','step','finish']) + parser.add_argument('--payload-base64') + parser.add_argument('--url',default='http://127.0.0.1:8000') + parser.add_argument('--timeout',type=float,default=330) + args=parser.parse_args() + payload={} if args.payload_base64 is None else loads(base64.b64decode(args.payload_base64,validate=True)) + if not isinstance(payload,dict):raise WireProtocolError('Payload must be a JSON object') + client=WireClient(args.url,args.timeout) + if args.operation=='reset':result=client.reset(**payload) + elif args.operation=='step':result=client.step(payload) + else: + if payload:raise WireProtocolError('Finish has no payload') + result=client.finish() + print(json.dumps(result,ensure_ascii=False,allow_nan=False,separators=(',',':'))) + + +if __name__=='__main__': + try:main() + except Exception as exc: + print(type(exc).__name__+': '+str(exc),file=sys.stderr) + raise SystemExit(1) diff --git a/components/tmax/DEPENDENCIES.json b/components/tmax/DEPENDENCIES.json new file mode 100644 index 0000000000000000000000000000000000000000..0f9940b725cd52aa6bdfe42d7c46751f88fcac1d --- /dev/null +++ b/components/tmax/DEPENDENCIES.json @@ -0,0 +1,5191 @@ +{ + "schema_version": 1, + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687", + "inventory_method": "Read installed package metadata from the complete uncompressed OCI layer produced from the frozen source rootfs; no installers were executed.", + "os_release": { + "path": "/usr/lib/os-release", + "fields": { + "PRETTY_NAME": "Ubuntu 22.04.5 LTS", + "VERSION_ID": "22.04", + "VERSION_CODENAME": "jammy", + "ID": "ubuntu" + }, + "sha256": "594d5ddd35aedb47f00d9c34d140017907a5b9f93c975aba125fc924daac5c07" + }, + "system_packages": { + "source_path": "/var/lib/dpkg/status", + "source_sha256": "fd6fb1d44d9298e6216ea1871145b199804011a3e53d08410bde1efa552d1a89", + "packages": [ + { + "name": "adduser", + "version": "3.118ubuntu5", + "architecture": "all" + }, + { + "name": "apt", + "version": "2.4.14", + "architecture": "amd64" + }, + { + "name": "autoconf", + "version": "2.71-2", + "architecture": "all" + }, + { + "name": "automake", + "version": "1:1.16.5-1.3", + "architecture": "all" + }, + { + "name": "autotools-dev", + "version": "20220109.1", + "architecture": "all" + }, + { + "name": "base-files", + "version": "12ubuntu4.7", + "architecture": "amd64" + }, + { + "name": "base-passwd", + "version": "3.5.52build1", + "architecture": "amd64" + }, + { + "name": "bash", + "version": "5.1-6ubuntu1.1", + "architecture": "amd64" + }, + { + "name": "binutils", + "version": "2.38-4ubuntu2.12", + "architecture": "amd64" + }, + { + "name": "binutils-common", + "version": "2.38-4ubuntu2.12", + "architecture": "amd64" + }, + { + "name": "binutils-x86-64-linux-gnu", + "version": "2.38-4ubuntu2.12", + "architecture": "amd64" + }, + { + "name": "bsdutils", + "version": "1:2.37.2-4ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "build-essential", + "version": "12.9ubuntu3", + "architecture": "amd64" + }, + { + "name": "bzip2", + "version": "1.0.8-5ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "ca-certificates", + "version": "20260601~22.04.1", + "architecture": "all" + }, + { + "name": "cargo", + "version": "1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "cmake", + "version": "3.22.1-1ubuntu1.22.04.2", + "architecture": "amd64" + }, + { + "name": "cmake-data", + "version": "3.22.1-1ubuntu1.22.04.2", + "architecture": "all" + }, + { + "name": "coreutils", + "version": "8.32-4.1ubuntu1.4", + "architecture": "amd64" + }, + { + "name": "cpio", + "version": "2.13+dfsg-7ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "cpp", + "version": "4:11.2.0-1ubuntu1", + "architecture": "amd64" + }, + { + "name": "cpp-11", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "curl", + "version": "7.81.0-1ubuntu1.29", + "architecture": "amd64" + }, + { + "name": "dash", + "version": "0.5.11+git20210903+057cd650a4ed-3build1", + "architecture": "amd64" + }, + { + "name": "debconf", + "version": "1.5.79ubuntu1", + "architecture": "all" + }, + { + "name": "debianutils", + "version": "5.5-1ubuntu2", + "architecture": "amd64" + }, + { + "name": "dh-elpa-helper", + "version": "2.0.9ubuntu1", + "architecture": "all" + }, + { + "name": "diffutils", + "version": "1:3.8-0ubuntu2.1", + "architecture": "amd64" + }, + { + "name": "dpkg", + "version": "1.21.1ubuntu2.6", + "architecture": "amd64" + }, + { + "name": "dpkg-dev", + "version": "1.21.1ubuntu2.6", + "architecture": "all" + }, + { + "name": "e2fsprogs", + "version": "1.46.5-2ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "emacsen-common", + "version": "3.0.4", + "architecture": "all" + }, + { + "name": "espeak", + "version": "1.48.15+dfsg-3", + "architecture": "amd64" + }, + { + "name": "espeak-data", + "version": "1.48.15+dfsg-3", + "architecture": "amd64" + }, + { + "name": "espeak-ng", + "version": "1.50+dfsg-10ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "espeak-ng-data", + "version": "1.50+dfsg-10ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "expect", + "version": "5.45.4-2build1", + "architecture": "amd64" + }, + { + "name": "ffmpeg", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "file", + "version": "1:5.41-3ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "findutils", + "version": "4.8.0-1ubuntu3", + "architecture": "amd64" + }, + { + "name": "fontconfig", + "version": "2.13.1-4.2ubuntu5", + "architecture": "amd64" + }, + { + "name": "fontconfig-config", + "version": "2.13.1-4.2ubuntu5", + "architecture": "all" + }, + { + "name": "fonts-dejavu-core", + "version": "2.37-2build1", + "architecture": "all" + }, + { + "name": "g++", + "version": "4:11.2.0-1ubuntu1", + "architecture": "amd64" + }, + { + "name": "g++-11", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "gawk", + "version": "1:5.1.0-1ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "gcc", + "version": "4:11.2.0-1ubuntu1", + "architecture": "amd64" + }, + { + "name": "gcc-11", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "gcc-11-base", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "gcc-12-base", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "gdb", + "version": "12.1-0ubuntu1~22.04.2", + "architecture": "amd64" + }, + { + "name": "gfortran-11", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "git", + "version": "1:2.34.1-1ubuntu1.17", + "architecture": "amd64" + }, + { + "name": "git-man", + "version": "1:2.34.1-1ubuntu1.17", + "architecture": "all" + }, + { + "name": "golang-1.18-go", + "version": "1.18.1-1ubuntu1.3", + "architecture": "amd64" + }, + { + "name": "golang-1.18-src", + "version": "1.18.1-1ubuntu1.3", + "architecture": "all" + }, + { + "name": "golang-go", + "version": "2:1.18~0ubuntu2", + "architecture": "amd64" + }, + { + "name": "golang-src", + "version": "2:1.18~0ubuntu2", + "architecture": "all" + }, + { + "name": "gpgv", + "version": "2.2.27-3ubuntu2.5", + "architecture": "amd64" + }, + { + "name": "grep", + "version": "3.7-1build1", + "architecture": "amd64" + }, + { + "name": "gsasl-common", + "version": "1.10.0-5", + "architecture": "all" + }, + { + "name": "guile-3.0-libs", + "version": "3.0.7-1", + "architecture": "amd64" + }, + { + "name": "gyp", + "version": "0.1+20210831gitd6c5dd5-5", + "architecture": "all" + }, + { + "name": "gzip", + "version": "1.10-4ubuntu4.2", + "architecture": "amd64" + }, + { + "name": "hicolor-icon-theme", + "version": "0.17-2", + "architecture": "all" + }, + { + "name": "hostname", + "version": "3.23ubuntu2", + "architecture": "amd64" + }, + { + "name": "ibverbs-providers", + "version": "39.0-1", + "architecture": "amd64" + }, + { + "name": "imagemagick", + "version": "8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5", + "architecture": "amd64" + }, + { + "name": "imagemagick-6-common", + "version": "8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5", + "architecture": "all" + }, + { + "name": "imagemagick-6.q16", + "version": "8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5", + "architecture": "amd64" + }, + { + "name": "init-system-helpers", + "version": "1.62", + "architecture": "all" + }, + { + "name": "inotify-tools", + "version": "3.22.1.0-2", + "architecture": "amd64" + }, + { + "name": "iproute2", + "version": "5.15.0-1ubuntu2.2", + "architecture": "amd64" + }, + { + "name": "jq", + "version": "1.6-2.1ubuntu3.2", + "architecture": "amd64" + }, + { + "name": "libacl1", + "version": "2.3.1-1", + "architecture": "amd64" + }, + { + "name": "libaom3", + "version": "3.3.0-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libapparmor1", + "version": "3.0.4-2ubuntu2.5", + "architecture": "amd64" + }, + { + "name": "libapt-pkg6.0", + "version": "2.4.14", + "architecture": "amd64" + }, + { + "name": "libarchive13", + "version": "3.6.0-1ubuntu1.9", + "architecture": "amd64" + }, + { + "name": "libasan6", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libasound2", + "version": "1.2.6.1-1ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "libasound2-data", + "version": "1.2.6.1-1ubuntu1.2", + "architecture": "all" + }, + { + "name": "libass9", + "version": "1:0.15.2-1", + "architecture": "amd64" + }, + { + "name": "libasyncns0", + "version": "0.8-6build2", + "architecture": "amd64" + }, + { + "name": "libatomic1", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libattr1", + "version": "1:2.5.1-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libaudit-common", + "version": "1:3.0.7-1ubuntu0.1", + "architecture": "all" + }, + { + "name": "libaudit1", + "version": "1:3.0.7-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libavc1394-0", + "version": "0.5.4-5build2", + "architecture": "amd64" + }, + { + "name": "libavcodec58", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libavdevice58", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libavfilter7", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libavformat58", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libavutil56", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libbabeltrace1", + "version": "1.5.8-2build1", + "architecture": "amd64" + }, + { + "name": "libbinutils", + "version": "2.38-4ubuntu2.12", + "architecture": "amd64" + }, + { + "name": "libblas-dev", + "version": "3.10.0-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libblas3", + "version": "3.10.0-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libblkid1", + "version": "2.37.2-4ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "libbluray2", + "version": "1:1.3.1-1", + "architecture": "amd64" + }, + { + "name": "libboost-regex1.74.0", + "version": "1.74.0-14ubuntu3", + "architecture": "amd64" + }, + { + "name": "libbpf0", + "version": "1:0.5.0-1ubuntu22.04.1", + "architecture": "amd64" + }, + { + "name": "libbrotli-dev", + "version": "1.0.9-2build6", + "architecture": "amd64" + }, + { + "name": "libbrotli1", + "version": "1.0.9-2build6", + "architecture": "amd64" + }, + { + "name": "libbs2b0", + "version": "3.1.0+dfsg-2.2build1", + "architecture": "amd64" + }, + { + "name": "libbsd0", + "version": "0.11.5-1", + "architecture": "amd64" + }, + { + "name": "libbz2-1.0", + "version": "1.0.8-5ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libc-ares2", + "version": "1.18.1-1ubuntu0.22.04.3", + "architecture": "amd64" + }, + { + "name": "libc-bin", + "version": "2.35-0ubuntu3.15", + "architecture": "amd64" + }, + { + "name": "libc-dev-bin", + "version": "2.35-0ubuntu3.15", + "architecture": "amd64" + }, + { + "name": "libc6", + "version": "2.35-0ubuntu3.15", + "architecture": "amd64" + }, + { + "name": "libc6-dbg", + "version": "2.35-0ubuntu3.15", + "architecture": "amd64" + }, + { + "name": "libc6-dev", + "version": "2.35-0ubuntu3.15", + "architecture": "amd64" + }, + { + "name": "libc6-i386", + "version": "2.35-0ubuntu3.15", + "architecture": "amd64" + }, + { + "name": "libcaca0", + "version": "0.99.beta19-2.2ubuntu4.2", + "architecture": "amd64" + }, + { + "name": "libcairo-gobject2", + "version": "1.16.0-5ubuntu2.1", + "architecture": "amd64" + }, + { + "name": "libcairo2", + "version": "1.16.0-5ubuntu2.1", + "architecture": "amd64" + }, + { + "name": "libcap-ng0", + "version": "0.7.9-2.2build3", + "architecture": "amd64" + }, + { + "name": "libcap2", + "version": "1:2.44-1ubuntu0.22.04.3", + "architecture": "amd64" + }, + { + "name": "libcap2-bin", + "version": "1:2.44-1ubuntu0.22.04.3", + "architecture": "amd64" + }, + { + "name": "libcbor0.8", + "version": "0.8.0-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libcc1-0", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libcdio-cdda2", + "version": "10.2+2.0.0-1build3", + "architecture": "amd64" + }, + { + "name": "libcdio-paranoia2", + "version": "10.2+2.0.0-1build3", + "architecture": "amd64" + }, + { + "name": "libcdio19", + "version": "2.1.0-3ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libchromaprint1", + "version": "1.5.1-2", + "architecture": "amd64" + }, + { + "name": "libcodec2-1.0", + "version": "1.0.1-3", + "architecture": "amd64" + }, + { + "name": "libcom-err2", + "version": "1.46.5-2ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "libconfig-inifiles-perl", + "version": "3.000003-1ubuntu0.1", + "architecture": "all" + }, + { + "name": "libcrypt-dev", + "version": "1:4.4.27-1", + "architecture": "amd64" + }, + { + "name": "libcrypt1", + "version": "1:4.4.27-1", + "architecture": "amd64" + }, + { + "name": "libctf-nobfd0", + "version": "2.38-4ubuntu2.12", + "architecture": "amd64" + }, + { + "name": "libctf0", + "version": "2.38-4ubuntu2.12", + "architecture": "amd64" + }, + { + "name": "libcurl3-gnutls", + "version": "7.81.0-1ubuntu1.29", + "architecture": "amd64" + }, + { + "name": "libcurl4", + "version": "7.81.0-1ubuntu1.29", + "architecture": "amd64" + }, + { + "name": "libdatrie1", + "version": "0.2.13-2", + "architecture": "amd64" + }, + { + "name": "libdav1d5", + "version": "0.9.2-1", + "architecture": "amd64" + }, + { + "name": "libdb5.3", + "version": "5.3.28+dfsg1-0.8ubuntu3", + "architecture": "amd64" + }, + { + "name": "libdbus-1-3", + "version": "1.12.20-2ubuntu4.1", + "architecture": "amd64" + }, + { + "name": "libdc1394-25", + "version": "2.2.6-4", + "architecture": "amd64" + }, + { + "name": "libde265-0", + "version": "1.0.8-1ubuntu0.3", + "architecture": "amd64" + }, + { + "name": "libdebconfclient0", + "version": "0.261ubuntu1", + "architecture": "amd64" + }, + { + "name": "libdebuginfod-common", + "version": "0.186-1ubuntu0.1", + "architecture": "all" + }, + { + "name": "libdebuginfod1", + "version": "0.186-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libdecor-0-0", + "version": "0.1.0-3build1", + "architecture": "amd64" + }, + { + "name": "libdeflate-dev", + "version": "1.10-2", + "architecture": "amd64" + }, + { + "name": "libdeflate0", + "version": "1.10-2", + "architecture": "amd64" + }, + { + "name": "libdpkg-perl", + "version": "1.21.1ubuntu2.6", + "architecture": "all" + }, + { + "name": "libdrm-amdgpu1", + "version": "2.4.113-2~ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libdrm-common", + "version": "2.4.113-2~ubuntu0.22.04.1", + "architecture": "all" + }, + { + "name": "libdrm-intel1", + "version": "2.4.113-2~ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libdrm-nouveau2", + "version": "2.4.113-2~ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libdrm-radeon1", + "version": "2.4.113-2~ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libdrm2", + "version": "2.4.113-2~ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libdw1", + "version": "0.186-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libedit2", + "version": "3.1-20210910-1build1", + "architecture": "amd64" + }, + { + "name": "libelf1", + "version": "0.186-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "liberror-perl", + "version": "0.17029-1", + "architecture": "all" + }, + { + "name": "libespeak-ng-dev", + "version": "1.50+dfsg-10ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libespeak-ng1", + "version": "1.50+dfsg-10ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libespeak1", + "version": "1.48.15+dfsg-3", + "architecture": "amd64" + }, + { + "name": "libevent-2.1-7", + "version": "2.1.12-stable-1ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libevent-core-2.1-7", + "version": "2.1.12-stable-1ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libevent-dev", + "version": "2.1.12-stable-1ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libevent-extra-2.1-7", + "version": "2.1.12-stable-1ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libevent-openssl-2.1-7", + "version": "2.1.12-stable-1ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libevent-pthreads-2.1-7", + "version": "2.1.12-stable-1ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libexpat1", + "version": "2.4.7-1ubuntu0.9", + "architecture": "amd64" + }, + { + "name": "libext2fs2", + "version": "1.46.5-2ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "libfabric1", + "version": "1.11.0-3", + "architecture": "amd64" + }, + { + "name": "libffi8", + "version": "3.4.2-4", + "architecture": "amd64" + }, + { + "name": "libfftw3-double3", + "version": "3.3.8-2ubuntu8", + "architecture": "amd64" + }, + { + "name": "libfido2-1", + "version": "1.10.0-1", + "architecture": "amd64" + }, + { + "name": "libflac8", + "version": "1.3.3-2ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libflite1", + "version": "2.2-3", + "architecture": "amd64" + }, + { + "name": "libfontconfig1", + "version": "2.13.1-4.2ubuntu5", + "architecture": "amd64" + }, + { + "name": "libfreetype-dev", + "version": "2.11.1+dfsg-1ubuntu0.4", + "architecture": "amd64" + }, + { + "name": "libfreetype6", + "version": "2.11.1+dfsg-1ubuntu0.4", + "architecture": "amd64" + }, + { + "name": "libfreetype6-dev", + "version": "2.11.1+dfsg-1ubuntu0.4", + "architecture": "amd64" + }, + { + "name": "libfribidi0", + "version": "1.0.8-2ubuntu3.1", + "architecture": "amd64" + }, + { + "name": "libgbm1", + "version": "23.2.1-1ubuntu3.1~22.04.4", + "architecture": "amd64" + }, + { + "name": "libgc1", + "version": "1:8.0.6-1.1build1", + "architecture": "amd64" + }, + { + "name": "libgcc-11-dev", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libgcc-s1", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libgcrypt20", + "version": "1.9.4-3ubuntu3.3", + "architecture": "amd64" + }, + { + "name": "libgd3", + "version": "2.3.0-2ubuntu2.3", + "architecture": "amd64" + }, + { + "name": "libgdbm-compat4", + "version": "1.23-1", + "architecture": "amd64" + }, + { + "name": "libgdbm6", + "version": "1.23-1", + "architecture": "amd64" + }, + { + "name": "libgdk-pixbuf-2.0-0", + "version": "2.42.8+dfsg-1ubuntu0.5", + "architecture": "amd64" + }, + { + "name": "libgdk-pixbuf2.0-common", + "version": "2.42.8+dfsg-1ubuntu0.5", + "architecture": "all" + }, + { + "name": "libgfortran-11-dev", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libgfortran5", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libgif7", + "version": "5.1.9-2ubuntu0.3", + "architecture": "amd64" + }, + { + "name": "libgl1", + "version": "1.4.0-1", + "architecture": "amd64" + }, + { + "name": "libgl1-mesa-dri", + "version": "23.2.1-1ubuntu3.1~22.04.4", + "architecture": "amd64" + }, + { + "name": "libglapi-mesa", + "version": "23.2.1-1ubuntu3.1~22.04.4", + "architecture": "amd64" + }, + { + "name": "libglib2.0-0", + "version": "2.72.4-0ubuntu2.10", + "architecture": "amd64" + }, + { + "name": "libglvnd0", + "version": "1.4.0-1", + "architecture": "amd64" + }, + { + "name": "libglx-mesa0", + "version": "23.2.1-1ubuntu3.1~22.04.4", + "architecture": "amd64" + }, + { + "name": "libglx0", + "version": "1.4.0-1", + "architecture": "amd64" + }, + { + "name": "libgme0", + "version": "0.6.3-2", + "architecture": "amd64" + }, + { + "name": "libgmp10", + "version": "2:6.2.1+dfsg-3ubuntu1", + "architecture": "amd64" + }, + { + "name": "libgnutls30", + "version": "3.7.3-4ubuntu1.9", + "architecture": "amd64" + }, + { + "name": "libgomp1", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libgpg-error0", + "version": "1.43-3", + "architecture": "amd64" + }, + { + "name": "libgraphite2-3", + "version": "1.3.14-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libgsasl7", + "version": "1.10.0-5", + "architecture": "amd64" + }, + { + "name": "libgsm1", + "version": "1.0.19-1", + "architecture": "amd64" + }, + { + "name": "libgssapi-krb5-2", + "version": "1.19.2-2ubuntu0.10", + "architecture": "amd64" + }, + { + "name": "libharfbuzz0b", + "version": "2.7.4-1ubuntu3.2", + "architecture": "amd64" + }, + { + "name": "libheif1", + "version": "1.12.0-2build1", + "architecture": "amd64" + }, + { + "name": "libhogweed6", + "version": "3.7.3-1build2", + "architecture": "amd64" + }, + { + "name": "libhwloc-dev", + "version": "2.7.0-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libhwloc-plugins", + "version": "2.7.0-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libhwloc15", + "version": "2.7.0-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libibverbs-dev", + "version": "39.0-1", + "architecture": "amd64" + }, + { + "name": "libibverbs1", + "version": "39.0-1", + "architecture": "amd64" + }, + { + "name": "libicu70", + "version": "70.1-2", + "architecture": "amd64" + }, + { + "name": "libidn12", + "version": "1.38-4ubuntu1.1", + "architecture": "amd64" + }, + { + "name": "libidn2-0", + "version": "2.3.2-2build1", + "architecture": "amd64" + }, + { + "name": "libiec61883-0", + "version": "1.2.0-4build3", + "architecture": "amd64" + }, + { + "name": "libinotifytools0", + "version": "3.22.1.0-2", + "architecture": "amd64" + }, + { + "name": "libipt2", + "version": "2.0.5-1", + "architecture": "amd64" + }, + { + "name": "libisl23", + "version": "0.24-2build1", + "architecture": "amd64" + }, + { + "name": "libitm1", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libjack-jackd2-0", + "version": "1.9.20~dfsg-1", + "architecture": "amd64" + }, + { + "name": "libjbig-dev", + "version": "2.1-3.1ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libjbig0", + "version": "2.1-3.1ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libjemalloc2", + "version": "5.2.1-4ubuntu1", + "architecture": "amd64" + }, + { + "name": "libjpeg-dev", + "version": "8c-2ubuntu10", + "architecture": "amd64" + }, + { + "name": "libjpeg-turbo8", + "version": "2.1.2-0ubuntu1", + "architecture": "amd64" + }, + { + "name": "libjpeg-turbo8-dev", + "version": "2.1.2-0ubuntu1", + "architecture": "amd64" + }, + { + "name": "libjpeg8", + "version": "8c-2ubuntu10", + "architecture": "amd64" + }, + { + "name": "libjpeg8-dev", + "version": "8c-2ubuntu10", + "architecture": "amd64" + }, + { + "name": "libjq1", + "version": "1.6-2.1ubuntu3.2", + "architecture": "amd64" + }, + { + "name": "libjs-events", + "version": "3.3.0+~3.0.0-2", + "architecture": "all" + }, + { + "name": "libjs-inherits", + "version": "2.0.4-4", + "architecture": "all" + }, + { + "name": "libjs-is-typedarray", + "version": "1.0.0-4", + "architecture": "all" + }, + { + "name": "libjs-jquery", + "version": "3.6.0+dfsg+~3.5.13-1", + "architecture": "all" + }, + { + "name": "libjs-jquery-ui", + "version": "1.13.1+dfsg-1", + "architecture": "all" + }, + { + "name": "libjs-typedarray-to-buffer", + "version": "4.0.0-2", + "architecture": "all" + }, + { + "name": "libjsoncpp25", + "version": "1.9.5-3", + "architecture": "amd64" + }, + { + "name": "libk5crypto3", + "version": "1.19.2-2ubuntu0.10", + "architecture": "amd64" + }, + { + "name": "libkeyutils1", + "version": "1.6.1-2ubuntu3", + "architecture": "amd64" + }, + { + "name": "libkrb5-3", + "version": "1.19.2-2ubuntu0.10", + "architecture": "amd64" + }, + { + "name": "libkrb5support0", + "version": "1.19.2-2ubuntu0.10", + "architecture": "amd64" + }, + { + "name": "liblapack-dev", + "version": "3.10.0-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "liblapack3", + "version": "3.10.0-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "liblcms2-2", + "version": "2.12~rc1-2ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libldap-2.5-0", + "version": "2.5.20+dfsg-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "liblept5", + "version": "1.82.0-3build1", + "architecture": "amd64" + }, + { + "name": "liblilv-0-0", + "version": "0.24.12-2", + "architecture": "amd64" + }, + { + "name": "libllvm15", + "version": "1:15.0.7-0ubuntu0.22.04.3", + "architecture": "amd64" + }, + { + "name": "liblqr-1-0", + "version": "0.4.2-2.1", + "architecture": "amd64" + }, + { + "name": "liblsan0", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libltdl-dev", + "version": "2.4.6-15build2", + "architecture": "amd64" + }, + { + "name": "libltdl7", + "version": "2.4.6-15build2", + "architecture": "amd64" + }, + { + "name": "liblua5.1-0", + "version": "5.1.5-8.1build4", + "architecture": "amd64" + }, + { + "name": "liblz4-1", + "version": "1.9.3-2build2", + "architecture": "amd64" + }, + { + "name": "liblzf1", + "version": "3.6-3", + "architecture": "amd64" + }, + { + "name": "liblzma-dev", + "version": "5.2.5-2ubuntu1.1", + "architecture": "amd64" + }, + { + "name": "liblzma5", + "version": "5.2.5-2ubuntu1.1", + "architecture": "amd64" + }, + { + "name": "libmagic-mgc", + "version": "1:5.41-3ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libmagic1", + "version": "1:5.41-3ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libmagickcore-6.q16-6", + "version": "8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5", + "architecture": "amd64" + }, + { + "name": "libmagickwand-6.q16-6", + "version": "8:6.9.11.60+dfsg-1.3ubuntu0.22.04.5", + "architecture": "amd64" + }, + { + "name": "libmailutils8", + "version": "1:3.14-1", + "architecture": "amd64" + }, + { + "name": "libmariadb3", + "version": "1:10.6.23-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libmaxminddb0", + "version": "1.5.2-1build2", + "architecture": "amd64" + }, + { + "name": "libmd0", + "version": "1.0.4-1build1", + "architecture": "amd64" + }, + { + "name": "libmfx1", + "version": "22.3.0-1", + "architecture": "amd64" + }, + { + "name": "libmnl0", + "version": "1.0.4-3build2", + "architecture": "amd64" + }, + { + "name": "libmount1", + "version": "2.37.2-4ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "libmp3lame0", + "version": "3.100-3build2", + "architecture": "amd64" + }, + { + "name": "libmpc3", + "version": "1.2.1-2build1", + "architecture": "amd64" + }, + { + "name": "libmpdec3", + "version": "2.5.1-2build2", + "architecture": "amd64" + }, + { + "name": "libmpfr6", + "version": "4.1.0-3build3", + "architecture": "amd64" + }, + { + "name": "libmpg123-0", + "version": "1.29.3-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libmysofa1", + "version": "1.2.1~dfsg0-1", + "architecture": "amd64" + }, + { + "name": "libmysqlclient21", + "version": "8.0.46-0ubuntu0.22.04.4", + "architecture": "amd64" + }, + { + "name": "libncurses6", + "version": "6.3-2ubuntu0.3", + "architecture": "amd64" + }, + { + "name": "libncursesw6", + "version": "6.3-2ubuntu0.3", + "architecture": "amd64" + }, + { + "name": "libnettle8", + "version": "3.7.3-1build2", + "architecture": "amd64" + }, + { + "name": "libnghttp2-14", + "version": "1.43.0-1ubuntu0.4", + "architecture": "amd64" + }, + { + "name": "libnginx-mod-http-geoip2", + "version": "1.18.0-6ubuntu14.21", + "architecture": "amd64" + }, + { + "name": "libnginx-mod-http-image-filter", + "version": "1.18.0-6ubuntu14.21", + "architecture": "amd64" + }, + { + "name": "libnginx-mod-http-xslt-filter", + "version": "1.18.0-6ubuntu14.21", + "architecture": "amd64" + }, + { + "name": "libnginx-mod-mail", + "version": "1.18.0-6ubuntu14.21", + "architecture": "amd64" + }, + { + "name": "libnginx-mod-stream", + "version": "1.18.0-6ubuntu14.21", + "architecture": "amd64" + }, + { + "name": "libnginx-mod-stream-geoip2", + "version": "1.18.0-6ubuntu14.21", + "architecture": "amd64" + }, + { + "name": "libnl-3-200", + "version": "3.5.0-0.1", + "architecture": "amd64" + }, + { + "name": "libnl-3-dev", + "version": "3.5.0-0.1", + "architecture": "amd64" + }, + { + "name": "libnl-route-3-200", + "version": "3.5.0-0.1", + "architecture": "amd64" + }, + { + "name": "libnl-route-3-dev", + "version": "3.5.0-0.1", + "architecture": "amd64" + }, + { + "name": "libnode-dev", + "version": "12.22.9~dfsg-1ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "libnode72", + "version": "12.22.9~dfsg-1ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "libnorm1", + "version": "1.5.9+dfsg-2", + "architecture": "amd64" + }, + { + "name": "libnsl-dev", + "version": "1.3.0-2build2", + "architecture": "amd64" + }, + { + "name": "libnsl2", + "version": "1.3.0-2build2", + "architecture": "amd64" + }, + { + "name": "libntlm0", + "version": "1.6-4", + "architecture": "amd64" + }, + { + "name": "libnuma-dev", + "version": "2.0.14-3ubuntu2", + "architecture": "amd64" + }, + { + "name": "libnuma1", + "version": "2.0.14-3ubuntu2", + "architecture": "amd64" + }, + { + "name": "libogg0", + "version": "1.3.5-0ubuntu3", + "architecture": "amd64" + }, + { + "name": "libonig5", + "version": "6.9.7.1-2build1", + "architecture": "amd64" + }, + { + "name": "libopenal-data", + "version": "1:1.19.1-2build3", + "architecture": "all" + }, + { + "name": "libopenal1", + "version": "1:1.19.1-2build3", + "architecture": "amd64" + }, + { + "name": "libopenblas-dev", + "version": "0.3.20+ds-1", + "architecture": "amd64" + }, + { + "name": "libopenblas-pthread-dev", + "version": "0.3.20+ds-1", + "architecture": "amd64" + }, + { + "name": "libopenblas0", + "version": "0.3.20+ds-1", + "architecture": "amd64" + }, + { + "name": "libopenblas0-pthread", + "version": "0.3.20+ds-1", + "architecture": "amd64" + }, + { + "name": "libopenjp2-7", + "version": "2.4.0-6ubuntu0.5", + "architecture": "amd64" + }, + { + "name": "libopenmpi-dev", + "version": "4.1.2-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libopenmpi3", + "version": "4.1.2-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libopenmpt0", + "version": "0.6.1-1", + "architecture": "amd64" + }, + { + "name": "libopus0", + "version": "1.3.1-0.1build2", + "architecture": "amd64" + }, + { + "name": "libp11-kit0", + "version": "0.24.0-6ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libpam-modules", + "version": "1.4.0-11ubuntu2.8", + "architecture": "amd64" + }, + { + "name": "libpam-modules-bin", + "version": "1.4.0-11ubuntu2.8", + "architecture": "amd64" + }, + { + "name": "libpam-runtime", + "version": "1.4.0-11ubuntu2.8", + "architecture": "all" + }, + { + "name": "libpam0g", + "version": "1.4.0-11ubuntu2.8", + "architecture": "amd64" + }, + { + "name": "libpango-1.0-0", + "version": "1.50.6+ds-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libpangocairo-1.0-0", + "version": "1.50.6+ds-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libpangoft2-1.0-0", + "version": "1.50.6+ds-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libpcaudio0", + "version": "1.1-6build2", + "architecture": "amd64" + }, + { + "name": "libpciaccess0", + "version": "0.16-3", + "architecture": "amd64" + }, + { + "name": "libpcre2-8-0", + "version": "10.39-3ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libpcre3", + "version": "2:8.39-13ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libperl5.34", + "version": "5.34.0-3ubuntu1.9", + "architecture": "amd64" + }, + { + "name": "libpgm-5.3-0", + "version": "5.3.128~dfsg-2", + "architecture": "amd64" + }, + { + "name": "libpixman-1-0", + "version": "0.40.0-1ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libpmix-dev", + "version": "4.1.2-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libpmix2", + "version": "4.1.2-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "libpng-dev", + "version": "1.6.37-3ubuntu0.7", + "architecture": "amd64" + }, + { + "name": "libpng16-16", + "version": "1.6.37-3ubuntu0.7", + "architecture": "amd64" + }, + { + "name": "libpocketsphinx3", + "version": "0.8.0+real5prealpha+1-14ubuntu1", + "architecture": "amd64" + }, + { + "name": "libportaudio2", + "version": "19.6.0-1.1", + "architecture": "amd64" + }, + { + "name": "libpostproc55", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libpq5", + "version": "14.24-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libprocps8", + "version": "2:3.3.17-6ubuntu2.1", + "architecture": "amd64" + }, + { + "name": "libpsl5", + "version": "0.21.0-1.2build2", + "architecture": "amd64" + }, + { + "name": "libpsm-infinipath1", + "version": "3.3+20.604758e7-6.1", + "architecture": "amd64" + }, + { + "name": "libpsm2-2", + "version": "11.2.185-1", + "architecture": "amd64" + }, + { + "name": "libpulse0", + "version": "1:15.99.1+dfsg1-1ubuntu2.2", + "architecture": "amd64" + }, + { + "name": "libpython3-stdlib", + "version": "3.10.6-1~22.04.1", + "architecture": "amd64" + }, + { + "name": "libpython3.10", + "version": "3.10.12-1~22.04.18", + "architecture": "amd64" + }, + { + "name": "libpython3.10-minimal", + "version": "3.10.12-1~22.04.18", + "architecture": "amd64" + }, + { + "name": "libpython3.10-stdlib", + "version": "3.10.12-1~22.04.18", + "architecture": "amd64" + }, + { + "name": "libquadmath0", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "librabbitmq4", + "version": "0.10.0-1ubuntu2.2", + "architecture": "amd64" + }, + { + "name": "libraw1394-11", + "version": "2.1.2-2build2", + "architecture": "amd64" + }, + { + "name": "librdmacm1", + "version": "39.0-1", + "architecture": "amd64" + }, + { + "name": "libreadline8", + "version": "8.1.2-1", + "architecture": "amd64" + }, + { + "name": "librhash0", + "version": "1.4.2-1ubuntu1", + "architecture": "amd64" + }, + { + "name": "librsvg2-2", + "version": "2.52.5+dfsg-3ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "librtmp1", + "version": "2.4+20151223.gitfa8646d.1-2build4", + "architecture": "amd64" + }, + { + "name": "librubberband2", + "version": "2.0.0-2", + "architecture": "amd64" + }, + { + "name": "libsamplerate0", + "version": "0.2.2-1build1", + "architecture": "amd64" + }, + { + "name": "libsasl2-2", + "version": "2.1.27+dfsg2-3ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "libsasl2-modules-db", + "version": "2.1.27+dfsg2-3ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "libsdl2-2.0-0", + "version": "2.0.20+dfsg-2ubuntu1.22.04.1", + "architecture": "amd64" + }, + { + "name": "libseccomp2", + "version": "2.5.3-2ubuntu3~22.04.1", + "architecture": "amd64" + }, + { + "name": "libselinux1", + "version": "3.3-1build2", + "architecture": "amd64" + }, + { + "name": "libsemanage-common", + "version": "3.3-1build2", + "architecture": "all" + }, + { + "name": "libsemanage2", + "version": "3.3-1build2", + "architecture": "amd64" + }, + { + "name": "libsensors-config", + "version": "1:3.6.0-7ubuntu1", + "architecture": "all" + }, + { + "name": "libsensors5", + "version": "1:3.6.0-7ubuntu1", + "architecture": "amd64" + }, + { + "name": "libsepol2", + "version": "3.3-1build1", + "architecture": "amd64" + }, + { + "name": "libserd-0-0", + "version": "0.30.10-2", + "architecture": "amd64" + }, + { + "name": "libshine3", + "version": "3.1.1-2", + "architecture": "amd64" + }, + { + "name": "libsigsegv2", + "version": "2.13-1ubuntu3", + "architecture": "amd64" + }, + { + "name": "libslang2", + "version": "2.3.2-5build4", + "architecture": "amd64" + }, + { + "name": "libsmartcols1", + "version": "2.37.2-4ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "libsnappy1v5", + "version": "1.1.8-1build3", + "architecture": "amd64" + }, + { + "name": "libsndfile1", + "version": "1.0.31-2ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libsndio7.0", + "version": "1.8.1-1.1", + "architecture": "amd64" + }, + { + "name": "libsodium23", + "version": "1.0.18-1ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libsonic0", + "version": "0.2.0-11build1", + "architecture": "amd64" + }, + { + "name": "libsord-0-0", + "version": "0.16.8-2", + "architecture": "amd64" + }, + { + "name": "libsource-highlight-common", + "version": "3.1.9-4.1build2", + "architecture": "all" + }, + { + "name": "libsource-highlight4v5", + "version": "3.1.9-4.1build2", + "architecture": "amd64" + }, + { + "name": "libsoxr0", + "version": "0.1.3-4build2", + "architecture": "amd64" + }, + { + "name": "libspeex1", + "version": "1.2~rc1.2-1.1ubuntu3", + "architecture": "amd64" + }, + { + "name": "libsphinxbase3", + "version": "0.8+5prealpha+1-13build1", + "architecture": "amd64" + }, + { + "name": "libsqlite3-0", + "version": "3.37.2-2ubuntu0.8", + "architecture": "amd64" + }, + { + "name": "libsqlite3-dev", + "version": "3.37.2-2ubuntu0.8", + "architecture": "amd64" + }, + { + "name": "libsratom-0-0", + "version": "0.6.8-1", + "architecture": "amd64" + }, + { + "name": "libsrt1.4-gnutls", + "version": "1.4.4-4", + "architecture": "amd64" + }, + { + "name": "libss2", + "version": "1.46.5-2ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "libssh-4", + "version": "0.9.6-2ubuntu0.22.04.8", + "architecture": "amd64" + }, + { + "name": "libssh-gcrypt-4", + "version": "0.9.6-2ubuntu0.22.04.8", + "architecture": "amd64" + }, + { + "name": "libssh2-1", + "version": "1.10.0-3ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libssl-dev", + "version": "3.0.2-0ubuntu1.30", + "architecture": "amd64" + }, + { + "name": "libssl3", + "version": "3.0.2-0ubuntu1.30", + "architecture": "amd64" + }, + { + "name": "libstd-rust-1.75", + "version": "1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libstd-rust-dev", + "version": "1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libstdc++-11-dev", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libstdc++6", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libswresample3", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libswscale5", + "version": "7:4.4.2-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "libsystemd0", + "version": "249.11-0ubuntu3.22", + "architecture": "amd64" + }, + { + "name": "libtasn1-6", + "version": "4.18.0-4ubuntu0.2", + "architecture": "amd64" + }, + { + "name": "libtcl8.6", + "version": "8.6.12+dfsg-1build1", + "architecture": "amd64" + }, + { + "name": "libtesseract4", + "version": "4.1.1-2.1build1", + "architecture": "amd64" + }, + { + "name": "libthai-data", + "version": "0.1.29-1build1", + "architecture": "all" + }, + { + "name": "libthai0", + "version": "0.1.29-1build1", + "architecture": "amd64" + }, + { + "name": "libtheora0", + "version": "1.1.1+dfsg.1-15ubuntu4", + "architecture": "amd64" + }, + { + "name": "libtiff-dev", + "version": "4.3.0-6ubuntu0.13", + "architecture": "amd64" + }, + { + "name": "libtiff5", + "version": "4.3.0-6ubuntu0.13", + "architecture": "amd64" + }, + { + "name": "libtiffxx5", + "version": "4.3.0-6ubuntu0.13", + "architecture": "amd64" + }, + { + "name": "libtinfo6", + "version": "6.3-2ubuntu0.3", + "architecture": "amd64" + }, + { + "name": "libtirpc-common", + "version": "1.3.2-2ubuntu0.1", + "architecture": "all" + }, + { + "name": "libtirpc-dev", + "version": "1.3.2-2ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libtirpc3", + "version": "1.3.2-2ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libtool", + "version": "2.4.6-15build2", + "architecture": "all" + }, + { + "name": "libtsan0", + "version": "11.4.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libtwolame0", + "version": "0.4.0-2build2", + "architecture": "amd64" + }, + { + "name": "libubsan1", + "version": "12.3.0-1ubuntu1~22.04.3", + "architecture": "amd64" + }, + { + "name": "libucl1", + "version": "1.03+repack-6", + "architecture": "amd64" + }, + { + "name": "libucx0", + "version": "1.12.1~rc2-1", + "architecture": "amd64" + }, + { + "name": "libudev1", + "version": "249.11-0ubuntu3.22", + "architecture": "amd64" + }, + { + "name": "libudfread0", + "version": "1.1.2-1", + "architecture": "amd64" + }, + { + "name": "libunistring2", + "version": "1.0-1", + "architecture": "amd64" + }, + { + "name": "libusb-1.0-0", + "version": "2:1.0.25-1ubuntu2", + "architecture": "amd64" + }, + { + "name": "libuuid1", + "version": "2.37.2-4ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "libuv1", + "version": "1.43.0-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libuv1-dev", + "version": "1.43.0-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libva-drm2", + "version": "2.14.0-1", + "architecture": "amd64" + }, + { + "name": "libva-x11-2", + "version": "2.14.0-1", + "architecture": "amd64" + }, + { + "name": "libva2", + "version": "2.14.0-1", + "architecture": "amd64" + }, + { + "name": "libvdpau1", + "version": "1.4-3build2", + "architecture": "amd64" + }, + { + "name": "libvidstab1.1", + "version": "1.1.0-2", + "architecture": "amd64" + }, + { + "name": "libvorbis0a", + "version": "1.3.7-1build2", + "architecture": "amd64" + }, + { + "name": "libvorbisenc2", + "version": "1.3.7-1build2", + "architecture": "amd64" + }, + { + "name": "libvorbisfile3", + "version": "1.3.7-1build2", + "architecture": "amd64" + }, + { + "name": "libvpx7", + "version": "1.11.0-2ubuntu2.5", + "architecture": "amd64" + }, + { + "name": "libwayland-client0", + "version": "1.20.0-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libwayland-cursor0", + "version": "1.20.0-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libwayland-egl1", + "version": "1.20.0-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libwayland-server0", + "version": "1.20.0-1ubuntu0.1", + "architecture": "amd64" + }, + { + "name": "libwebp-dev", + "version": "1.2.2-2ubuntu0.22.04.2", + "architecture": "amd64" + }, + { + "name": "libwebp7", + "version": "1.2.2-2ubuntu0.22.04.2", + "architecture": "amd64" + }, + { + "name": "libwebpdemux2", + "version": "1.2.2-2ubuntu0.22.04.2", + "architecture": "amd64" + }, + { + "name": "libwebpmux3", + "version": "1.2.2-2ubuntu0.22.04.2", + "architecture": "amd64" + }, + { + "name": "libwrap0", + "version": "7.6.q-31build2", + "architecture": "amd64" + }, + { + "name": "libx11-6", + "version": "2:1.7.5-1ubuntu0.3", + "architecture": "amd64" + }, + { + "name": "libx11-data", + "version": "2:1.7.5-1ubuntu0.3", + "architecture": "all" + }, + { + "name": "libx11-xcb1", + "version": "2:1.7.5-1ubuntu0.3", + "architecture": "amd64" + }, + { + "name": "libx264-163", + "version": "2:0.163.3060+git5db6aa6-2build1", + "architecture": "amd64" + }, + { + "name": "libx265-199", + "version": "3.5-2", + "architecture": "amd64" + }, + { + "name": "libxau6", + "version": "1:1.0.9-1build5", + "architecture": "amd64" + }, + { + "name": "libxcb-dri2-0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-dri3-0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-glx0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-present0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-randr0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-render0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-shape0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-shm0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-sync1", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb-xfixes0", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcb1", + "version": "1.14-3ubuntu3", + "architecture": "amd64" + }, + { + "name": "libxcursor1", + "version": "1:1.2.0-2build4", + "architecture": "amd64" + }, + { + "name": "libxdmcp6", + "version": "1:1.1.3-0ubuntu5", + "architecture": "amd64" + }, + { + "name": "libxext6", + "version": "2:1.3.4-1build1", + "architecture": "amd64" + }, + { + "name": "libxfixes3", + "version": "1:6.0.0-1", + "architecture": "amd64" + }, + { + "name": "libxi6", + "version": "2:1.8-1build1", + "architecture": "amd64" + }, + { + "name": "libxinerama1", + "version": "2:1.1.4-3", + "architecture": "amd64" + }, + { + "name": "libxkbcommon0", + "version": "1.4.0-1", + "architecture": "amd64" + }, + { + "name": "libxml2", + "version": "2.9.13+dfsg-1ubuntu0.14", + "architecture": "amd64" + }, + { + "name": "libxnvctrl0", + "version": "510.47.03-0ubuntu1.22.04.1", + "architecture": "amd64" + }, + { + "name": "libxpm4", + "version": "1:3.5.12-1ubuntu0.22.04.4", + "architecture": "amd64" + }, + { + "name": "libxrandr2", + "version": "2:1.5.2-1build1", + "architecture": "amd64" + }, + { + "name": "libxrender1", + "version": "1:0.9.10-1build4", + "architecture": "amd64" + }, + { + "name": "libxshmfence1", + "version": "1.3-1build4", + "architecture": "amd64" + }, + { + "name": "libxslt1.1", + "version": "1.1.34-4ubuntu0.22.04.5", + "architecture": "amd64" + }, + { + "name": "libxss1", + "version": "1:1.2.3-1build2", + "architecture": "amd64" + }, + { + "name": "libxtables12", + "version": "1.8.7-1ubuntu5.2", + "architecture": "amd64" + }, + { + "name": "libxv1", + "version": "2:1.0.11-1build2", + "architecture": "amd64" + }, + { + "name": "libxvidcore4", + "version": "2:1.3.7-1", + "architecture": "amd64" + }, + { + "name": "libxxf86vm1", + "version": "1:1.1.4-1build3", + "architecture": "amd64" + }, + { + "name": "libxxhash0", + "version": "0.8.1-1", + "architecture": "amd64" + }, + { + "name": "libzimg2", + "version": "3.0.3+ds1-1", + "architecture": "amd64" + }, + { + "name": "libzmq5", + "version": "4.3.4-2", + "architecture": "amd64" + }, + { + "name": "libzstd1", + "version": "1.4.8+dfsg-3build1", + "architecture": "amd64" + }, + { + "name": "libzvbi-common", + "version": "0.2.35-19", + "architecture": "all" + }, + { + "name": "libzvbi0", + "version": "0.2.35-19", + "architecture": "amd64" + }, + { + "name": "linux-libc-dev", + "version": "5.15.0-198.208", + "architecture": "amd64" + }, + { + "name": "login", + "version": "1:4.8.1-2ubuntu2.2", + "architecture": "amd64" + }, + { + "name": "logsave", + "version": "1.46.5-2ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "lsb-base", + "version": "11.1.0ubuntu4", + "architecture": "all" + }, + { + "name": "lto-disabled-list", + "version": "24", + "architecture": "all" + }, + { + "name": "lua-bitop", + "version": "1.0.2-5", + "architecture": "amd64" + }, + { + "name": "lua-cjson", + "version": "2.1.0+dfsg-2.1", + "architecture": "amd64" + }, + { + "name": "m4", + "version": "1.4.18-5ubuntu2", + "architecture": "amd64" + }, + { + "name": "mailutils", + "version": "1:3.14-1", + "architecture": "amd64" + }, + { + "name": "mailutils-common", + "version": "1:3.14-1", + "architecture": "all" + }, + { + "name": "make", + "version": "4.3-4.1build1", + "architecture": "amd64" + }, + { + "name": "mariadb-client", + "version": "1:10.6.23-0ubuntu0.22.04.1", + "architecture": "all" + }, + { + "name": "mariadb-client-10.6", + "version": "1:10.6.23-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "mariadb-client-core-10.6", + "version": "1:10.6.23-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "mariadb-common", + "version": "1:10.6.23-0ubuntu0.22.04.1", + "architecture": "all" + }, + { + "name": "mawk", + "version": "1.3.4.20200120-3", + "architecture": "amd64" + }, + { + "name": "media-types", + "version": "7.0.0", + "architecture": "all" + }, + { + "name": "mount", + "version": "2.37.2-4ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "mysql-common", + "version": "5.8+1.0.8", + "architecture": "all" + }, + { + "name": "nasm", + "version": "2.15.05-1", + "architecture": "amd64" + }, + { + "name": "ncurses-base", + "version": "6.3-2ubuntu0.3", + "architecture": "all" + }, + { + "name": "ncurses-bin", + "version": "6.3-2ubuntu0.3", + "architecture": "amd64" + }, + { + "name": "netbase", + "version": "6.3", + "architecture": "all" + }, + { + "name": "netcat-openbsd", + "version": "1.218-4ubuntu1", + "architecture": "amd64" + }, + { + "name": "nginx", + "version": "1.18.0-6ubuntu14.21", + "architecture": "amd64" + }, + { + "name": "nginx-common", + "version": "1.18.0-6ubuntu14.21", + "architecture": "all" + }, + { + "name": "nginx-core", + "version": "1.18.0-6ubuntu14.21", + "architecture": "amd64" + }, + { + "name": "node-abbrev", + "version": "1.1.1+~1.1.2-1", + "architecture": "all" + }, + { + "name": "node-agent-base", + "version": "6.0.2+~cs5.4.2-1", + "architecture": "all" + }, + { + "name": "node-ansi-regex", + "version": "5.0.1-1", + "architecture": "all" + }, + { + "name": "node-ansi-styles", + "version": "4.3.0+~4.2.0-1", + "architecture": "all" + }, + { + "name": "node-ansistyles", + "version": "0.1.3-5", + "architecture": "all" + }, + { + "name": "node-aproba", + "version": "2.0.0-2", + "architecture": "all" + }, + { + "name": "node-archy", + "version": "1.0.0-4", + "architecture": "all" + }, + { + "name": "node-are-we-there-yet", + "version": "3.0.0+~1.1.0-1", + "architecture": "all" + }, + { + "name": "node-asap", + "version": "2.0.6+~2.0.0-1", + "architecture": "all" + }, + { + "name": "node-balanced-match", + "version": "2.0.0-1", + "architecture": "all" + }, + { + "name": "node-brace-expansion", + "version": "2.0.1-1", + "architecture": "all" + }, + { + "name": "node-builtins", + "version": "4.0.0-1", + "architecture": "all" + }, + { + "name": "node-cacache", + "version": "15.0.5+~cs13.9.21-3", + "architecture": "all" + }, + { + "name": "node-chalk", + "version": "4.1.2-1", + "architecture": "all" + }, + { + "name": "node-chownr", + "version": "2.0.0-1", + "architecture": "all" + }, + { + "name": "node-cli-table", + "version": "0.3.11+~cs0.13.3-1", + "architecture": "all" + }, + { + "name": "node-clone", + "version": "2.1.2-3", + "architecture": "all" + }, + { + "name": "node-color-convert", + "version": "2.0.1-1", + "architecture": "all" + }, + { + "name": "node-color-name", + "version": "1.1.4+~1.1.1-2", + "architecture": "all" + }, + { + "name": "node-colors", + "version": "1.4.0-3", + "architecture": "all" + }, + { + "name": "node-columnify", + "version": "1.5.4+~1.5.1-1", + "architecture": "all" + }, + { + "name": "node-console-control-strings", + "version": "1.1.0-2", + "architecture": "all" + }, + { + "name": "node-copy-concurrently", + "version": "1.0.5-8", + "architecture": "all" + }, + { + "name": "node-core-util-is", + "version": "1.0.3-1", + "architecture": "all" + }, + { + "name": "node-debug", + "version": "4.3.2+~cs4.1.7-1", + "architecture": "all" + }, + { + "name": "node-decompress-response", + "version": "6.0.0-2", + "architecture": "all" + }, + { + "name": "node-defaults", + "version": "1.0.3+~1.0.3-1", + "architecture": "all" + }, + { + "name": "node-delegates", + "version": "1.0.0-3", + "architecture": "all" + }, + { + "name": "node-depd", + "version": "2.0.0-2", + "architecture": "all" + }, + { + "name": "node-encoding", + "version": "0.1.13-2", + "architecture": "all" + }, + { + "name": "node-end-of-stream", + "version": "1.4.4+~1.4.1-1", + "architecture": "all" + }, + { + "name": "node-err-code", + "version": "2.0.3+dfsg-3", + "architecture": "all" + }, + { + "name": "node-escape-string-regexp", + "version": "4.0.0-2", + "architecture": "all" + }, + { + "name": "node-events", + "version": "3.3.0+~3.0.0-2", + "architecture": "all" + }, + { + "name": "node-fancy-log", + "version": "1.3.3+~cs1.3.1-2", + "architecture": "all" + }, + { + "name": "node-fs-write-stream-atomic", + "version": "1.0.10-5", + "architecture": "all" + }, + { + "name": "node-fs.realpath", + "version": "1.0.0-2", + "architecture": "all" + }, + { + "name": "node-function-bind", + "version": "1.1.1+repacked+~1.0.3-1", + "architecture": "all" + }, + { + "name": "node-gauge", + "version": "4.0.2-1", + "architecture": "all" + }, + { + "name": "node-get-stream", + "version": "6.0.1-1", + "architecture": "all" + }, + { + "name": "node-glob", + "version": "7.2.1+~cs7.6.15-1", + "architecture": "all" + }, + { + "name": "node-got", + "version": "11.8.3+~cs58.7.37-1", + "architecture": "all" + }, + { + "name": "node-graceful-fs", + "version": "4.2.4+repack-1", + "architecture": "all" + }, + { + "name": "node-gyp", + "version": "8.4.1-1", + "architecture": "all" + }, + { + "name": "node-has-flag", + "version": "4.0.0-2", + "architecture": "all" + }, + { + "name": "node-has-unicode", + "version": "2.0.1-4", + "architecture": "all" + }, + { + "name": "node-hosted-git-info", + "version": "4.0.2-1", + "architecture": "all" + }, + { + "name": "node-https-proxy-agent", + "version": "5.0.0+~cs8.0.0-3", + "architecture": "all" + }, + { + "name": "node-iconv-lite", + "version": "0.6.3-2", + "architecture": "all" + }, + { + "name": "node-iferr", + "version": "1.0.2+~1.0.2-1", + "architecture": "all" + }, + { + "name": "node-imurmurhash", + "version": "0.1.4+dfsg+~0.1.1-1", + "architecture": "all" + }, + { + "name": "node-indent-string", + "version": "4.0.0-2", + "architecture": "all" + }, + { + "name": "node-inflight", + "version": "1.0.6-2", + "architecture": "all" + }, + { + "name": "node-inherits", + "version": "2.0.4-4", + "architecture": "all" + }, + { + "name": "node-ini", + "version": "2.0.1-1", + "architecture": "all" + }, + { + "name": "node-ip", + "version": "1.1.5+~1.1.0-1", + "architecture": "all" + }, + { + "name": "node-ip-regex", + "version": "4.3.0+~4.1.1-1", + "architecture": "all" + }, + { + "name": "node-is-typedarray", + "version": "1.0.0-4", + "architecture": "all" + }, + { + "name": "node-isarray", + "version": "2.0.5-3", + "architecture": "all" + }, + { + "name": "node-isexe", + "version": "2.0.0+~2.0.1-4", + "architecture": "all" + }, + { + "name": "node-json-buffer", + "version": "3.0.1-1", + "architecture": "all" + }, + { + "name": "node-json-parse-better-errors", + "version": "1.0.2+~cs3.3.1-1", + "architecture": "all" + }, + { + "name": "node-jsonparse", + "version": "1.3.1-10", + "architecture": "all" + }, + { + "name": "node-lowercase-keys", + "version": "2.0.0-2", + "architecture": "all" + }, + { + "name": "node-lru-cache", + "version": "6.0.0+~5.1.1-1", + "architecture": "all" + }, + { + "name": "node-mimic-response", + "version": "3.1.0-7", + "architecture": "all" + }, + { + "name": "node-minimatch", + "version": "3.1.1+~3.0.5-1", + "architecture": "all" + }, + { + "name": "node-minipass", + "version": "3.1.6+~cs8.7.18-1", + "architecture": "all" + }, + { + "name": "node-mkdirp", + "version": "1.0.4+~1.0.2-1", + "architecture": "all" + }, + { + "name": "node-move-concurrently", + "version": "1.0.1-4", + "architecture": "all" + }, + { + "name": "node-ms", + "version": "2.1.3+~cs0.7.31-2", + "architecture": "all" + }, + { + "name": "node-mute-stream", + "version": "0.0.8+~0.0.1-1", + "architecture": "all" + }, + { + "name": "node-negotiator", + "version": "0.6.2+~0.6.1-1", + "architecture": "all" + }, + { + "name": "node-nopt", + "version": "5.0.0-2", + "architecture": "all" + }, + { + "name": "node-normalize-package-data", + "version": "3.0.3+~2.4.1-1", + "architecture": "all" + }, + { + "name": "node-npm-bundled", + "version": "1.1.2-1", + "architecture": "all" + }, + { + "name": "node-npm-package-arg", + "version": "8.1.5-1", + "architecture": "all" + }, + { + "name": "node-npmlog", + "version": "6.0.1+~4.1.4-1", + "architecture": "all" + }, + { + "name": "node-object-assign", + "version": "4.1.1-6", + "architecture": "all" + }, + { + "name": "node-once", + "version": "1.4.0-4", + "architecture": "all" + }, + { + "name": "node-osenv", + "version": "0.1.5+~0.1.0-1", + "architecture": "all" + }, + { + "name": "node-p-cancelable", + "version": "2.1.1-1", + "architecture": "all" + }, + { + "name": "node-p-map", + "version": "4.0.0+~3.1.0+~3.0.1-1", + "architecture": "all" + }, + { + "name": "node-path-is-absolute", + "version": "2.0.0-2", + "architecture": "all" + }, + { + "name": "node-process-nextick-args", + "version": "2.0.1-2", + "architecture": "all" + }, + { + "name": "node-promise-inflight", + "version": "1.0.1+~1.0.0-1", + "architecture": "all" + }, + { + "name": "node-promise-retry", + "version": "2.0.1-2", + "architecture": "all" + }, + { + "name": "node-promzard", + "version": "0.3.0-2", + "architecture": "all" + }, + { + "name": "node-pump", + "version": "3.0.0-5", + "architecture": "all" + }, + { + "name": "node-quick-lru", + "version": "5.1.1-1", + "architecture": "all" + }, + { + "name": "node-read", + "version": "1.0.7-3", + "architecture": "all" + }, + { + "name": "node-read-package-json", + "version": "4.1.1-1", + "architecture": "all" + }, + { + "name": "node-readable-stream", + "version": "3.6.0+~cs3.0.0-1", + "architecture": "all" + }, + { + "name": "node-resolve", + "version": "1.20.0+~cs5.27.9-1", + "architecture": "all" + }, + { + "name": "node-retry", + "version": "0.13.1+~0.12.1-1", + "architecture": "all" + }, + { + "name": "node-rimraf", + "version": "3.0.2-1", + "architecture": "all" + }, + { + "name": "node-run-queue", + "version": "2.0.0-2", + "architecture": "all" + }, + { + "name": "node-safe-buffer", + "version": "5.2.1+~cs2.1.2-2", + "architecture": "all" + }, + { + "name": "node-semver", + "version": "7.3.5+~7.3.8-1", + "architecture": "all" + }, + { + "name": "node-set-blocking", + "version": "2.0.0-2", + "architecture": "all" + }, + { + "name": "node-signal-exit", + "version": "3.0.6+~3.0.1-1", + "architecture": "all" + }, + { + "name": "node-slash", + "version": "3.0.0-2", + "architecture": "all" + }, + { + "name": "node-slice-ansi", + "version": "5.0.0+~cs9.0.0-4", + "architecture": "all" + }, + { + "name": "node-spdx-correct", + "version": "3.1.1-2", + "architecture": "all" + }, + { + "name": "node-spdx-exceptions", + "version": "2.3.0-2", + "architecture": "all" + }, + { + "name": "node-spdx-expression-parse", + "version": "3.0.1+~3.0.1-1", + "architecture": "all" + }, + { + "name": "node-spdx-license-ids", + "version": "3.0.11-1", + "architecture": "all" + }, + { + "name": "node-ssri", + "version": "8.0.1-2", + "architecture": "all" + }, + { + "name": "node-string-decoder", + "version": "1.3.0-5", + "architecture": "all" + }, + { + "name": "node-string-width", + "version": "4.2.3+~cs13.2.3-1", + "architecture": "all" + }, + { + "name": "node-strip-ansi", + "version": "6.0.1-1", + "architecture": "all" + }, + { + "name": "node-supports-color", + "version": "8.1.1+~8.1.1-1", + "architecture": "all" + }, + { + "name": "node-tar", + "version": "6.1.11+ds1+~cs6.0.6-1", + "architecture": "all" + }, + { + "name": "node-text-table", + "version": "0.2.0-4", + "architecture": "all" + }, + { + "name": "node-time-stamp", + "version": "2.2.0-1", + "architecture": "all" + }, + { + "name": "node-typedarray-to-buffer", + "version": "4.0.0-2", + "architecture": "all" + }, + { + "name": "node-unique-filename", + "version": "1.1.1+ds-1", + "architecture": "all" + }, + { + "name": "node-util-deprecate", + "version": "1.0.2-3", + "architecture": "all" + }, + { + "name": "node-validate-npm-package-license", + "version": "3.0.4-2", + "architecture": "all" + }, + { + "name": "node-validate-npm-package-name", + "version": "3.0.0-4", + "architecture": "all" + }, + { + "name": "node-wcwidth.js", + "version": "1.0.2-1", + "architecture": "all" + }, + { + "name": "node-whatwg-fetch", + "version": "3.6.2-5", + "architecture": "all" + }, + { + "name": "node-which", + "version": "2.0.2+~cs1.3.2-2", + "architecture": "all" + }, + { + "name": "node-wide-align", + "version": "1.1.3-4", + "architecture": "all" + }, + { + "name": "node-wrappy", + "version": "1.0.2-2", + "architecture": "all" + }, + { + "name": "node-write-file-atomic", + "version": "3.0.3+~3.0.2-1", + "architecture": "all" + }, + { + "name": "node-yallist", + "version": "4.0.0+~4.0.1-1", + "architecture": "all" + }, + { + "name": "nodejs", + "version": "12.22.9~dfsg-1ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "npm", + "version": "8.5.1~ds-1", + "architecture": "all" + }, + { + "name": "ocl-icd-libopencl1", + "version": "2.2.14-3", + "architecture": "amd64" + }, + { + "name": "openmpi-bin", + "version": "4.1.2-2ubuntu1", + "architecture": "amd64" + }, + { + "name": "openmpi-common", + "version": "4.1.2-2ubuntu1", + "architecture": "all" + }, + { + "name": "openssh-client", + "version": "1:8.9p1-3ubuntu0.17", + "architecture": "amd64" + }, + { + "name": "openssl", + "version": "3.0.2-0ubuntu1.30", + "architecture": "amd64" + }, + { + "name": "passwd", + "version": "1:4.8.1-2ubuntu2.2", + "architecture": "amd64" + }, + { + "name": "patch", + "version": "2.7.6-7build2", + "architecture": "amd64" + }, + { + "name": "perl", + "version": "5.34.0-3ubuntu1.9", + "architecture": "amd64" + }, + { + "name": "perl-base", + "version": "5.34.0-3ubuntu1.9", + "architecture": "amd64" + }, + { + "name": "perl-modules-5.34", + "version": "5.34.0-3ubuntu1.9", + "architecture": "all" + }, + { + "name": "pkg-config", + "version": "0.29.2-1ubuntu3", + "architecture": "amd64" + }, + { + "name": "postfix", + "version": "3.6.4-1ubuntu1.4", + "architecture": "amd64" + }, + { + "name": "postgresql-client", + "version": "14+238", + "architecture": "all" + }, + { + "name": "postgresql-client-14", + "version": "14.24-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "postgresql-client-common", + "version": "238", + "architecture": "all" + }, + { + "name": "procps", + "version": "2:3.3.17-6ubuntu2.1", + "architecture": "amd64" + }, + { + "name": "python3", + "version": "3.10.6-1~22.04.1", + "architecture": "amd64" + }, + { + "name": "python3-distutils", + "version": "3.10.8-1~22.04", + "architecture": "all" + }, + { + "name": "python3-lib2to3", + "version": "3.10.8-1~22.04", + "architecture": "all" + }, + { + "name": "python3-minimal", + "version": "3.10.6-1~22.04.1", + "architecture": "amd64" + }, + { + "name": "python3-pip", + "version": "22.0.2+dfsg-1ubuntu0.7", + "architecture": "all" + }, + { + "name": "python3-pip-whl", + "version": "22.0.2+dfsg-1ubuntu0.7", + "architecture": "all" + }, + { + "name": "python3-pkg-resources", + "version": "59.6.0-1.2ubuntu0.22.04.3", + "architecture": "all" + }, + { + "name": "python3-setuptools", + "version": "59.6.0-1.2ubuntu0.22.04.3", + "architecture": "all" + }, + { + "name": "python3-setuptools-whl", + "version": "59.6.0-1.2ubuntu0.22.04.3", + "architecture": "all" + }, + { + "name": "python3-venv", + "version": "3.10.6-1~22.04.1", + "architecture": "amd64" + }, + { + "name": "python3-wheel", + "version": "0.37.1-2ubuntu0.22.04.1", + "architecture": "all" + }, + { + "name": "python3.10", + "version": "3.10.12-1~22.04.18", + "architecture": "amd64" + }, + { + "name": "python3.10-minimal", + "version": "3.10.12-1~22.04.18", + "architecture": "amd64" + }, + { + "name": "python3.10-venv", + "version": "3.10.12-1~22.04.18", + "architecture": "amd64" + }, + { + "name": "readline-common", + "version": "8.1.2-1", + "architecture": "all" + }, + { + "name": "redis-server", + "version": "5:6.0.16-1ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "redis-tools", + "version": "5:6.0.16-1ubuntu1.2", + "architecture": "amd64" + }, + { + "name": "rpcsvc-proto", + "version": "1.4.2-0ubuntu6", + "architecture": "amd64" + }, + { + "name": "rustc", + "version": "1.75.0+dfsg0ubuntu1~bpo0-0ubuntu0.22.04.1", + "architecture": "amd64" + }, + { + "name": "sed", + "version": "4.8-1ubuntu2.1", + "architecture": "amd64" + }, + { + "name": "sensible-utils", + "version": "0.0.17", + "architecture": "all" + }, + { + "name": "shared-mime-info", + "version": "2.1-2", + "architecture": "amd64" + }, + { + "name": "socat", + "version": "1.7.4.1-3ubuntu4", + "architecture": "amd64" + }, + { + "name": "sqlite3", + "version": "3.37.2-2ubuntu0.8", + "architecture": "amd64" + }, + { + "name": "ssl-cert", + "version": "1.1.2", + "architecture": "all" + }, + { + "name": "sudo", + "version": "1.9.9-1ubuntu2.7", + "architecture": "amd64" + }, + { + "name": "sysvinit-utils", + "version": "3.01-1ubuntu1", + "architecture": "amd64" + }, + { + "name": "tar", + "version": "1.34+dfsg-1ubuntu0.1.22.04.6", + "architecture": "amd64" + }, + { + "name": "tcl-expect", + "version": "5.45.4-2build1", + "architecture": "amd64" + }, + { + "name": "tcl8.6", + "version": "8.6.12+dfsg-1build1", + "architecture": "amd64" + }, + { + "name": "tesseract-ocr", + "version": "4.1.1-2.1build1", + "architecture": "amd64" + }, + { + "name": "tesseract-ocr-eng", + "version": "1:4.00~git30-7274cfa-1.1", + "architecture": "all" + }, + { + "name": "tesseract-ocr-osd", + "version": "1:4.00~git30-7274cfa-1.1", + "architecture": "all" + }, + { + "name": "tzdata", + "version": "2026c-0ubuntu0.22.04.1", + "architecture": "all" + }, + { + "name": "ubuntu-keyring", + "version": "2021.03.26", + "architecture": "all" + }, + { + "name": "ucf", + "version": "3.0043", + "architecture": "all" + }, + { + "name": "unzip", + "version": "6.0-26ubuntu3.2", + "architecture": "amd64" + }, + { + "name": "upx-ucl", + "version": "3.96-3", + "architecture": "amd64" + }, + { + "name": "usrmerge", + "version": "25ubuntu2", + "architecture": "all" + }, + { + "name": "util-linux", + "version": "2.37.2-4ubuntu3.6", + "architecture": "amd64" + }, + { + "name": "valgrind", + "version": "1:3.18.1-1ubuntu2", + "architecture": "amd64" + }, + { + "name": "wget", + "version": "1.21.2-2ubuntu1.5", + "architecture": "amd64" + }, + { + "name": "x11-common", + "version": "1:7.7+23ubuntu2", + "architecture": "all" + }, + { + "name": "xkb-data", + "version": "2.33-1", + "architecture": "all" + }, + { + "name": "xxd", + "version": "2:8.2.3995-1ubuntu2.36", + "architecture": "amd64" + }, + { + "name": "xz-utils", + "version": "5.2.5-2ubuntu1.1", + "architecture": "amd64" + }, + { + "name": "zip", + "version": "3.0-12build2", + "architecture": "amd64" + }, + { + "name": "zlib1g", + "version": "1:1.2.11.dfsg-2ubuntu9.2", + "architecture": "amd64" + }, + { + "name": "zlib1g-dev", + "version": "1:1.2.11.dfsg-2ubuntu9.2", + "architecture": "amd64" + } + ] + }, + "python_packages": [ + { + "name": "pip", + "version": "26.2.1", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/pip-26.2.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages", + "metadata_sha256": "3a561005822841f2c45f442f6c7a7505172c8c376c9fe274d876c8ac912968cb" + }, + { + "name": "setuptools", + "version": "84.0.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools-84.0.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages", + "metadata_sha256": "3ef2975718dd31cabdd5829455e9b868ca14dbf79ed8fed2de0af4e87347006e" + }, + { + "name": "autocommand", + "version": "2.2.2", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "3800d9b91dceea2065a6ed6279383362e97ac38b8e56b9343f404ee531860099" + }, + { + "name": "backports.tarfile", + "version": "1.2.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "8215c54ead77d9dc5a108a25c6bdc72b5999aa6f62c9499a440359412afa5a51" + }, + { + "name": "importlib_metadata", + "version": "8.7.1", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/importlib_metadata-8.7.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "a3e38b9ee4326289d4864704f30e299ee769e2309ce9f4a75f0de1a50ad0a356" + }, + { + "name": "jaraco.context", + "version": "6.1.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/jaraco_context-6.1.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "0435ebfc52055c5a9974ed20c171b6454383eaf9dbb1508814ba7ad97c59d712" + }, + { + "name": "jaraco.functools", + "version": "4.4.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/jaraco_functools-4.4.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "2e79da8dc3469924abe3ac8b22a3feb5692a79bf9f47bbc86b6535d618641849" + }, + { + "name": "jaraco.text", + "version": "4.0.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/jaraco.text-4.0.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "5c2fd09012c954f139b10624978d5335a654c34014cd06f6f466ca683dbc9c56" + }, + { + "name": "more-itertools", + "version": "10.8.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/more_itertools-10.8.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "6ab3515145abe58b067f087c867631cf4cf5d653fed81b9642ee12086c3904b8" + }, + { + "name": "packaging", + "version": "26.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/packaging-26.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "3362bb7d6a26da2962ba8daaa4785cd0bacac21aba908a1195cc8f59580a265a" + }, + { + "name": "platformdirs", + "version": "4.4.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.4.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "bbc5216d5f4c77bfbc57227264d52e66bccde71ccf79e75e1a6046d029d30223" + }, + { + "name": "tomli", + "version": "2.4.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.4.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "f5ac0a1f8fba908b4646cd655309e91aad969b6787616ac571ca462a3832ffce" + }, + { + "name": "wheel", + "version": "0.46.3", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/wheel-0.46.3.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "22910aa97ca89cbcc20a019e27fe31360b7929a4bd66ca0d310f99a44f6ccd35" + }, + { + "name": "zipp", + "version": "3.23.0", + "metadata_path": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor/zipp-3.23.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-python/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "bdd67d4d16cf0bf3b893e7d18cd3d2d774adb82f37ed985bc7770c607226b35b" + }, + { + "name": "aiofile", + "version": "3.12.3", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/aiofile-3.12.3.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "faaa3115c495ac1989aa6bda262b79a6c97e056c83e04afcfc71584a59e3ceb1" + }, + { + "name": "annotated-doc", + "version": "0.0.5", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/annotated_doc-0.0.5.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "8c24d70c5d9153d22123353a906042fd7603df2d15c2196290b0f8a962558c46" + }, + { + "name": "annotated-types", + "version": "0.8.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/annotated_types-0.8.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "614985b278f601b8ef863f82783b991cc3ada4b89f592eb71c7c48c5f2ef2298" + }, + { + "name": "anyio", + "version": "4.15.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/anyio-4.15.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "043aecb571af7189e8a6c528f5d8e32545f1b2cdfaaf761d51e6d5b67ea3ca81" + }, + { + "name": "attrs", + "version": "26.1.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/attrs-26.1.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "4cd40e690f23bf37cbcad34efd6758e062df1df07c86833f7e3ce95bf1fa38cc" + }, + { + "name": "Authlib", + "version": "1.8.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/authlib-1.8.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "cbe29efb9693e344288f0039d52650b3013a8d059da203839b57a3ee3e600253" + }, + { + "name": "backports.tarfile", + "version": "1.2.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/backports.tarfile-1.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "8215c54ead77d9dc5a108a25c6bdc72b5999aa6f62c9499a440359412afa5a51" + }, + { + "name": "beartype", + "version": "0.23.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/beartype-0.23.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "aebbf3622fcb9925ee3adccf588833742c34ba08d8ce6eda1b781a55619de57e" + }, + { + "name": "brotli", + "version": "1.2.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/brotli-1.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "f9d12d5184b5090b146b2e5f0d62931521b2b1435ea466433a239bb7c41fc962" + }, + { + "name": "cachetools", + "version": "7.2.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/cachetools-7.2.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "fe9b6190d89bc7715f1526e89f37d307b7c485bf4134043f76e464c216614a81" + }, + { + "name": "caio", + "version": "0.12.9", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/caio-0.12.9.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "705a75fcc747b2b3d886018a20311f91690238e62a9a9cb6f227ceaef25a3942" + }, + { + "name": "certifi", + "version": "2026.7.22", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/certifi-2026.7.22.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "ef5af1638fbb23676ac3c5777dfcfc2cd9c348fe4172ed5ba3d277655b248090" + }, + { + "name": "cffi", + "version": "2.1.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/cffi-2.1.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "558bafb9093a8e790175d9ecff9688382981d744877dad86fd6770db0f4dc918" + }, + { + "name": "charset-normalizer", + "version": "3.5.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/charset_normalizer-3.5.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "89ce6362bb7be88558f4be99a98f5d1b4da93d19cd0323e5ee0bac05cf883dfb" + }, + { + "name": "click", + "version": "8.5.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/click-8.5.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "e87bce0bd194de70dfb8e708e0a6b0483009f25611804eaf87bfeb63e6c20501" + }, + { + "name": "cryptography", + "version": "50.0.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/cryptography-50.0.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "047cfc71226409de4318b360aef15c63a2adf609731e3dcf7fe932f14ea042ee" + }, + { + "name": "cyclopts", + "version": "5.2.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/cyclopts-5.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "a1bcd1e587744ec6f5c5c64126ac03a03fc2468f7c91cd1c44572a5ac11dcb2a" + }, + { + "name": "dnspython", + "version": "2.9.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/dnspython-2.9.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "d25dbd09b39758cd5cebe518701012a6278731986cd384fc4a7f25e78f7de929" + }, + { + "name": "docstring_parser", + "version": "0.18.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/docstring_parser-0.18.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "cbc42027997fd4b194ae5fd064a4d1e57b92976941d0c26d369561a7c016a333" + }, + { + "name": "email-validator", + "version": "2.3.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/email_validator-2.3.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "2a97b81eefcd856bc80b0346f47fa2d800b9a438bf8f9231ae00fe931d5c9fbc" + }, + { + "name": "exceptiongroup", + "version": "1.3.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/exceptiongroup-1.3.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "81984a523a2f7a522ad12bea784a8bb85edec0805ebbd0fb4e350169a36dd802" + }, + { + "name": "fastapi", + "version": "0.143.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/fastapi-0.143.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "1bfa2ecf35ea529d68e56c195c5a4cee7864335d24bcc4a76cf40d7a71edc6e9" + }, + { + "name": "fastmcp", + "version": "3.4.8", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/fastmcp-3.4.8.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "12403b8d5b096f127eeafa743581daac19c2082eb4fb07e7a80afb225f67140f" + }, + { + "name": "fastmcp-slim", + "version": "3.4.8", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/fastmcp_slim-3.4.8.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "46d5a8316d3f1f17f507dcb89610f4b7bb46a2cc87f939a4c5b3693c09e71905" + }, + { + "name": "filelock", + "version": "4.1.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/filelock-4.1.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "f494bfbd4ce00128759bc0ff21e7b5cad77a6397902f53a5d0f4398292b6979f" + }, + { + "name": "fsspec", + "version": "2026.9.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/fsspec-2026.9.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "68f5a262767510638e9b1933b1493f2baadc9616fe1e696f62aedd59c8c0a37c" + }, + { + "name": "gradio", + "version": "6.30.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/gradio-6.30.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "a16c7d211a8564297ab299a661d72aabfd33d11cc317ac656461602f8a3e2933" + }, + { + "name": "gradio_client", + "version": "2.7.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/gradio_client-2.7.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "c379185aa00cd6e8b762e23dededf8e4f9c85853ae715ef29112323b551a6c31" + }, + { + "name": "griffelib", + "version": "2.3.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/griffelib-2.3.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "fd24a68ed08309718d5759b8de3b90392b5804240d94834e6455be110ead34b3" + }, + { + "name": "groovy", + "version": "0.1.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/groovy-0.1.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "4e9483c0c0f3c969f94e12c4484521260387742132520c23d7c8d19e20a99534" + }, + { + "name": "h11", + "version": "0.16.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/h11-0.16.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "28f326098ac09fcba79b8f180f96087c841fe2456215cb7b872a9c7d5cd19d64" + }, + { + "name": "hf-gradio", + "version": "0.4.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/hf_gradio-0.4.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "f3ae073ca654ea4a983162903f615d27c3c8880110a627f72097835950dd8263" + }, + { + "name": "hf-xet", + "version": "1.7.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/hf_xet-1.7.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "05975b1239f188bb418539f178ef68a693ea6824f20c30583a02eea94faf650a" + }, + { + "name": "httpcore", + "version": "1.0.9", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/httpcore-1.0.9.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "fe2d4fda6199128978779e0cf27f3c045c531863fcdd987eacc74f3a18d41c21" + }, + { + "name": "httpcore2", + "version": "2.13.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/httpcore2-2.13.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "37a0ea0674e98b7c3a1f99c17d9bb5457de27a0f93c8b6560c9d17d525139abb" + }, + { + "name": "httpx", + "version": "0.28.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/httpx-0.28.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "febb9b0f8f3e80d57c8199c304f35c4336e8581d1d18d7983c92766b82793b25" + }, + { + "name": "httpx-sse", + "version": "0.4.3", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/httpx_sse-0.4.3.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "d4c6d804ee5ac46e9b3b6595c27ab8ae2ba7cfb5f692c78b16ff463e4bd1a81e" + }, + { + "name": "httpx2", + "version": "2.13.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/httpx2-2.13.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "b75b03a003b5593e000907cf7239fcc3f688b8f17db4ecff883d11221ea988fc" + }, + { + "name": "huggingface_hub", + "version": "2.2.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/huggingface_hub-2.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "fec7fc2879fa91b7cbf7a21b1434087215d62869b2bc69fb59654c328d9a3d14" + }, + { + "name": "idna", + "version": "3.20", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/idna-3.20.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "dbd8c14c1e4ca1e0c9824a6dbc7cbbf78884f38eb52d91148cd3025f671e4b85" + }, + { + "name": "importlib_metadata", + "version": "9.0.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/importlib_metadata-9.0.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "1a90ba399de022d3528ad996c7a8593422207ccb13d27f062ad005f509e11500" + }, + { + "name": "jaraco.classes", + "version": "3.4.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jaraco.classes-3.4.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "2e6b102232edd45ae1bb8a6b4091fd40cf3201a6bb6fd4bc97c5e8cd765a44b8" + }, + { + "name": "jaraco.context", + "version": "6.1.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jaraco_context-6.1.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "f1b65b60aea229af54e09b17ae0036cf048fe4a6161fa2e7966a8ea5c2321491" + }, + { + "name": "jaraco.functools", + "version": "4.6.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jaraco_functools-4.6.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "6ed3cae5b8eef084c3c7b2385a0a8ac4c8155ab7c729212bea099bee69d5bd6c" + }, + { + "name": "jeepney", + "version": "0.9.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jeepney-0.9.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "b8e6c353e9aaed0ed0144029556417fda23b64f344e718331907054ba05b8c62" + }, + { + "name": "Jinja2", + "version": "3.1.6", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jinja2-3.1.6.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "68c5548fb67c4132a13898d9b31ec50c6bea2abdd915d921f214355c3a6499c8" + }, + { + "name": "jiter", + "version": "0.17.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jiter-0.17.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "738fc5b25c7cbaf81392886a95661322888c5691205b57a0975a1da1f62e3ea7" + }, + { + "name": "joserfc", + "version": "1.7.5", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/joserfc-1.7.5.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "17df62bbdc7212bbcda3144e72720a62fc34bbf76c573062939120738545250f" + }, + { + "name": "jsonref", + "version": "1.1.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jsonref-1.1.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "f98db3890394fba23912faab86ad8f70ed564fc8c885298b636b270f28453e43" + }, + { + "name": "jsonschema", + "version": "4.26.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jsonschema-4.26.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "05b189866ca98a96da3934bf6b83687ced3ff85325273b77e16b705f6d8b26d2" + }, + { + "name": "jsonschema-path", + "version": "0.5.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jsonschema_path-0.5.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "cd7e9a4426436980f099d826dbce8f61afa6603b496385fba9a9eb0ad59cdd48" + }, + { + "name": "jsonschema-specifications", + "version": "2025.9.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/jsonschema_specifications-2025.9.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "35abd41757f32b4ea24756920ded47b70173d77cbc052a5a6d3ab583b2e8d89d" + }, + { + "name": "keyring", + "version": "25.7.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/keyring-25.7.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "bd54de98fede6dc3e1f3cd89b4e37c95d8842a523bdbb9e52ab40edff1837163" + }, + { + "name": "markdown-it-py", + "version": "4.2.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/markdown_it_py-4.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "72c36ff516755443b1ecb61e17b2567a990230b49a504b0eb0c42d5f82448a9c" + }, + { + "name": "MarkupSafe", + "version": "3.0.4", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/markupsafe-3.0.4.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "66767d76388ece15d49d50dafb655891ef5d868715e7128e7f7d737a70b353c4" + }, + { + "name": "mcp", + "version": "1.30.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/mcp-1.30.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "3880c29896149862971af57942e3e5c0ad2a909696a66b9811c62f6e47e65111" + }, + { + "name": "mdurl", + "version": "0.1.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/mdurl-0.1.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "b53b29d48f499367053fda3c81e7ce27d2558380ebbf83e66023b02eb7ddd25d" + }, + { + "name": "more-itertools", + "version": "11.1.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/more_itertools-11.1.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "15588fd819d6d7f9d0ddc7b5283502d3512c5d1edadce573b78c1f0734055df0" + }, + { + "name": "numpy", + "version": "2.4.6", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/numpy-2.4.6.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "b082c52ccbe3b880bae177c35171b52ed6c947f3ad71e3762f2723f60a411de0" + }, + { + "name": "openai", + "version": "3.28.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/openai-3.28.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "2ccf7558861abb71955b3aabe0c62f8502fe9f3214da9889bcf0274d0eb6ec43" + }, + { + "name": "openapi-pydantic", + "version": "0.6.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/openapi_pydantic-0.6.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "e46a181161c62fa24d7d3d0ff2eaabea3a7b580ad7aa9f70d1f08bd129d46f49" + }, + { + "name": "openenv", + "version": "0.6.1.dev0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/openenv-0.6.1.dev0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "0922465a7ecb0740ea84e46fb45aa53080a203a86872d06810d42190c645a5dd" + }, + { + "name": "opentelemetry-api", + "version": "1.45.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/opentelemetry_api-1.45.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "5bc71e90cb421be92a43bf5ad5b0f25dccfa2a24ddceaa2877779879962a4c9e" + }, + { + "name": "orjson", + "version": "3.13.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/orjson-3.13.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "4b64a33cb3c47299ae9afe9919c67fb5159e89d086857a4fe74c727044c98612" + }, + { + "name": "packaging", + "version": "26.3", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/packaging-26.3.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "70fdb89fc4d4a9a043bf7372b8972bcc883fddff34ab55e9cf80d73875384763" + }, + { + "name": "pandas", + "version": "3.0.6", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pandas-3.0.6.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "c2e8c472e1f49c30b7b00dc1cde8b8ed384b1b6d85b4d5ffe163e800e71dbc61" + }, + { + "name": "pathable", + "version": "0.6.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pathable-0.6.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "c418727931012c2306cb8fa2726d044616c3178c1fc078ce182385dcf2b59922" + }, + { + "name": "pillow", + "version": "12.3.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pillow-12.3.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "8fc07146cab33ef7582361dab6eac596d340b03ec648f18217da7894f73838c8" + }, + { + "name": "pip", + "version": "24.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pip-24.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "90d11f277fd5868da679ee257c97656dde511c8aac7d025231407e6ce90839e2" + }, + { + "name": "platformdirs", + "version": "4.12.4", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/platformdirs-4.12.4.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "2418b715af2d19c99d62ebf721c2e02075f20479ac9c0557a06e119fdbe14a3f" + }, + { + "name": "py-key-value-aio", + "version": "0.4.6", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/py_key_value_aio-0.4.6.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "0c1af357b841bc3862e39543faa863346c487be9f2e2ffefba009e957a256bee" + }, + { + "name": "pycparser", + "version": "3.11", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pycparser-3.11.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "e3a74c846648bb55f4f907284b745e2003b87b96d9c9d17a8a50cf37804541c9" + }, + { + "name": "pydantic", + "version": "2.14.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pydantic-2.14.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "11c8967cbcd622677943be38b48a3931cc524250acd9d8c7a6386408099c4cf9" + }, + { + "name": "pydantic-settings", + "version": "2.15.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pydantic_settings-2.15.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "5ac12e408df62f1d4c7643146d9df04ace749f1fe5cf28b3b794be0b2834ca6d" + }, + { + "name": "pydantic_core", + "version": "2.50.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pydantic_core-2.50.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "d7f01d1f3be82b075af78fe6152a69edbb7708e4c56118b7c937641283516cbf" + }, + { + "name": "pydub", + "version": "0.25.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pydub-0.25.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "7f433cfd956d6e2628508f5e8d721e274dc9a3d03935b8bed15d5b56ab398989" + }, + { + "name": "Pygments", + "version": "2.21.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pygments-2.21.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "1dde075570136774c706bf0009183a793fe0ee262e4a5590cc6eff8453eedd43" + }, + { + "name": "PyJWT", + "version": "2.15.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pyjwt-2.15.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "1ea0c9f139b8c928276b3628af165955f6f764491448a6ad8f103cdcbb382da3" + }, + { + "name": "pyperclip", + "version": "1.11.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pyperclip-1.11.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "2493839e0751761f27d39aa6d5c5dfd1df839c45da8f328aba4ae4102868b825" + }, + { + "name": "python-dateutil", + "version": "2.9.0.post0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/python_dateutil-2.9.0.post0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "a9d436da322be808332f98d88325998e87cb693a678a9969feb4cfad729a6e93" + }, + { + "name": "python-dotenv", + "version": "1.2.4", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/python_dotenv-1.2.4.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "87cfee6042412d48df1100ea7822684988c3f2b79de7a250f4717f4df3026d6f" + }, + { + "name": "python-multipart", + "version": "0.0.32", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/python_multipart-0.0.32.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "e9d399d7dea5eddf0e4d24b5c24687a82e7e50bf2c2b30f8f8a06a64d887dd86" + }, + { + "name": "pytz", + "version": "2026.5", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pytz-2026.5.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "4d20d16f6004b1d7f9b01a96f4d3eb462c0c2a8413d9aa878effe50a21535929" + }, + { + "name": "PyYAML", + "version": "6.0.3", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/pyyaml-6.0.3.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "03c3b415ed38d09faedc49360e930769b40c58f68585e6de00e2e4916a858d34" + }, + { + "name": "referencing", + "version": "0.37.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/referencing-0.37.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "c93b00e6ab1524fd60848376604c189a114374776475c25a31d57be47b29de6a" + }, + { + "name": "requests", + "version": "2.34.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/requests-2.34.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "8c384ba3e979480faae2859d3c5e6c1276dd2c3616e322e124d52c8cfc556f27" + }, + { + "name": "rich", + "version": "15.0.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/rich-15.0.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "fad34fc603fac4481bf81f8dd629492fc302c0ec31909c86644751512afb2e3b" + }, + { + "name": "rich-rst", + "version": "2.2.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/rich_rst-2.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "2cd1f39149e69bd94c4f1c30cb26c763e45689e6d6527b4c23afa1112c48f165" + }, + { + "name": "rpds-py", + "version": "2026.9.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/rpds_py-2026.9.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "5d72dca2e387c8d2b4180b68ee87c15b64751e059100a6db58891ec9995445c3" + }, + { + "name": "safehttpx", + "version": "0.1.7", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/safehttpx-0.1.7.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "5be3880c8660a8d390e6ed5c22360612f338d05cb25020e2f6ca1218a7e4f449" + }, + { + "name": "SecretStorage", + "version": "3.5.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/secretstorage-3.5.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "b98e3dc42ff7e9b1bacce60dac2662cd9965fad6e4469fc9483c9eb99998c367" + }, + { + "name": "semantic-version", + "version": "2.10.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/semantic_version-2.10.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "7414d469a569046b6a246bfb1f105aab1b7abfdc32a95253f15432ea30159aa6" + }, + { + "name": "setuptools", + "version": "79.0.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools-79.0.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "d3152caeb1486d143b30b1d41fffaaddb7ea95fdc9547ae1135ce697b1a420b5" + }, + { + "name": "shellingham", + "version": "1.5.4", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/shellingham-1.5.4.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "183d80220a37493262795739dd357cc5bb3f49bd390cc9198d5180e5451a07fa" + }, + { + "name": "six", + "version": "1.17.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/six-1.17.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "562042078c2752549f6d8a7c86dbc5dd708088a7be6d80672ec7b07100b72468" + }, + { + "name": "sniffio", + "version": "1.3.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/sniffio-1.3.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "0b318b57098edeccf585e60a889a6b6a7b5c4086f3a9aa62eff76a1d3cee12d9" + }, + { + "name": "sse-starlette", + "version": "3.5.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/sse_starlette-3.5.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "6dc401682bdae1a3e1f31b1c320b7f926c354643993840393875ebfc171c9014" + }, + { + "name": "starlette", + "version": "1.7.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/starlette-1.7.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "f7870fc19ab7c2e364887057340b9fb47e9bda74d24b06c58ca399494abfe019" + }, + { + "name": "tomli", + "version": "2.5.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/tomli-2.5.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "0d7d3b46cb99dac60216978cebca446f9ec3a21fd3e1f9650086a2e373654e27" + }, + { + "name": "tomli_w", + "version": "1.2.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/tomli_w-1.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "66e81ac2e41775b5ebddcfbb9f4ae77158e4c5739fd52d231e14f2fffda9c8de" + }, + { + "name": "tomlkit", + "version": "0.14.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/tomlkit-0.14.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "2404b6a8b042bad3dbd0e0d5c0009fffc351fc718cf77bc1d908b4ead77565b9" + }, + { + "name": "tqdm", + "version": "4.70.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/tqdm-4.70.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "a5da70b966afea3a759716041bad7187f2ece02c22348cf9e7c0a512bbf15f57" + }, + { + "name": "truststore", + "version": "0.10.4", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/truststore-0.10.4.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "509a7b67bff99f2d04f57251b5bdb761bd9429467e1cebc453b7f96be4108f5b" + }, + { + "name": "typer", + "version": "0.27.3", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/typer-0.27.3.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "fc2cbb86c4fd175326b63427e9a3fa13e79364d7333a945414d9c6ac80c0f0e4" + }, + { + "name": "typing-inspection", + "version": "0.4.4", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/typing_inspection-0.4.4.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "bad3d9e6342ef6750cf5128ec942327b8bebdce0b6e4d6f67cb15b27ae5118da" + }, + { + "name": "typing_extensions", + "version": "4.16.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/typing_extensions-4.16.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "b05084ca1d50879865178d9fff9fabeab61bdfb1f361bfbde95421ffc8f9be46" + }, + { + "name": "uncalled-for", + "version": "0.4.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/uncalled_for-0.4.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "45a21666ddfa8ca8d4e2423c05edaeaa7827686a3ae4fed82b24427854745c2f" + }, + { + "name": "urllib3", + "version": "2.8.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/urllib3-2.8.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "10898c620e8007c030e07fa5622b68358a43010025dfbd78a1cb797699de2bb4" + }, + { + "name": "uvicorn", + "version": "0.54.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/uvicorn-0.54.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "9399e5ddda3d26e842d6fb5420c38b0857aac568d53badbdc224b3a21339efa8" + }, + { + "name": "watchfiles", + "version": "1.3.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/watchfiles-1.3.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "1fba87d08d66f10f7515e4817abd4ac7f27abf3300cb33b7ad3f79762987a502" + }, + { + "name": "websockets", + "version": "17.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/websockets-17.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "0d5f1279d095e7ba84ef21614af0822dc500ccb2e51b7c3a19eda7159b2dade4" + }, + { + "name": "zipp", + "version": "4.1.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/zipp-4.1.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages", + "metadata_sha256": "3080f93de17d4bd784cd33afc0933db91c28cbec1cb444e1ffdfec5c7e0f5d90" + }, + { + "name": "autocommand", + "version": "2.2.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "3800d9b91dceea2065a6ed6279383362e97ac38b8e56b9343f404ee531860099" + }, + { + "name": "backports.tarfile", + "version": "1.2.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "8215c54ead77d9dc5a108a25c6bdc72b5999aa6f62c9499a440359412afa5a51" + }, + { + "name": "importlib_metadata", + "version": "8.0.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/importlib_metadata-8.0.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "6a7b90effee1e09d5b484cdf7232016a43e2d9cc9543bcbb8e494b1ec05e1f59" + }, + { + "name": "inflect", + "version": "7.3.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/inflect-7.3.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "66030d634580651b3e53cc19895d9231f8d22aa06b327817c8332cfc20303308" + }, + { + "name": "jaraco.collections", + "version": "5.1.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/jaraco.collections-5.1.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "20c51a96236c0395f53b1f4c5d458e6a0721e51e16c1bff733b7aba76f5d06d8" + }, + { + "name": "jaraco.context", + "version": "5.3.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/jaraco.context-5.3.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "c43b60b897a3d2d37d8845c252fc44261d9aef171e21154111a9012d2afffed6" + }, + { + "name": "jaraco.functools", + "version": "4.0.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/jaraco.functools-4.0.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "8b86946900d7fa38dd1102b9c1ebe17a0cb1f09c8b7e29f61f2bda4a4dc51eca" + }, + { + "name": "jaraco.text", + "version": "3.12.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/jaraco.text-3.12.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "03359d9ba56231f0ce3e840c7cb5a7db380141218949ccaa78ddbd4dcb965d52" + }, + { + "name": "more-itertools", + "version": "10.3.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/more_itertools-10.3.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "0453bdd0ef9f2cd89540ca63ee8212e73b73809514419dd3037d8fe471f737e0" + }, + { + "name": "packaging", + "version": "24.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/packaging-24.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "a211fceacea4e6621f4316364d2d0b7127c00de3856b8062082f9bc5957ea4db" + }, + { + "name": "platformdirs", + "version": "4.2.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "ce6b227b4d46d4cb57474c2022fe57a557933bb89daf4596bdf9b12ac296b869" + }, + { + "name": "tomli", + "version": "2.0.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/tomli-2.0.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "ccf0dc78a98fc0918b5ad67292b1e2c4bed65575a6246cd9d63c914f9942a0f2" + }, + { + "name": "typeguard", + "version": "4.3.0", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "cf675c1c0a744f08580855390de87cc77d676b312582e8d4cfdb5bb8fd298d21" + }, + { + "name": "typing_extensions", + "version": "4.12.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/typing_extensions-4.12.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "05e51021af1c9d86eb8d6c7e37c4cece733d5065b91a6d8389c5690ed440f16d" + }, + { + "name": "wheel", + "version": "0.45.1", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/wheel-0.45.1.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "98acfce07ee6ee3b31272cde21c4d53918936f434f315dfd2af3886211a09a30" + }, + { + "name": "zipp", + "version": "3.19.2", + "metadata_path": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor/zipp-3.19.2.dist-info/METADATA", + "installation_directory": "/opt/openenv-venv/lib/python3.11/site-packages/setuptools/_vendor", + "metadata_sha256": "508ae4fe43081c64b0b0a2828588b3a8cc3430c6693d1676662569400b0dfdb1" + }, + { + "name": "gyp", + "version": "0.1", + "metadata_path": "/usr/lib/python3/dist-packages/gyp-0.1.egg-info/PKG-INFO", + "installation_directory": "/usr/lib/python3/dist-packages", + "metadata_sha256": "6f37710f7052d223e38f2479a259ec91a0a7b3e23f52930dbc44a426347e074e" + }, + { + "name": "pip", + "version": "22.0.2", + "metadata_path": "/usr/lib/python3/dist-packages/pip-22.0.2.dist-info/METADATA", + "installation_directory": "/usr/lib/python3/dist-packages", + "metadata_sha256": "622c5ad0b2a4cb38d3d8de4940ee6a6038197264ece99e9d83851bc013724f60" + }, + { + "name": "setuptools", + "version": "59.6.0", + "metadata_path": "/usr/lib/python3/dist-packages/setuptools-59.6.0.egg-info/PKG-INFO", + "installation_directory": "/usr/lib/python3/dist-packages", + "metadata_sha256": "0be37c52b0344a35195f241358d75216d5c7ed2a8c649ec881d8134833f62c4f" + }, + { + "name": "wheel", + "version": "0.37.1", + "metadata_path": "/usr/lib/python3/dist-packages/wheel-0.37.1.egg-info/PKG-INFO", + "installation_directory": "/usr/lib/python3/dist-packages", + "metadata_sha256": "98a7ecf555108a00c0170c5e4b0ef56593a4f8db170e94278b8b67ae9222a4fb" + }, + { + "name": "altgraph", + "version": "0.17.5", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/altgraph-0.17.5.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "dc60641dba229a3aef09f764f562c38d908b930c92615af2e626af31d6ff19b5" + }, + { + "name": "async-timeout", + "version": "5.0.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/async_timeout-5.0.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "4550cd1083d820124a3ec8d38490da2915f587bf7ee1061036e04b4973c8b54f" + }, + { + "name": "bcrypt", + "version": "5.0.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/bcrypt-5.0.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "c95d417cb948eae765572db778d6f30daeb60d211b52b956be52c1088e9401d2" + }, + { + "name": "beautifulsoup4", + "version": "4.15.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/beautifulsoup4-4.15.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "b2f888103259f1607c85f3b1163be1bc49fc9941a3243c3b89a21075bfc6d4fb" + }, + { + "name": "biopython", + "version": "1.88", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/biopython-1.88.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "d8049c9ad2de2dc720ad57aba95e2ec1df148e8eaaa90285b99070cad0066ea3" + }, + { + "name": "blinker", + "version": "1.9.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/blinker-1.9.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "b8846233cc238db1e40ad6c2c93bdcb54dfb200664d2411ee64c4095dd5dbf30" + }, + { + "name": "certifi", + "version": "2026.7.22", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/certifi-2026.7.22.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "ef5af1638fbb23676ac3c5777dfcfc2cd9c348fe4172ed5ba3d277655b248090" + }, + { + "name": "cffi", + "version": "2.1.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/cffi-2.1.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "558bafb9093a8e790175d9ecff9688382981d744877dad86fd6770db0f4dc918" + }, + { + "name": "charset-normalizer", + "version": "3.5.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/charset_normalizer-3.5.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "89ce6362bb7be88558f4be99a98f5d1b4da93d19cd0323e5ee0bac05cf883dfb" + }, + { + "name": "click", + "version": "8.5.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/click-8.5.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "e87bce0bd194de70dfb8e708e0a6b0483009f25611804eaf87bfeb63e6c20501" + }, + { + "name": "cloudpickle", + "version": "3.1.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/cloudpickle-3.1.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "3d0263bfe9ee4f23b244bdcaff73acbe7a1957ebf82743b6ae42693adc48d721" + }, + { + "name": "contourpy", + "version": "1.3.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/contourpy-1.3.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "0d860f7cb8af8e85005c209499e0ca25da8515b4b67915ee8b88b8852c316c08" + }, + { + "name": "cryptography", + "version": "50.0.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/cryptography-50.0.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "047cfc71226409de4318b360aef15c63a2adf609731e3dcf7fe932f14ea042ee" + }, + { + "name": "cycler", + "version": "0.12.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/cycler-0.12.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "23289e19b76f1e01394227696e6af2b6cd1ce79e89731209bf9195148b18ed36" + }, + { + "name": "Cython", + "version": "3.3.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/cython-3.3.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "be89f94f60c36f2c8a311112be29389813e2022f299888676e8a59332b2b7b2f" + }, + { + "name": "exceptiongroup", + "version": "1.3.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/exceptiongroup-1.3.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "81984a523a2f7a522ad12bea784a8bb85edec0805ebbd0fb4e350169a36dd802" + }, + { + "name": "filelock", + "version": "3.32.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/filelock-3.32.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "2d80f43bd905689145c00b3133bc95895d654ced70a96a1802e9237e0d66599f" + }, + { + "name": "Flask", + "version": "3.1.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/flask-3.1.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "aa6760ed6f545704474d70733e4a63a7f1481e376973edc896a13d02a7224c7c" + }, + { + "name": "fonttools", + "version": "4.65.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/fonttools-4.65.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "767c772df5fec424631e48baa13cfa55498f4d7be9b41d1071b34bf52cc28fa8" + }, + { + "name": "fsspec", + "version": "2026.7.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/fsspec-2026.7.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "88b1657585de14e3bb82aa5278aa9595b30aa4ca74ead073d8950615c808099d" + }, + { + "name": "idna", + "version": "3.20", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/idna-3.20.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "dbd8c14c1e4ca1e0c9824a6dbc7cbbf78884f38eb52d91148cd3025f671e4b85" + }, + { + "name": "ImageIO", + "version": "2.38.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/imageio-2.38.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "c6c48046e1f02bdb44ee5a39b4702651bd27125977e227ef52cae60e7f20daab" + }, + { + "name": "iniconfig", + "version": "2.3.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/iniconfig-2.3.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "47c2c35d936f5c649d8074c6464719a42966a67b5cebad01e3e5784cf090cfb6" + }, + { + "name": "invoke", + "version": "3.0.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/invoke-3.0.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "3aa7e6bc583c04b62f77455f519b49be6529bf8ef165eb52022b0da7fac9d4ab" + }, + { + "name": "itsdangerous", + "version": "2.2.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/itsdangerous-2.2.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "d2b934fb56708a1b94e439f0255c0f5a8108e3258ec827b18a1dc9c991db9611" + }, + { + "name": "Jinja2", + "version": "3.1.6", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/jinja2-3.1.6.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "68c5548fb67c4132a13898d9b31ec50c6bea2abdd915d921f214355c3a6499c8" + }, + { + "name": "joblib", + "version": "1.6.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/joblib-1.6.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "c5fd6509906c5795fd6724d97bc1709d1f266b78aff92c0156d6cf5ad7c045e3" + }, + { + "name": "kiwisolver", + "version": "1.5.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/kiwisolver-1.5.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "f07b7b6c0c9c2a624c8a31f931e16712f2cf3490e7dfd51643d68e9d42d4b2c9" + }, + { + "name": "lxml", + "version": "6.1.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/lxml-6.1.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "aad89f8107bc74045b86c9b7f7c0984196102520dd7faed5e4e45693b7c315ef" + }, + { + "name": "MarkupSafe", + "version": "3.0.4", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/markupsafe-3.0.4.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "66767d76388ece15d49d50dafb655891ef5d868715e7128e7f7d737a70b353c4" + }, + { + "name": "matplotlib", + "version": "3.10.9", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/matplotlib-3.10.9.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "bea8a4672bbe4f26b7a4fe5bc5e5023a08c4fb7069cc951f39eef26a403c7ea6" + }, + { + "name": "mpmath", + "version": "1.3.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/mpmath-1.3.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "44b66ea444b9c0d19ae94815d356bf047ae6b680c19268b5c265687cd6a81406" + }, + { + "name": "networkx", + "version": "3.4.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/networkx-3.4.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "2e5265dda876ef3c44fefa9e9553499bc564c89a16c95e38bdaf9babc556d1d7" + }, + { + "name": "numpy", + "version": "2.2.6", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/numpy-2.2.6.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "22d648f53848429464ca643b40d73b49a920d47876fc77c395d4dca4e834904a" + }, + { + "name": "packaging", + "version": "26.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/packaging-26.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "70fdb89fc4d4a9a043bf7372b8972bcc883fddff34ab55e9cf80d73875384763" + }, + { + "name": "pandas", + "version": "2.3.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pandas-2.3.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "40ee953dc7ca155840b639a1881ff84578075187fce0ac20eeda55a7fa0d9a90" + }, + { + "name": "paramiko", + "version": "5.0.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/paramiko-5.0.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "94061b17f3d5e7fe935cc7d3bd01baed65533e43e2fcf39825e703d3629998f2" + }, + { + "name": "pillow", + "version": "12.3.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pillow-12.3.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "8fc07146cab33ef7582361dab6eac596d340b03ec648f18217da7894f73838c8" + }, + { + "name": "pluggy", + "version": "1.6.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pluggy-1.6.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "7438c35ee25a095eb7416f84b461c2d74425c5e734ad54c3912453c65244e01c" + }, + { + "name": "psycopg2-binary", + "version": "2.9.13", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/psycopg2_binary-2.9.13.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "a5267b4520191137e34589704162fce02cfd40efcfeb899c45187c7f6bfea7e5" + }, + { + "name": "pybind11", + "version": "3.1.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pybind11-3.1.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "b00ce3708f23fe41c44be8cd46545c9a16c91d9a3e1c51a4047ac683cebe060c" + }, + { + "name": "pycparser", + "version": "3.11", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pycparser-3.11.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "e3a74c846648bb55f4f907284b745e2003b87b96d9c9d17a8a50cf37804541c9" + }, + { + "name": "Pygments", + "version": "2.21.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pygments-2.21.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "1dde075570136774c706bf0009183a793fe0ee262e4a5590cc6eff8453eedd43" + }, + { + "name": "pyinstaller", + "version": "6.22.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pyinstaller-6.22.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "2991d3dcd53fe9966b8c16586322a7f9bbc564dd4752c190bd4fe8d6747f7046" + }, + { + "name": "pyinstaller-hooks-contrib", + "version": "2026.8", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pyinstaller_hooks_contrib-2026.8.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "686e63d76cb494d44c4533ed64a7d797970a1253493a4f875d39defc190396c4" + }, + { + "name": "PyNaCl", + "version": "1.6.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pynacl-1.6.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "143914f93191bef3bff7ba953dea6a38fb05f7f9e38e2a2e6ae31bd14ba81709" + }, + { + "name": "pyparsing", + "version": "3.3.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pyparsing-3.3.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "f2ca34052d720622d300023472ef8ae94fe5b57d69acbb28a8667f6dd0e13497" + }, + { + "name": "pyserial", + "version": "3.5", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pyserial-3.5.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "42a8ab7e94ef0b7baa7e94cdac65d6b9254c608476f630120c990007bf472943" + }, + { + "name": "pytest", + "version": "9.1.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pytest-9.1.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "c5d032518012789cabc870d46589aca3aeda36cf9fa4399ee88bda3d10438451" + }, + { + "name": "python-dateutil", + "version": "2.9.0.post0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/python_dateutil-2.9.0.post0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "a9d436da322be808332f98d88325998e87cb693a678a9969feb4cfad729a6e93" + }, + { + "name": "pytz", + "version": "2026.5", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pytz-2026.5.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "4d20d16f6004b1d7f9b01a96f4d3eb462c0c2a8413d9aa878effe50a21535929" + }, + { + "name": "PyYAML", + "version": "6.0.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/pyyaml-6.0.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "03c3b415ed38d09faedc49360e930769b40c58f68585e6de00e2e4916a858d34" + }, + { + "name": "redis", + "version": "8.1.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/redis-8.1.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "4668671cc6f1f9d6687255571a069e98f146dff48ba9840f38801b3e8cabba06" + }, + { + "name": "requests", + "version": "2.34.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/requests-2.34.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "8c384ba3e979480faae2859d3c5e6c1276dd2c3616e322e124d52c8cfc556f27" + }, + { + "name": "scikit-learn", + "version": "1.7.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/scikit_learn-1.7.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "a301770d816e5ef5e2a262886115f1e6002637324f3bfe73f92378897dea8c63" + }, + { + "name": "scipy", + "version": "1.15.3", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/scipy-1.15.3.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "c75caf32b67a13a9fc16aacf993a8bb883b7a69744ffe77cbbd4f3bfbad28f3d" + }, + { + "name": "setuptools", + "version": "78.1.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools-78.1.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "4444a6b549a8ebb02e1739f4375af7756c841f96f0c31077a183273c7462bd10" + }, + { + "name": "six", + "version": "1.17.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/six-1.17.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "562042078c2752549f6d8a7c86dbc5dd708088a7be6d80672ec7b07100b72468" + }, + { + "name": "soupsieve", + "version": "2.10", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/soupsieve-2.10.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "02ecd6c72d2fa0911bedfd99d53b2198e1bbf556f4606108819e8c19fdf32880" + }, + { + "name": "sympy", + "version": "1.14.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/sympy-1.14.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "b756c2fbfd5be05ac5bdb0ebca61f55618f30f633ed92d88a5687429313a7595" + }, + { + "name": "threadpoolctl", + "version": "3.7.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/threadpoolctl-3.7.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "09b19e721560cd12246402d44e53c1ede5194b8398ef60822f02cab86ccf8d1f" + }, + { + "name": "toml", + "version": "0.10.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/toml-0.10.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "9ff624b29bc48a177f4172c8659e74595485cf7ad9fe4ee340ff8e535594a566" + }, + { + "name": "tomli", + "version": "2.5.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/tomli-2.5.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "91899b0158243d859ca66a875d693bc98c2d979a52854b70d1ee0699f22b5d76" + }, + { + "name": "torch", + "version": "2.14.1+cpu", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/torch-2.14.1+cpu.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "a3fd232f82dcc389c6dab2665dfc17649c03ffb72cb641e96a76a0690177b918" + }, + { + "name": "torchvision", + "version": "0.29.1+cpu", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/torchvision-0.29.1+cpu.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "cb71db60eef9c79bf4e5285afaa79c922003fb33d89f998dddffc85986fce65c" + }, + { + "name": "typing_extensions", + "version": "4.16.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/typing_extensions-4.16.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "b05084ca1d50879865178d9fff9fabeab61bdfb1f361bfbde95421ffc8f9be46" + }, + { + "name": "tzdata", + "version": "2026.5", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/tzdata-2026.5.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "e0780e8b6dc8882ce87e871a9d4589d59cb05a0c2d64f58b1ba62cde1ee91f6a" + }, + { + "name": "urllib3", + "version": "2.8.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/urllib3-2.8.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "10898c620e8007c030e07fa5622b68358a43010025dfbd78a1cb797699de2bb4" + }, + { + "name": "Werkzeug", + "version": "3.1.9", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/werkzeug-3.1.9.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages", + "metadata_sha256": "9f04352e946ecb0883fbf379994c1cacf6720a124acdd7fd59029a889f4eebba" + }, + { + "name": "autocommand", + "version": "2.2.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/autocommand-2.2.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "3800d9b91dceea2065a6ed6279383362e97ac38b8e56b9343f404ee531860099" + }, + { + "name": "backports.tarfile", + "version": "1.2.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/backports.tarfile-1.2.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "8215c54ead77d9dc5a108a25c6bdc72b5999aa6f62c9499a440359412afa5a51" + }, + { + "name": "importlib_metadata", + "version": "8.0.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/importlib_metadata-8.0.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "6a7b90effee1e09d5b484cdf7232016a43e2d9cc9543bcbb8e494b1ec05e1f59" + }, + { + "name": "inflect", + "version": "7.3.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/inflect-7.3.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "66030d634580651b3e53cc19895d9231f8d22aa06b327817c8332cfc20303308" + }, + { + "name": "jaraco.collections", + "version": "5.1.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/jaraco.collections-5.1.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "20c51a96236c0395f53b1f4c5d458e6a0721e51e16c1bff733b7aba76f5d06d8" + }, + { + "name": "jaraco.context", + "version": "5.3.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/jaraco.context-5.3.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "c43b60b897a3d2d37d8845c252fc44261d9aef171e21154111a9012d2afffed6" + }, + { + "name": "jaraco.functools", + "version": "4.0.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/jaraco.functools-4.0.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "8b86946900d7fa38dd1102b9c1ebe17a0cb1f09c8b7e29f61f2bda4a4dc51eca" + }, + { + "name": "jaraco.text", + "version": "3.12.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/jaraco.text-3.12.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "03359d9ba56231f0ce3e840c7cb5a7db380141218949ccaa78ddbd4dcb965d52" + }, + { + "name": "more-itertools", + "version": "10.3.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/more_itertools-10.3.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "0453bdd0ef9f2cd89540ca63ee8212e73b73809514419dd3037d8fe471f737e0" + }, + { + "name": "packaging", + "version": "24.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/packaging-24.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "a211fceacea4e6621f4316364d2d0b7127c00de3856b8062082f9bc5957ea4db" + }, + { + "name": "platformdirs", + "version": "4.2.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/platformdirs-4.2.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "ce6b227b4d46d4cb57474c2022fe57a557933bb89daf4596bdf9b12ac296b869" + }, + { + "name": "tomli", + "version": "2.0.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/tomli-2.0.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "ccf0dc78a98fc0918b5ad67292b1e2c4bed65575a6246cd9d63c914f9942a0f2" + }, + { + "name": "typeguard", + "version": "4.3.0", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/typeguard-4.3.0.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "cf675c1c0a744f08580855390de87cc77d676b312582e8d4cfdb5bb8fd298d21" + }, + { + "name": "typing_extensions", + "version": "4.12.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/typing_extensions-4.12.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "05e51021af1c9d86eb8d6c7e37c4cece733d5065b91a6d8389c5690ed440f16d" + }, + { + "name": "wheel", + "version": "0.45.1", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/wheel-0.45.1.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "98acfce07ee6ee3b31272cde21c4d53918936f434f315dfd2af3886211a09a30" + }, + { + "name": "zipp", + "version": "3.19.2", + "metadata_path": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor/zipp-3.19.2.dist-info/METADATA", + "installation_directory": "/usr/local/lib/python3.10/dist-packages/setuptools/_vendor", + "metadata_sha256": "508ae4fe43081c64b0b0a2828588b3a8cc3430c6693d1676662569400b0dfdb1" + } + ], + "python_environment_configs": [ + { + "path": "/opt/openenv-venv/pyvenv.cfg", + "version_fields": { + "include-system-site-packages": "false", + "version": "3.11.16" + }, + "sha256": "578665659f30145c7e3f19e24dfd3948f138f51894d27153ad647cf13921c1fb" + } + ], + "sdk_requirements_lock": "requirements.lock", + "limitations": [ + "This records installed versions and metadata hashes, not complete source/wheel hashes for every dependency.", + "requirements.lock separately contains the SDK hash lock. The source component alone does not recreate the historical base image with all original package artifacts." + ], + "layer_members_inspected": 122330 +} diff --git a/components/tmax/FILE_ALLOWLIST.json b/components/tmax/FILE_ALLOWLIST.json new file mode 100644 index 0000000000000000000000000000000000000000..683e9434b66946547f97aeedcb08c4654103780b --- /dev/null +++ b/components/tmax/FILE_ALLOWLIST.json @@ -0,0 +1,1318 @@ +{ + "schema_version": 1, + "component": "tmax-six-original-tasks", + "scope": "Exact source package inventory. Only these files and FILE_ALLOWLIST.json belong to this component. This manifest is intentionally not self-hashed.", + "file_count_excluding_manifest": 80, + "frozen_image_application_file_count": 49, + "source_package_only_file_count": 31, + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687", + "files": [ + { + "path": "DEPENDENCIES.json", + "sha256": "58d031f7955f7f774733189b8297a1db7f515bb206c26ac50fad68f580848974", + "bytes": 166362, + "scope": "source_package_only", + "role": "installed_dependency_inventory", + "provenance": { + "kind": "installed_metadata_from_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + } + }, + { + "path": "LICENSE_SCOPE.json", + "sha256": "9ae187d852f4cd6974fc9c65fba942df4e5586d73ddb3c48916a09376a3d36ac", + "bytes": 1360, + "scope": "source_package_only", + "role": "license_and_attribution" + }, + { + "path": "NOTICE.txt", + "sha256": "f30eb64313c2645348ca3d965c40c9a466eb3754f3302206e44133d19bc87d6a", + "bytes": 2235, + "scope": "source_package_only", + "role": "license_and_attribution" + }, + { + "path": "SOURCE.json", + "sha256": "8228f41f6ed3488d787e85f78ec8d9358ff8d5d515c6ec537ab0eb06537048d1", + "bytes": 3663, + "scope": "source_package_only", + "role": "source_provenance_metadata", + "parent_sha256": "b30acbb376179ac85aad2c1596558302d09e0f2674e866e39e956bb416ece6ed" + }, + { + "path": "TASKS.json", + "sha256": "9296f353c436adf1f5019adb05854fec1bb4601f8201a3f5763bf3b4116399e5", + "bytes": 18908, + "scope": "source_package_only", + "role": "source_provenance_metadata", + "parent_sha256": "aaa14217aea9d309bdde28c4ae292be6eedf7700fd392f18775101d35e218ffb" + }, + { + "path": "config.json", + "sha256": "9ffea3f8661105381b8db21a63e9d641b4a2f2c6a3cae9c4de963a51d8d5d8d8", + "bytes": 9224, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/config.json", + "role": "local_runtime_configuration", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + } + }, + { + "path": "licenses/ODC-BY-1.0.txt", + "sha256": "11a6d83734845ad09d809667aa219857a5b985b28c258a2eebf5677668a6bd3b", + "bytes": 19977, + "scope": "source_package_only", + "role": "license_and_attribution", + "provenance": { + "kind": "license_text", + "license_id": "ODC-BY-1.0" + } + }, + { + "path": "licenses/TMAX_DATASET_README.md", + "sha256": "0e66e8816b8f2b4a17d37ec7abc5b8ca5708bae9d71d2c5323d8666d7e7ffa1d", + "bytes": 1830, + "scope": "source_package_only", + "role": "license_and_attribution", + "provenance": { + "dataset": "allenai/TMax-15K", + "revision": "e3ded940596cc611c9815684ba51a7e8ee0cffc9", + "path": "README.md", + "kind": "exact_saved_dataset_readme", + "sha256": "0e66e8816b8f2b4a17d37ec7abc5b8ca5708bae9d71d2c5323d8666d7e7ffa1d" + } + }, + { + "path": "requirements.lock", + "sha256": "836618cb7e01e236878d367272157e4be6a31d538bf8b9f8cc9ed630aac04482", + "bytes": 10667, + "scope": "frozen_image_application", + "image_path": "/opt/openenv-requirements.lock", + "role": "sdk_dependency_hash_lock", + "provenance": { + "kind": "frozen_rootfs_file", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + } + }, + { + "path": "runtime/common/__init__.py", + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/common/__init__.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "path": "runtime/common/contracts.py", + "sha256": "b1e1429208e84aefc2422ee1d2400ad793c43cd5c0e8db213a3b669fe0947ce1", + "bytes": 1015, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/common/contracts.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "2df4ab6636056806069216ee52576ac979255cb895b49b0c72c3686f3d9c5ae2" + }, + { + "path": "runtime/common/http_routes.py", + "sha256": "7263c04e9175faf66501ed9b2ac2f9a637557a8b1966d839fb9944eb01abac0e", + "bytes": 2380, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/common/http_routes.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "2876ad9a5d35eeb0e1ebb40346e5d230d8326ac8280ec260459798cf7a4eee18" + }, + { + "path": "runtime/common/models.py", + "sha256": "26e7a67537ce7ae34909b724243c37242b9c8055cbfe0c717179dac74347786a", + "bytes": 1815, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/common/models.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "9fa259555127367477c21ca27f0ee6ac4a49e5f5744ecd91bf23a3ea1d0ab07d" + }, + { + "path": "runtime/native_shell/__init__.py", + "sha256": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "bytes": 1, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/__init__.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + { + "path": "runtime/native_shell/actor_launcher.py", + "sha256": "80eb3b90287840668e72040dc55ba115bfc3f4251a25cb2b94af0ed3759dd6b3", + "bytes": 5012, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/actor_launcher.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "254abfeedc1d69cf228f923b5b43452d820c8ba5889fd8595e322e19efc7a896" + }, + { + "path": "runtime/native_shell/backend.py", + "sha256": "1a60616f3539f34ab141b3e58292369936844a5c3c4ceba3f58814e04f30b7fe", + "bytes": 13860, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/backend.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "3f7d7c2c894427ebd8cf8e16e5c8007f44412b075a3abf381eb67b1174c67a67" + }, + { + "path": "runtime/native_shell/environment.py", + "sha256": "cfe9ed6c11b9da324f5e752ffbf1d8ca5c074120f6067dd01d99590e568adf53", + "bytes": 1616, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/environment.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "1c1ded0928c4757a87696f818cf9004a29e55f992495ffa0aacde9112dad7fea" + }, + { + "path": "runtime/native_shell/guard.py", + "sha256": "4217040e7b055f57c6faef5aaa2a481757eda9856afb5a8816098b65fe788ef1", + "bytes": 13254, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/guard.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "8b24c249acc86d5d4fad2b495072c7927b353471b18bd4fd881ae7deef206d02" + }, + { + "path": "runtime/native_shell/launch_service.py", + "sha256": "db4dc3e27abe2dc45cc29b534882975aa9ea8e5b8ebedb67c943fad83810805b", + "bytes": 2383, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/launch_service.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "c698c3b27e551f9986bf9e5aac9d337bf2e662058f5ba05d0882aaf2008ff98a" + }, + { + "path": "runtime/native_shell/server.py", + "sha256": "3a0de8fbd07613f323cbd1e42e4345f0268f7a21bc4326622c8e22f4d318f30e", + "bytes": 640, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/server.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "e993b18fd0e871ee97700a725d2d57722428209c34e6caf0fd86479ca6b7a374" + }, + { + "path": "runtime/native_shell/verifier_launcher.py", + "sha256": "6934b8fa5117549cb5ba30a1e6ebbd00df2bf4191ba10765473d05a3fd346465", + "bytes": 962, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/verifier_launcher.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "aa03260a2bcc91c9e23fd32dda0d75d1979ee7f4f64e87ea635f6bcd6048b075" + }, + { + "path": "runtime/native_shell/wire_client.py", + "sha256": "b5267c0f1cc015a68154affade8d89f6b6a01e9e4cc47a2dbdb74020e108ab5f", + "bytes": 4987, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/runtime/native_shell/wire_client.py", + "role": "local_runtime_adapter", + "provenance": { + "kind": "local_adaptation_in_frozen_rootfs", + "source_rootfs_archive_sha256": "bedcbdb12f8cdeb19cc7853e01959028c5c88b6c7f3062007754d0ae5deeb687" + }, + "parent_sha256": "8b05bffad6831c34e38e26926aa121845dc7e4150a6620ef1df690191a84e0d1" + }, + { + "path": "tasks/task_000056_f726766b/source/external/app/vibration_data.wav", + "sha256": "eab8396a1b533f70468039f8ac1b5fe9927faf4ded578172ec932ef7bf2af22a", + "bytes": 40058, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000056_f726766b/source/external/app/vibration_data.wav", + "role": "original_materialized_immutable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000056_f726766b/environment/post_install.sh", + "generator_sha256": "70d52288d5c9a7d23bbd63fb086a7f886961a1335632cc6efb892572d197563b", + "container_path": "/app/vibration_data.wav", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_000056_f726766b/source/instruction.md", + "sha256": "714f780883970365cfffe408e2c76e75f499005f87551fc84b55d79368e77197", + "bytes": 1851, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000056_f726766b/source/instruction.md", + "role": "original_instruction", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/instruction.md", + "upstream_sha256": "714f780883970365cfffe408e2c76e75f499005f87551fc84b55d79368e77197", + "byte_equal": true + } + }, + { + "path": "tasks/task_000056_f726766b/source/task.toml", + "sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "bytes": 981, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000056_f726766b/source/task.toml", + "role": "runtime_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/task.toml", + "upstream_sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "byte_equal": true + } + }, + { + "path": "tasks/task_000056_f726766b/source/tests/test.sh", + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000056_f726766b/source/tests/test.sh", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + { + "path": "tasks/task_000056_f726766b/source/tests/test_final_state.py", + "sha256": "327c5346a779a44e27ef0cbd9f107e863d599fc6e47f95f248eaec03c15117c4", + "bytes": 2866, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000056_f726766b/source/tests/test_final_state.py", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/tests/test_final_state.py", + "upstream_sha256": "327c5346a779a44e27ef0cbd9f107e863d599fc6e47f95f248eaec03c15117c4", + "byte_equal": true + } + }, + { + "path": "tasks/task_000260_7b7cc286/pristine/pipeline/find_threshold.sh", + "sha256": "a6c4cf2043d8642babb9b546096b3f559a375b59d54a43efebd57e9728466184", + "bytes": 720, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/pristine/pipeline/find_threshold.sh", + "role": "original_materialized_editable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "generator_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "container_path": "/home/user/pipeline/find_threshold.sh", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_000260_7b7cc286/pristine/pipeline/process.sh", + "sha256": "4631f1f805e6b826a796502ed5d94e676b3061cf448f2f9225116395aa3bb13b", + "bytes": 500, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/pristine/pipeline/process.sh", + "role": "original_materialized_editable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "generator_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "container_path": "/home/user/pipeline/process.sh", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_000260_7b7cc286/pristine/pipeline/serialize.sh", + "sha256": "f3ae2df41978712dbffe58665a9582e3d0951f211c5cca5ece9f536225d28ba8", + "bytes": 303, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/pristine/pipeline/serialize.sh", + "role": "original_materialized_editable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "generator_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "container_path": "/home/user/pipeline/serialize.sh", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_000260_7b7cc286/source/external/app/video.mp4", + "sha256": "3c04251fe92c30d29ac4d887608f4385176e3bda932594437f82b08a5b348938", + "bytes": 7671, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/source/external/app/video.mp4", + "role": "original_materialized_immutable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "generator_sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "container_path": "/app/video.mp4", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_000260_7b7cc286/source/instruction.md", + "sha256": "79c9fd4e4d41524db109d90b0415a4f0a2b9d24bf690fa8d7340ce3cb5ce0975", + "bytes": 2015, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/source/instruction.md", + "role": "original_instruction", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/instruction.md", + "upstream_sha256": "79c9fd4e4d41524db109d90b0415a4f0a2b9d24bf690fa8d7340ce3cb5ce0975", + "byte_equal": true + } + }, + { + "path": "tasks/task_000260_7b7cc286/source/task.toml", + "sha256": "d36c49060b4ddbca3b13a5aa98cf5b195c07bff725b91107f58a087ec4325423", + "bytes": 961, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/source/task.toml", + "role": "runtime_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "adapted_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/task.toml", + "upstream_sha256": "483c9171d3e67bec029d9b88cee24d554fa9310a61ec47940312be5f2951bc30", + "byte_equal": false, + "change": "Existing offline network setting and appended terminal newline; original task.toml retained under upstream/." + } + }, + { + "path": "tasks/task_000260_7b7cc286/source/tests/test.sh", + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/source/tests/test.sh", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + { + "path": "tasks/task_000260_7b7cc286/source/tests/test_final_state.py", + "sha256": "aae204101d5c024a0b5cbda42fa686e7d2928fd9be3ad55fd14314b2502182a5", + "bytes": 2007, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/source/tests/test_final_state.py", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/tests/test_final_state.py", + "upstream_sha256": "aae204101d5c024a0b5cbda42fa686e7d2928fd9be3ad55fd14314b2502182a5", + "byte_equal": true + } + }, + { + "path": "tasks/task_000663_dff2c340/pristine/backup_catalog.db", + "sha256": "170911a153d00eb0f037ca56a2cbd10d4aa2b7a418e25a0f1df58b1c77589788", + "bytes": 12288, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000663_dff2c340/pristine/backup_catalog.db", + "role": "original_materialized_immutable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_000663_dff2c340/environment/post_install.sh", + "generator_sha256": "a449c18295cee8a3e7ed0c958fe219cbed2d2a8e7fdad924f2679444b3377b94", + "container_path": "/home/user/backup_catalog.db", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_000663_dff2c340/source/instruction.md", + "sha256": "feae25374139b4b1d8ec9759d553c591841d9330a071217f46a2e464bd32bbd7", + "bytes": 1841, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000663_dff2c340/source/instruction.md", + "role": "original_instruction", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/instruction.md", + "upstream_sha256": "feae25374139b4b1d8ec9759d553c591841d9330a071217f46a2e464bd32bbd7", + "byte_equal": true + } + }, + { + "path": "tasks/task_000663_dff2c340/source/task.toml", + "sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "bytes": 852, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000663_dff2c340/source/task.toml", + "role": "runtime_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/task.toml", + "upstream_sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "byte_equal": true + } + }, + { + "path": "tasks/task_000663_dff2c340/source/tests/test.sh", + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000663_dff2c340/source/tests/test.sh", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + { + "path": "tasks/task_000663_dff2c340/source/tests/test_final_state.py", + "sha256": "7a273b9bf8bc61eeec1b8dda674b5f6ba5356abbfd923b413b09d2584c1ef72f", + "bytes": 3341, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_000663_dff2c340/source/tests/test_final_state.py", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/tests/test_final_state.py", + "upstream_sha256": "7a273b9bf8bc61eeec1b8dda674b5f6ba5356abbfd923b413b09d2584c1ef72f", + "byte_equal": true + } + }, + { + "path": "tasks/task_005684_3c8594a3/pristine/compliance_audit.db", + "sha256": "9fe1c89ee823f133d35dea66840ecb7f87d599487524b7aa1d6371e8f664058e", + "bytes": 20480, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_005684_3c8594a3/pristine/compliance_audit.db", + "role": "original_materialized_immutable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_005684_3c8594a3/environment/post_install.sh", + "generator_sha256": "b431517fec535c62b42b517f9212cbb1e9cf80bdf883a55c02bfba08f0d4c404", + "container_path": "/home/user/compliance_audit.db", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_005684_3c8594a3/source/instruction.md", + "sha256": "f4eee4e0643fcfb7399df10e1947ec9dbda28c74bacf307167f443506268f583", + "bytes": 1801, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_005684_3c8594a3/source/instruction.md", + "role": "original_instruction", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/instruction.md", + "upstream_sha256": "f4eee4e0643fcfb7399df10e1947ec9dbda28c74bacf307167f443506268f583", + "byte_equal": true + } + }, + { + "path": "tasks/task_005684_3c8594a3/source/task.toml", + "sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "bytes": 850, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_005684_3c8594a3/source/task.toml", + "role": "runtime_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/task.toml", + "upstream_sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "byte_equal": true + } + }, + { + "path": "tasks/task_005684_3c8594a3/source/tests/test.sh", + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_005684_3c8594a3/source/tests/test.sh", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + { + "path": "tasks/task_005684_3c8594a3/source/tests/test_final_state.py", + "sha256": "495630c7ede4e75ef5644c1ee5b69f04969a4059ef094787c19a3014734d3cf2", + "bytes": 4306, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_005684_3c8594a3/source/tests/test_final_state.py", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/tests/test_final_state.py", + "upstream_sha256": "495630c7ede4e75ef5644c1ee5b69f04969a4059ef094787c19a3014734d3cf2", + "byte_equal": true + } + }, + { + "path": "tasks/task_008667_2151f271/pristine/data/financial.db", + "sha256": "d6b5039ee32f3a43069245984c8fe5a9689028a9aac06e26a64017c54bd11976", + "bytes": 20480, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008667_2151f271/pristine/data/financial.db", + "role": "original_materialized_immutable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_008667_2151f271/environment/post_install.sh", + "generator_sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841", + "container_path": "/home/user/data/financial.db", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_008667_2151f271/pristine/data/transactions.jsonl", + "sha256": "629b28471809f802c58831d100315b83012c0066df3b265a2d379a19e61a2262", + "bytes": 937, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008667_2151f271/pristine/data/transactions.jsonl", + "role": "original_materialized_immutable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_008667_2151f271/environment/post_install.sh", + "generator_sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841", + "container_path": "/home/user/data/transactions.jsonl", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_008667_2151f271/source/instruction.md", + "sha256": "50d1d10121dfa3b565842fd10f2589ceb91b4459126787af7793cec9cc0d06b1", + "bytes": 2436, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008667_2151f271/source/instruction.md", + "role": "original_instruction", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/instruction.md", + "upstream_sha256": "50d1d10121dfa3b565842fd10f2589ceb91b4459126787af7793cec9cc0d06b1", + "byte_equal": true + } + }, + { + "path": "tasks/task_008667_2151f271/source/task.toml", + "sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "bytes": 967, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008667_2151f271/source/task.toml", + "role": "runtime_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/task.toml", + "upstream_sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "byte_equal": true + } + }, + { + "path": "tasks/task_008667_2151f271/source/tests/test.sh", + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008667_2151f271/source/tests/test.sh", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + { + "path": "tasks/task_008667_2151f271/source/tests/test_final_state.py", + "sha256": "cb73fd0ab1765768ebfecc50054ba13c143cc51be201127515eb495904ddf9e6", + "bytes": 3674, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008667_2151f271/source/tests/test_final_state.py", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/tests/test_final_state.py", + "upstream_sha256": "cb73fd0ab1765768ebfecc50054ba13c143cc51be201127515eb495904ddf9e6", + "byte_equal": true + } + }, + { + "path": "tasks/task_008998_ae4cbe72/pristine/robot_dump.log.gz", + "sha256": "909d2e964c0831d8af91b722b4424ed829c261d6b7db1a95180d8a809527ddaf", + "bytes": 261, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008998_ae4cbe72/pristine/robot_dump.log.gz", + "role": "original_materialized_immutable_input", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "materialized_original_setup_output", + "generator_archive_path": "tasks.zip!/task_008998_ae4cbe72/environment/post_install.sh", + "generator_sha256": "26dfa63d063430c2370144b8e30c1f905dde4e2722403c1e8131a5a84e2d5e69", + "container_path": "/home/user/robot_dump.log.gz", + "direct_archive_member": false + } + }, + { + "path": "tasks/task_008998_ae4cbe72/source/instruction.md", + "sha256": "f81f86b07681931baabdba313cc4e988c01bff7a1f1d83349dfa939cdaa20669", + "bytes": 1919, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008998_ae4cbe72/source/instruction.md", + "role": "original_instruction", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/instruction.md", + "upstream_sha256": "f81f86b07681931baabdba313cc4e988c01bff7a1f1d83349dfa939cdaa20669", + "byte_equal": true + } + }, + { + "path": "tasks/task_008998_ae4cbe72/source/task.toml", + "sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "bytes": 823, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008998_ae4cbe72/source/task.toml", + "role": "runtime_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/task.toml", + "upstream_sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "byte_equal": true + } + }, + { + "path": "tasks/task_008998_ae4cbe72/source/tests/test.sh", + "sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "bytes": 290, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008998_ae4cbe72/source/tests/test.sh", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/tests/test.sh", + "upstream_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "byte_equal": true + } + }, + { + "path": "tasks/task_008998_ae4cbe72/source/tests/test_final_state.py", + "sha256": "e03b84ca0519367e5f86b7b3a3231afa5209b1971431497699200099035f5014", + "bytes": 2893, + "scope": "frozen_image_application", + "image_path": "/opt/native-shell/tasks/task_008998_ae4cbe72/source/tests/test_final_state.py", + "role": "original_checker", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/tests/test_final_state.py", + "upstream_sha256": "e03b84ca0519367e5f86b7b3a3231afa5209b1971431497699200099035f5014", + "byte_equal": true + } + }, + { + "path": "upstream/task_000056_f726766b/environment/Dockerfile", + "sha256": "c44d259c4421b16dc5f0bc3912cdd800f6c25746ea31bede5060c9605b225025", + "bytes": 521, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/Dockerfile", + "byte_equal": true + } + }, + { + "path": "upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.label.txt", + "sha256": "fc9e91cc78e1817d80b4ba8c2dc9a638d0c57959825ee34f5e3d7688ad80dfb9", + "bytes": 3, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.label.txt", + "byte_equal": true + } + }, + { + "path": "upstream/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.wav", + "sha256": "f55a8eec263c9be975b2adccdda6a07c680109b851a89f55779f14076aaa30d5", + "bytes": 16044, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/_fixtures/app/fixtures/audio.wav", + "byte_equal": true + } + }, + { + "path": "upstream/task_000056_f726766b/environment/base_install.sh", + "sha256": "0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637", + "bytes": 2849, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/base_install.sh", + "byte_equal": true + } + }, + { + "path": "upstream/task_000056_f726766b/environment/post_install.sh", + "sha256": "70d52288d5c9a7d23bbd63fb086a7f886961a1335632cc6efb892572d197563b", + "bytes": 940, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/environment/post_install.sh", + "byte_equal": true + } + }, + { + "path": "upstream/task_000056_f726766b/task.toml", + "sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "bytes": 981, + "scope": "source_package_only", + "role": "upstream_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000056_f726766b/task.toml", + "byte_equal": true + } + }, + { + "path": "upstream/task_000260_7b7cc286/environment/Dockerfile", + "sha256": "98f66d958e8ee701c0579095c2e65254a63194845b894a45db2a6180a46a3193", + "bytes": 521, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/Dockerfile", + "byte_equal": true + } + }, + { + "path": "upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.label.txt", + "sha256": "4a44dc15364204a80fe80e9039455cc1608281820fe2b24f1e5233ade6af1dd5", + "bytes": 2, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.label.txt", + "byte_equal": true + } + }, + { + "path": "upstream/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.mp4", + "sha256": "bf759113108b136ec3b5fa507d035c1e66ac243b52da09fa07ab58566ee27f58", + "bytes": 3342, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/_fixtures/app/fixtures/video.mp4", + "byte_equal": true + } + }, + { + "path": "upstream/task_000260_7b7cc286/environment/base_install.sh", + "sha256": "0e71b3e06fcf8cc6f9d95ba2e9664dfbba7786949a0e21b810ada563ae27a637", + "bytes": 2849, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/base_install.sh", + "byte_equal": true + } + }, + { + "path": "upstream/task_000260_7b7cc286/environment/post_install.sh", + "sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03", + "bytes": 2093, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/environment/post_install.sh", + "byte_equal": true + } + }, + { + "path": "upstream/task_000260_7b7cc286/task.toml", + "sha256": "483c9171d3e67bec029d9b88cee24d554fa9310a61ec47940312be5f2951bc30", + "bytes": 954, + "scope": "source_package_only", + "role": "upstream_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000260_7b7cc286/task.toml", + "byte_equal": true + } + }, + { + "path": "upstream/task_000663_dff2c340/environment/Dockerfile", + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/environment/Dockerfile", + "byte_equal": true + } + }, + { + "path": "upstream/task_000663_dff2c340/environment/post_install.sh", + "sha256": "a449c18295cee8a3e7ed0c958fe219cbed2d2a8e7fdad924f2679444b3377b94", + "bytes": 1661, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/environment/post_install.sh", + "byte_equal": true + } + }, + { + "path": "upstream/task_000663_dff2c340/task.toml", + "sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "bytes": 852, + "scope": "source_package_only", + "role": "upstream_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_000663_dff2c340/task.toml", + "byte_equal": true + } + }, + { + "path": "upstream/task_005684_3c8594a3/environment/Dockerfile", + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/environment/Dockerfile", + "byte_equal": true + } + }, + { + "path": "upstream/task_005684_3c8594a3/environment/post_install.sh", + "sha256": "b431517fec535c62b42b517f9212cbb1e9cf80bdf883a55c02bfba08f0d4c404", + "bytes": 2072, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/environment/post_install.sh", + "byte_equal": true + } + }, + { + "path": "upstream/task_005684_3c8594a3/task.toml", + "sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "bytes": 850, + "scope": "source_package_only", + "role": "upstream_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_005684_3c8594a3/task.toml", + "byte_equal": true + } + }, + { + "path": "upstream/task_008667_2151f271/environment/Dockerfile", + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/environment/Dockerfile", + "byte_equal": true + } + }, + { + "path": "upstream/task_008667_2151f271/environment/post_install.sh", + "sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841", + "bytes": 2459, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/environment/post_install.sh", + "byte_equal": true + } + }, + { + "path": "upstream/task_008667_2151f271/task.toml", + "sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "bytes": 967, + "scope": "source_package_only", + "role": "upstream_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008667_2151f271/task.toml", + "byte_equal": true + } + }, + { + "path": "upstream/task_008998_ae4cbe72/environment/Dockerfile", + "sha256": "ac07540077f0810363eb57110b6cefeae93df6271c1cc6121d2d62cdc13a9535", + "bytes": 154, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/environment/Dockerfile", + "byte_equal": true + } + }, + { + "path": "upstream/task_008998_ae4cbe72/environment/post_install.sh", + "sha256": "26dfa63d063430c2370144b8e30c1f905dde4e2722403c1e8131a5a84e2d5e69", + "bytes": 723, + "scope": "source_package_only", + "role": "upstream_environment_reference", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/environment/post_install.sh", + "byte_equal": true + } + }, + { + "path": "upstream/task_008998_ae4cbe72/task.toml", + "sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "bytes": 823, + "scope": "source_package_only", + "role": "upstream_task_metadata", + "provenance": { + "dataset": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "kind": "exact_archive_member", + "archive_path": "tasks.zip!/task_008998_ae4cbe72/task.toml", + "byte_equal": true + } + } + ], + "directories": [ + { + "path": "tasks/task_000056_f726766b/pristine", + "role": "frozen_pristine_workspace_root", + "image_path": "/opt/native-shell/tasks/task_000056_f726766b/pristine", + "task_id": "task_000056_f726766b", + "must_preserve_when_empty": true, + "empty": true + }, + { + "path": "tasks/task_000056_f726766b/source", + "role": "frozen_task_source_root", + "image_path": "/opt/native-shell/tasks/task_000056_f726766b/source", + "task_id": "task_000056_f726766b", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_000260_7b7cc286/pristine", + "role": "frozen_pristine_workspace_root", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/pristine", + "task_id": "task_000260_7b7cc286", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_000260_7b7cc286/source", + "role": "frozen_task_source_root", + "image_path": "/opt/native-shell/tasks/task_000260_7b7cc286/source", + "task_id": "task_000260_7b7cc286", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_000663_dff2c340/pristine", + "role": "frozen_pristine_workspace_root", + "image_path": "/opt/native-shell/tasks/task_000663_dff2c340/pristine", + "task_id": "task_000663_dff2c340", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_000663_dff2c340/source", + "role": "frozen_task_source_root", + "image_path": "/opt/native-shell/tasks/task_000663_dff2c340/source", + "task_id": "task_000663_dff2c340", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_005684_3c8594a3/pristine", + "role": "frozen_pristine_workspace_root", + "image_path": "/opt/native-shell/tasks/task_005684_3c8594a3/pristine", + "task_id": "task_005684_3c8594a3", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_005684_3c8594a3/source", + "role": "frozen_task_source_root", + "image_path": "/opt/native-shell/tasks/task_005684_3c8594a3/source", + "task_id": "task_005684_3c8594a3", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_008667_2151f271/pristine", + "role": "frozen_pristine_workspace_root", + "image_path": "/opt/native-shell/tasks/task_008667_2151f271/pristine", + "task_id": "task_008667_2151f271", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_008667_2151f271/source", + "role": "frozen_task_source_root", + "image_path": "/opt/native-shell/tasks/task_008667_2151f271/source", + "task_id": "task_008667_2151f271", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_008998_ae4cbe72/pristine", + "role": "frozen_pristine_workspace_root", + "image_path": "/opt/native-shell/tasks/task_008998_ae4cbe72/pristine", + "task_id": "task_008998_ae4cbe72", + "must_preserve_when_empty": true, + "empty": false + }, + { + "path": "tasks/task_008998_ae4cbe72/source", + "role": "frozen_task_source_root", + "image_path": "/opt/native-shell/tasks/task_008998_ae4cbe72/source", + "task_id": "task_008998_ae4cbe72", + "must_preserve_when_empty": true, + "empty": false + } + ], + "directory_note": "Task source and pristine roots must exist, including empty roots. Directory content is covered by the file allowlist; these directory entries are not content-hashed." +} diff --git a/components/tmax/LICENSE_SCOPE.json b/components/tmax/LICENSE_SCOPE.json new file mode 100644 index 0000000000000000000000000000000000000000..4adf3be26fdbb1b84c8df2c342018ebb5478eb3b --- /dev/null +++ b/components/tmax/LICENSE_SCOPE.json @@ -0,0 +1,26 @@ +{ + "schema_version": 1, + "original_task_collection": { + "license": "ODC-BY-1.0", + "declared_by": "allenai/TMax-15K", + "scope": "Original TMax database and selected task data, as declared by the original dataset. The included license text defines its scope.", + "notice": "NOTICE.txt", + "license_text": "licenses/ODC-BY-1.0.txt", + "original_readme": "licenses/TMAX_DATASET_README.md" + }, + "harbor_conversion": { + "source": "TMaxxx/TMax-15K-Harbor", + "separate_license_declared": false, + "note": "Pinned converter metadata does not supply a separate license declaration. Original provenance is retained; no new license is assigned to converter-specific work." + }, + "local_adapter": { + "scope": "OpenEnv runtime, isolation, configuration, source metadata and packaging", + "note": "Local adaptation is identified separately from upstream source; this metadata does not assign it the dataset license." + }, + "dependencies": { + "scope": "Installed third-party system packages, Python packages and OpenEnv SDK", + "note": "Each dependency retains its existing license. Dataset licensing does not relicense installed dependencies. Retain license notices present in the offline image and use included dependency inventories for versions.", + "inventory": "DEPENDENCIES.json", + "sdk_hash_lock": "requirements.lock" + } +} diff --git a/components/tmax/NOTICE.txt b/components/tmax/NOTICE.txt new file mode 100644 index 0000000000000000000000000000000000000000..dd78c373d6bc0971c122737b68d4d1830d27cbd5 --- /dev/null +++ b/components/tmax/NOTICE.txt @@ -0,0 +1,42 @@ +Six original TMax training tasks + +Original task collection: Allen Institute for AI (Ai2), allenai/TMax-15K +Revision: e3ded940596cc611c9815684ba51a7e8ee0cffc9 +https://huggingface.co/datasets/allenai/TMax-15K/tree/e3ded940596cc611c9815684ba51a7e8ee0cffc9 + +Harbor packaging: TMaxxx/TMax-15K-Harbor +Revision: 48a77eb0b017606c643ed905f96db41672914798 +https://huggingface.co/datasets/TMaxxx/TMax-15K-Harbor/tree/48a77eb0b017606c643ed905f96db41672914798 + +The original dataset declares Open Data Commons Attribution License 1.0. +See licenses/ODC-BY-1.0.txt and LICENSE_SCOPE.json. The Harbor converter +has no separate license declaration in its pinned dataset metadata. +Existing third-party software retains its respective license. + +The original dataset README states that the dataset is intended for research +and educational use in accordance with Ai2 Responsible Use Guidelines, and +that it includes Gemini 3.1 Pro outputs subject to Google's Terms of Service. +The exact original README, including these links and citation, is preserved +in licenses/TMAX_DATASET_README.md. + +Please cite: +Hamish Ivison, Junjie Oscar Yin, Rulin Shao, Teng Xiao, Nathan Lambert, +and Hannaneh Hajishirzi. Tmax: A simple recipe for terminal agents. 2026. +https://arxiv.org/abs/2606.23321 + +Instructions and checker files are preserved byte-for-byte from the pinned +Harbor archive. Inputs are materialized from the original task setup. +Original environment files and task metadata are retained under upstream/. +For task_000260_7b7cc286, the existing runtime task.toml uses an offline +network setting; its exact original counterpart is retained under upstream/. +TASKS.json records the source and runtime mappings. + +This component adds a shared OpenEnv interface and isolated execution. +The adapter restores original pristine-file permissions between episodes +before protecting inputs and removes workspace symlinks without following +their targets. These changes concern episode lifecycle and packaging. + +Teacher rollouts, model answers, local CPU control programs and research +reports are excluded. Original reference information inside published +checkers and setup scripts is retained for provenance and scoring; it is +not exposed to the actor as an answer source. diff --git a/components/tmax/SOURCE.json b/components/tmax/SOURCE.json new file mode 100644 index 0000000000000000000000000000000000000000..4c7e718aadd8ba7a88528b00364c16f76fec977f --- /dev/null +++ b/components/tmax/SOURCE.json @@ -0,0 +1,53 @@ +{ + "schema_version": 1, + "component": "tmax-six-original-tasks", + "source_dataset": { + "id": "TMaxxx/TMax-15K-Harbor", + "revision": "48a77eb0b017606c643ed905f96db41672914798", + "url": "https://huggingface.co/datasets/TMaxxx/TMax-15K-Harbor/tree/48a77eb0b017606c643ed905f96db41672914798", + "archive": "tasks.zip", + "archive_sha256": "dc93985e031e14b5c5777f03345bf777b4fb0dfad7b38bbd9c6d952a540c4b9a", + "archive_bytes": 85837408, + "separate_converter_license_declared_in_pinned_metadata": false + }, + "original_dataset": { + "id": "allenai/TMax-15K", + "revision": "e3ded940596cc611c9815684ba51a7e8ee0cffc9", + "authors": "Allen Institute for AI (Ai2); Hamish Ivison, Junjie Oscar Yin, Rulin Shao, Teng Xiao, Nathan Lambert, Hannaneh Hajishirzi", + "url": "https://huggingface.co/datasets/allenai/TMax-15K/tree/e3ded940596cc611c9815684ba51a7e8ee0cffc9", + "declared_license": "ODC-BY-1.0", + "license_text": "licenses/ODC-BY-1.0.txt", + "dataset_readme": "licenses/TMAX_DATASET_README.md", + "dataset_readme_sha256": "0e66e8816b8f2b4a17d37ec7abc5b8ca5708bae9d71d2c5323d8666d7e7ffa1d", + "upstream_notice": "The original dataset README states research and educational use in accordance with Ai2 Responsible Use Guidelines, and that included Gemini 3.1 Pro outputs are subject to Google Terms of Service." + }, + "task_ids": [ + "task_000663_dff2c340", + "task_005684_3c8594a3", + "task_008998_ae4cbe72", + "task_008667_2151f271", + "task_000260_7b7cc286", + "task_000056_f726766b" + ], + "task_data_scope": "Six fixed original tasks. No generated variants.", + "instruction_and_checker_provenance": "Frozen instructions and test files are checked byte-for-byte against tasks.zip at the pinned Harbor revision. This claim is relative to the Harbor conversion, not a separate full byte comparison with the Ai2 archive.", + "input_provenance": "Frozen task inputs are outputs of the original task setup. They are materialized runtime assets, not direct archive members. The original environment source is retained under upstream//environment/; TASKS.json gives hashes and mappings.", + "upstream_copies": "upstream// contains exact archived environment files and task.toml. These files document original setup and are not executed by the frozen runtime.", + "adaptations": [ + "A shared OpenEnv interface selects among six fixed task IDs and exposes exec/finish actions.", + "Actor and verifier execute under separate user identities; private source and pristine assets are supervisor-owned.", + "The adapter restores original pristine permissions between episodes before protecting immutable inputs, and removes workspace symlinks without following their targets.", + "Runtime inputs are pre-materialized for offline execution; original task setup scripts are retained as source.", + "For task_000260_7b7cc286 only, the existing runtime task.toml changes allow_internet=true to network_mode=\"no-network\" and appends a newline. Its original task.toml is retained under upstream/. Instruction, input and checker semantics are preserved." + ], + "license_scope": "LICENSE_SCOPE.json", + "inventory": "FILE_ALLOWLIST.json", + "tasks": "TASKS.json", + "frozen_runtime": { + "application_file_count": 49, + "mapping": "FILE_ALLOWLIST.json entries with image_path identify the exact 49 frozen application files. The upstream, license and provenance additions are source-package-only files.", + "adapter_revision": "clean-20261011" + }, + "dependency_notes": "Installed versions: DEPENDENCIES.json. SDK environment: requirements.lock.", + "dependency_inventory": "DEPENDENCIES.json" +} diff --git a/components/tmax/TASKS.json b/components/tmax/TASKS.json new file mode 100644 index 0000000000000000000000000000000000000000..d19e6e49a9f032bff933c11fe7d1802663f6e1ea --- /dev/null +++ b/components/tmax/TASKS.json @@ -0,0 +1,422 @@ +{ + "schema_version": 1, + "fixed_original_task_count": 6, + "selection": "reset chooses a task_id from the six entries; the task definitions and materialized inputs are fixed", + "adapter_limits": { + "max_actions": 64, + "command_timeout_sec": 120, + "output_limit_bytes": 65536 + }, + "tasks": [ + { + "task_id": "task_000663_dff2c340", + "description": "database reliability engineer managing backups", + "domain": "data_querying", + "skill_type": "Result Processing", + "workspace": "/home/user", + "instruction": "tasks/task_000663_dff2c340/source/instruction.md", + "instruction_sha256": "feae25374139b4b1d8ec9759d553c591841d9330a071217f46a2e464bd32bbd7", + "original_task_metadata": { + "path": "upstream/task_000663_dff2c340/task.toml", + "sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a" + }, + "runtime_task_metadata": { + "path": "tasks/task_000663_dff2c340/source/task.toml", + "sha256": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "matches_upstream_bytes": true, + "changes": [] + }, + "original_setup": { + "path": "upstream/task_000663_dff2c340/environment/post_install.sh", + "sha256": "a449c18295cee8a3e7ed0c958fe219cbed2d2a8e7fdad924f2679444b3377b94" + }, + "original_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048, + "allow_internet": true + }, + "runtime_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048 + }, + "inputs": [ + { + "path": "tasks/task_000663_dff2c340/pristine/backup_catalog.db", + "container_path": "/home/user/backup_catalog.db", + "sha256": "170911a153d00eb0f037ca56a2cbd10d4aa2b7a418e25a0f1df58b1c77589788", + "editable": false, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_000663_dff2c340/environment/post_install.sh" + } + ], + "editable_directories": [], + "outputs": [ + "/home/user/restore_plan.json" + ], + "grading": { + "mode": "file-output", + "kind": "pytest", + "checker": "tasks/task_000663_dff2c340/source/tests/test_final_state.py", + "checker_sha256": "7a273b9bf8bc61eeec1b8dda674b5f6ba5356abbfd923b413b09d2584c1ef72f", + "original_launcher": "tasks/task_000663_dff2c340/source/tests/test.sh", + "original_launcher_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "executes_learner_code": false, + "reward": "1 if the unchanged original assertions pass; 0 otherwise" + }, + "source_archive_prefix": "tasks.zip!/task_000663_dff2c340/", + "input_materialization": "Original Python fixture body extracted unchanged from original post_install.sh and run at its original absolute paths in the compatible preinstalled base; package installation commands were omitted." + }, + { + "task_id": "task_005684_3c8594a3", + "description": "compliance officer auditing systems", + "domain": "data_querying", + "skill_type": "Graph Processing", + "workspace": "/home/user", + "instruction": "tasks/task_005684_3c8594a3/source/instruction.md", + "instruction_sha256": "f4eee4e0643fcfb7399df10e1947ec9dbda28c74bacf307167f443506268f583", + "original_task_metadata": { + "path": "upstream/task_005684_3c8594a3/task.toml", + "sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2" + }, + "runtime_task_metadata": { + "path": "tasks/task_005684_3c8594a3/source/task.toml", + "sha256": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "matches_upstream_bytes": true, + "changes": [] + }, + "original_setup": { + "path": "upstream/task_005684_3c8594a3/environment/post_install.sh", + "sha256": "b431517fec535c62b42b517f9212cbb1e9cf80bdf883a55c02bfba08f0d4c404" + }, + "original_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048, + "allow_internet": true + }, + "runtime_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048 + }, + "inputs": [ + { + "path": "tasks/task_005684_3c8594a3/pristine/compliance_audit.db", + "container_path": "/home/user/compliance_audit.db", + "sha256": "9fe1c89ee823f133d35dea66840ecb7f87d599487524b7aa1d6371e8f664058e", + "editable": false, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_005684_3c8594a3/environment/post_install.sh" + } + ], + "editable_directories": [], + "outputs": [ + "/home/user/audit_report.json" + ], + "grading": { + "mode": "file-output", + "kind": "pytest", + "checker": "tasks/task_005684_3c8594a3/source/tests/test_final_state.py", + "checker_sha256": "495630c7ede4e75ef5644c1ee5b69f04969a4059ef094787c19a3014734d3cf2", + "original_launcher": "tasks/task_005684_3c8594a3/source/tests/test.sh", + "original_launcher_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "executes_learner_code": false, + "reward": "1 if the unchanged original assertions pass; 0 otherwise" + }, + "source_archive_prefix": "tasks.zip!/task_005684_3c8594a3/", + "input_materialization": "Original Python fixture body extracted unchanged from original post_install.sh and run at its original absolute paths in the compatible preinstalled base; package installation commands were omitted." + }, + { + "task_id": "task_008998_ae4cbe72", + "description": "backup administrator archiving data", + "domain": "file_operations", + "skill_type": "File I/O", + "workspace": "/home/user", + "instruction": "tasks/task_008998_ae4cbe72/source/instruction.md", + "instruction_sha256": "f81f86b07681931baabdba313cc4e988c01bff7a1f1d83349dfa939cdaa20669", + "original_task_metadata": { + "path": "upstream/task_008998_ae4cbe72/task.toml", + "sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9" + }, + "runtime_task_metadata": { + "path": "tasks/task_008998_ae4cbe72/source/task.toml", + "sha256": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "matches_upstream_bytes": true, + "changes": [] + }, + "original_setup": { + "path": "upstream/task_008998_ae4cbe72/environment/post_install.sh", + "sha256": "26dfa63d063430c2370144b8e30c1f905dde4e2722403c1e8131a5a84e2d5e69" + }, + "original_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048, + "allow_internet": true + }, + "runtime_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048 + }, + "inputs": [ + { + "path": "tasks/task_008998_ae4cbe72/pristine/robot_dump.log.gz", + "container_path": "/home/user/robot_dump.log.gz", + "sha256": "909d2e964c0831d8af91b722b4424ed829c261d6b7db1a95180d8a809527ddaf", + "editable": false, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_008998_ae4cbe72/environment/post_install.sh" + } + ], + "editable_directories": [], + "outputs": [ + "/home/user/archived_gcode", + "/home/user/critical_errors.csv" + ], + "grading": { + "mode": "file-output", + "kind": "pytest", + "checker": "tasks/task_008998_ae4cbe72/source/tests/test_final_state.py", + "checker_sha256": "e03b84ca0519367e5f86b7b3a3231afa5209b1971431497699200099035f5014", + "original_launcher": "tasks/task_008998_ae4cbe72/source/tests/test.sh", + "original_launcher_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "executes_learner_code": false, + "reward": "1 if the unchanged original assertions pass; 0 otherwise" + }, + "source_archive_prefix": "tasks.zip!/task_008998_ae4cbe72/", + "input_materialization": "Original Python fixture body extracted unchanged from original post_install.sh and run at its original absolute paths in the compatible preinstalled base; package installation commands were omitted." + }, + { + "task_id": "task_008667_2151f271", + "description": "data engineer building ETL pipelines", + "domain": "data_querying", + "skill_type": "Result Processing", + "workspace": "/home/user", + "instruction": "tasks/task_008667_2151f271/source/instruction.md", + "instruction_sha256": "50d1d10121dfa3b565842fd10f2589ceb91b4459126787af7793cec9cc0d06b1", + "original_task_metadata": { + "path": "upstream/task_008667_2151f271/task.toml", + "sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897" + }, + "runtime_task_metadata": { + "path": "tasks/task_008667_2151f271/source/task.toml", + "sha256": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "matches_upstream_bytes": true, + "changes": [] + }, + "original_setup": { + "path": "upstream/task_008667_2151f271/environment/post_install.sh", + "sha256": "3a777366c4b998e6368627f4775a73cea29fdbdc9991daedfb13244153c17841" + }, + "original_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048, + "allow_internet": true + }, + "runtime_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048 + }, + "inputs": [ + { + "path": "tasks/task_008667_2151f271/pristine/data/financial.db", + "container_path": "/home/user/data/financial.db", + "sha256": "d6b5039ee32f3a43069245984c8fe5a9689028a9aac06e26a64017c54bd11976", + "editable": false, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_008667_2151f271/environment/post_install.sh" + }, + { + "path": "tasks/task_008667_2151f271/pristine/data/transactions.jsonl", + "container_path": "/home/user/data/transactions.jsonl", + "sha256": "629b28471809f802c58831d100315b83012c0066df3b265a2d379a19e61a2262", + "editable": false, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_008667_2151f271/environment/post_install.sh" + } + ], + "editable_directories": [], + "outputs": [ + "/home/user/output/fraud_cycles.json" + ], + "grading": { + "mode": "file-output", + "kind": "pytest", + "checker": "tasks/task_008667_2151f271/source/tests/test_final_state.py", + "checker_sha256": "cb73fd0ab1765768ebfecc50054ba13c143cc51be201127515eb495904ddf9e6", + "original_launcher": "tasks/task_008667_2151f271/source/tests/test.sh", + "original_launcher_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "executes_learner_code": false, + "reward": "1 if the unchanged original assertions pass; 0 otherwise" + }, + "source_archive_prefix": "tasks.zip!/task_008667_2151f271/", + "input_materialization": "Original Python fixture body extracted unchanged from original post_install.sh and run at its original absolute paths in the compatible preinstalled base; package installation commands were omitted." + }, + { + "task_id": "task_000260_7b7cc286", + "description": "developer inheriting an unfamiliar codebase", + "domain": "debugging", + "skill_type": "Data Processing", + "workspace": "/home/user", + "instruction": "tasks/task_000260_7b7cc286/source/instruction.md", + "instruction_sha256": "79c9fd4e4d41524db109d90b0415a4f0a2b9d24bf690fa8d7340ce3cb5ce0975", + "original_task_metadata": { + "path": "upstream/task_000260_7b7cc286/task.toml", + "sha256": "483c9171d3e67bec029d9b88cee24d554fa9310a61ec47940312be5f2951bc30" + }, + "runtime_task_metadata": { + "path": "tasks/task_000260_7b7cc286/source/task.toml", + "sha256": "d36c49060b4ddbca3b13a5aa98cf5b195c07bff725b91107f58a087ec4325423", + "matches_upstream_bytes": false, + "changes": [ + "allow_internet = true replaced with network_mode = \"no-network\"", + "terminal newline appended" + ] + }, + "original_setup": { + "path": "upstream/task_000260_7b7cc286/environment/post_install.sh", + "sha256": "ba40e8bc5a20718d686892069c073ee96760685a32fe3291f2f6fbb630a7ae03" + }, + "original_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048, + "allow_internet": true + }, + "runtime_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048 + }, + "inputs": [ + { + "path": "tasks/task_000260_7b7cc286/pristine/pipeline/find_threshold.sh", + "container_path": "/home/user/pipeline/find_threshold.sh", + "sha256": "a6c4cf2043d8642babb9b546096b3f559a375b59d54a43efebd57e9728466184", + "editable": true, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_000260_7b7cc286/environment/post_install.sh" + }, + { + "path": "tasks/task_000260_7b7cc286/pristine/pipeline/process.sh", + "container_path": "/home/user/pipeline/process.sh", + "sha256": "4631f1f805e6b826a796502ed5d94e676b3061cf448f2f9225116395aa3bb13b", + "editable": true, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_000260_7b7cc286/environment/post_install.sh" + }, + { + "path": "tasks/task_000260_7b7cc286/pristine/pipeline/serialize.sh", + "container_path": "/home/user/pipeline/serialize.sh", + "sha256": "f3ae2df41978712dbffe58665a9582e3d0951f211c5cca5ece9f536225d28ba8", + "editable": true, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_000260_7b7cc286/environment/post_install.sh" + }, + { + "path": "tasks/task_000260_7b7cc286/source/external/app/video.mp4", + "container_path": "/app/video.mp4", + "sha256": "3c04251fe92c30d29ac4d887608f4385176e3bda932594437f82b08a5b348938", + "editable": false, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_000260_7b7cc286/environment/post_install.sh" + } + ], + "editable_directories": [ + "/home/user/pipeline" + ], + "outputs": [ + "/home/user/output.json" + ], + "grading": { + "mode": "file-output", + "kind": "pytest", + "checker": "tasks/task_000260_7b7cc286/source/tests/test_final_state.py", + "checker_sha256": "aae204101d5c024a0b5cbda42fa686e7d2928fd9be3ad55fd14314b2502182a5", + "original_launcher": "tasks/task_000260_7b7cc286/source/tests/test.sh", + "original_launcher_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "executes_learner_code": false, + "reward": "1 if the unchanged original assertions pass; 0 otherwise" + }, + "source_archive_prefix": "tasks.zip!/task_000260_7b7cc286/", + "input_materialization": "Original post_install.sh generated the video and three pipeline scripts in the existing science base. Pipeline bytes independently match their original shell heredocs. The frozen video hash is the recorded original-setup build output." + }, + { + "task_id": "task_000056_f726766b", + "description": "data scientist fitting models", + "domain": "scientific_computing", + "skill_type": "Algorithmic", + "workspace": "/home/user", + "instruction": "tasks/task_000056_f726766b/source/instruction.md", + "instruction_sha256": "714f780883970365cfffe408e2c76e75f499005f87551fc84b55d79368e77197", + "original_task_metadata": { + "path": "upstream/task_000056_f726766b/task.toml", + "sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0" + }, + "runtime_task_metadata": { + "path": "tasks/task_000056_f726766b/source/task.toml", + "sha256": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "matches_upstream_bytes": true, + "changes": [] + }, + "original_setup": { + "path": "upstream/task_000056_f726766b/environment/post_install.sh", + "sha256": "70d52288d5c9a7d23bbd63fb086a7f886961a1335632cc6efb892572d197563b" + }, + "original_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048, + "allow_internet": true + }, + "runtime_limits": { + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "cpus": 1, + "memory_mb": 2048 + }, + "inputs": [ + { + "path": "tasks/task_000056_f726766b/source/external/app/vibration_data.wav", + "container_path": "/app/vibration_data.wav", + "sha256": "eab8396a1b533f70468039f8ac1b5fe9927faf4ded578172ec932ef7bf2af22a", + "editable": false, + "origin": "materialized_from_original_post_install", + "setup_path": "upstream/task_000056_f726766b/environment/post_install.sh" + } + ], + "editable_directories": [], + "outputs": [ + "/home/user/parameters.json" + ], + "grading": { + "mode": "file-output", + "kind": "pytest", + "checker": "tasks/task_000056_f726766b/source/tests/test_final_state.py", + "checker_sha256": "327c5346a779a44e27ef0cbd9f107e863d599fc6e47f95f248eaec03c15117c4", + "original_launcher": "tasks/task_000056_f726766b/source/tests/test.sh", + "original_launcher_sha256": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "executes_learner_code": false, + "reward": "1 if the unchanged original assertions pass; 0 otherwise" + }, + "source_archive_prefix": "tasks.zip!/task_000056_f726766b/", + "input_materialization": "The original post_install.sh data generator produced the frozen vibration WAV in the retained science runtime; the frozen WAV hash matches the reviewed base-image policy." + } + ] +} diff --git a/components/tmax/config.json b/components/tmax/config.json new file mode 100644 index 0000000000000000000000000000000000000000..76acddb88f734e2f0c8266b97712dbe0d93021bd --- /dev/null +++ b/components/tmax/config.json @@ -0,0 +1,244 @@ +{ + "tasks": [ + { + "id": "task_000663_dff2c340", + "source": "/opt/native-shell/tasks/task_000663_dff2c340/source", + "pristine_workspace": "/opt/native-shell/tasks/task_000663_dff2c340/pristine", + "workspace": "/home/user", + "inputs": [ + "/home/user/backup_catalog.db" + ], + "outputs": [ + "/home/user/restore_plan.json" + ], + "editable": [], + "external_inputs": {}, + "grading_mode": "file-output", + "grader": { + "kind": "pytest", + "test_file": "test_final_state.py", + "executes_learner_code": false + }, + "python": "/usr/bin/python3", + "cpus": 1, + "memory_mb": 2048, + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "source_sha256": { + "instruction.md": "feae25374139b4b1d8ec9759d553c591841d9330a071217f46a2e464bd32bbd7", + "task.toml": "85d17b0b5f2f018805d139044cedadeda55cc93406e9d7b548b28fc6aa8ae30a", + "tests/test.sh": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "tests/test_final_state.py": "7a273b9bf8bc61eeec1b8dda674b5f6ba5356abbfd923b413b09d2584c1ef72f" + }, + "pristine_sha256": { + "backup_catalog.db": "170911a153d00eb0f037ca56a2cbd10d4aa2b7a418e25a0f1df58b1c77589788" + }, + "pristine_permissions": { + "backup_catalog.db": 420 + } + }, + { + "id": "task_005684_3c8594a3", + "source": "/opt/native-shell/tasks/task_005684_3c8594a3/source", + "pristine_workspace": "/opt/native-shell/tasks/task_005684_3c8594a3/pristine", + "workspace": "/home/user", + "inputs": [ + "/home/user/compliance_audit.db" + ], + "outputs": [ + "/home/user/audit_report.json" + ], + "editable": [], + "external_inputs": {}, + "grading_mode": "file-output", + "grader": { + "kind": "pytest", + "test_file": "test_final_state.py", + "executes_learner_code": false + }, + "python": "/usr/bin/python3", + "cpus": 1, + "memory_mb": 2048, + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "source_sha256": { + "instruction.md": "f4eee4e0643fcfb7399df10e1947ec9dbda28c74bacf307167f443506268f583", + "task.toml": "5fc0da5f24b16f866fbc354cfc7cb148a17d353dff3b263c1c6caf94bf30b6a2", + "tests/test.sh": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "tests/test_final_state.py": "495630c7ede4e75ef5644c1ee5b69f04969a4059ef094787c19a3014734d3cf2" + }, + "pristine_sha256": { + "compliance_audit.db": "9fe1c89ee823f133d35dea66840ecb7f87d599487524b7aa1d6371e8f664058e" + }, + "pristine_permissions": { + "compliance_audit.db": 420 + } + }, + { + "id": "task_008998_ae4cbe72", + "source": "/opt/native-shell/tasks/task_008998_ae4cbe72/source", + "pristine_workspace": "/opt/native-shell/tasks/task_008998_ae4cbe72/pristine", + "workspace": "/home/user", + "inputs": [ + "/home/user/robot_dump.log.gz" + ], + "outputs": [ + "/home/user/archived_gcode", + "/home/user/critical_errors.csv" + ], + "editable": [], + "external_inputs": {}, + "grading_mode": "file-output", + "grader": { + "kind": "pytest", + "test_file": "test_final_state.py", + "executes_learner_code": false + }, + "python": "/usr/bin/python3", + "cpus": 1, + "memory_mb": 2048, + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "source_sha256": { + "instruction.md": "f81f86b07681931baabdba313cc4e988c01bff7a1f1d83349dfa939cdaa20669", + "task.toml": "c8ff58ad07c30c2da028625be23e41319f95e22524944c9d37de2ec255428cd9", + "tests/test.sh": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "tests/test_final_state.py": "e03b84ca0519367e5f86b7b3a3231afa5209b1971431497699200099035f5014" + }, + "pristine_sha256": { + "robot_dump.log.gz": "909d2e964c0831d8af91b722b4424ed829c261d6b7db1a95180d8a809527ddaf" + }, + "pristine_permissions": { + "robot_dump.log.gz": 420 + } + }, + { + "id": "task_008667_2151f271", + "source": "/opt/native-shell/tasks/task_008667_2151f271/source", + "pristine_workspace": "/opt/native-shell/tasks/task_008667_2151f271/pristine", + "workspace": "/home/user", + "inputs": [ + "/home/user/data/financial.db", + "/home/user/data/transactions.jsonl" + ], + "outputs": [ + "/home/user/output/fraud_cycles.json" + ], + "editable": [], + "external_inputs": {}, + "grading_mode": "file-output", + "grader": { + "kind": "pytest", + "test_file": "test_final_state.py", + "executes_learner_code": false + }, + "python": "/usr/bin/python3", + "cpus": 1, + "memory_mb": 2048, + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "source_sha256": { + "instruction.md": "50d1d10121dfa3b565842fd10f2589ceb91b4459126787af7793cec9cc0d06b1", + "task.toml": "d45954c25df30184144533cbf3ad4160377f627db5b926c3bbc9186327067897", + "tests/test.sh": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "tests/test_final_state.py": "cb73fd0ab1765768ebfecc50054ba13c143cc51be201127515eb495904ddf9e6" + }, + "pristine_sha256": { + "data/financial.db": "d6b5039ee32f3a43069245984c8fe5a9689028a9aac06e26a64017c54bd11976", + "data/transactions.jsonl": "629b28471809f802c58831d100315b83012c0066df3b265a2d379a19e61a2262" + }, + "pristine_permissions": { + "data": 493, + "data/financial.db": 420, + "data/transactions.jsonl": 420 + } + }, + { + "id": "task_000260_7b7cc286", + "source": "/opt/native-shell/tasks/task_000260_7b7cc286/source", + "pristine_workspace": "/opt/native-shell/tasks/task_000260_7b7cc286/pristine", + "workspace": "/home/user", + "inputs": [ + "/app/video.mp4" + ], + "outputs": [ + "/home/user/output.json" + ], + "editable": [ + "/home/user/pipeline" + ], + "external_inputs": { + "/app/video.mp4": "/opt/native-shell/tasks/task_000260_7b7cc286/source/external/app/video.mp4" + }, + "grading_mode": "file-output", + "grader": { + "kind": "pytest", + "test_file": "test_final_state.py", + "executes_learner_code": false + }, + "python": "/usr/bin/python3", + "cpus": 1, + "memory_mb": 2048, + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "source_sha256": { + "external/app/video.mp4": "3c04251fe92c30d29ac4d887608f4385176e3bda932594437f82b08a5b348938", + "instruction.md": "79c9fd4e4d41524db109d90b0415a4f0a2b9d24bf690fa8d7340ce3cb5ce0975", + "task.toml": "d36c49060b4ddbca3b13a5aa98cf5b195c07bff725b91107f58a087ec4325423", + "tests/test.sh": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "tests/test_final_state.py": "aae204101d5c024a0b5cbda42fa686e7d2928fd9be3ad55fd14314b2502182a5" + }, + "pristine_sha256": { + "pipeline/find_threshold.sh": "a6c4cf2043d8642babb9b546096b3f559a375b59d54a43efebd57e9728466184", + "pipeline/process.sh": "4631f1f805e6b826a796502ed5d94e676b3061cf448f2f9225116395aa3bb13b", + "pipeline/serialize.sh": "f3ae2df41978712dbffe58665a9582e3d0951f211c5cca5ece9f536225d28ba8" + }, + "pristine_permissions": { + "pipeline": 493, + "pipeline/find_threshold.sh": 511, + "pipeline/serialize.sh": 511, + "pipeline/process.sh": 511 + } + }, + { + "id": "task_000056_f726766b", + "source": "/opt/native-shell/tasks/task_000056_f726766b/source", + "pristine_workspace": "/opt/native-shell/tasks/task_000056_f726766b/pristine", + "workspace": "/home/user", + "inputs": [ + "/app/vibration_data.wav" + ], + "outputs": [ + "/home/user/parameters.json" + ], + "editable": [], + "external_inputs": { + "/app/vibration_data.wav": "/opt/native-shell/tasks/task_000056_f726766b/source/external/app/vibration_data.wav" + }, + "grading_mode": "file-output", + "grader": { + "kind": "pytest", + "test_file": "test_final_state.py", + "executes_learner_code": false + }, + "python": "/usr/bin/python3", + "cpus": 1, + "memory_mb": 2048, + "agent_timeout_sec": 600.0, + "verifier_timeout_sec": 120.0, + "source_sha256": { + "external/app/vibration_data.wav": "eab8396a1b533f70468039f8ac1b5fe9927faf4ded578172ec932ef7bf2af22a", + "instruction.md": "714f780883970365cfffe408e2c76e75f499005f87551fc84b55d79368e77197", + "task.toml": "e36405ea22dc2679124b64c5e8d7f3c52fb3cfa9f529d4694e26532db5b341d0", + "tests/test.sh": "3ae0ce20b61928cc7f524ea6fb43ed55d3df32a9a87834825518d2397e31672e", + "tests/test_final_state.py": "327c5346a779a44e27ef0cbd9f107e863d599fc6e47f95f248eaec03c15117c4" + }, + "pristine_sha256": {}, + "pristine_permissions": {} + } + ], + "private_root": "/opt/native-shell/private", + "max_actions": 64, + "command_timeout_sec": 120, + "output_limit_bytes": 65536 +} diff --git a/components/tmax/licenses/ODC-BY-1.0.txt b/components/tmax/licenses/ODC-BY-1.0.txt new file mode 100644 index 0000000000000000000000000000000000000000..a12f30e302933f0f2db88e7ce93186a34b9535fd --- /dev/null +++ b/components/tmax/licenses/ODC-BY-1.0.txt @@ -0,0 +1,428 @@ +# ODC Attribution License (ODC-By) + +### Preamble + +The Open Data Commons Attribution License is a license agreement +intended to allow users to freely share, modify, and use this Database +subject only to the attribution requirements set out in Section 4. + +Databases can contain a wide variety of types of content (images, +audiovisual material, and sounds all in the same database, for example), +and so this license only governs the rights over the Database, and not +the contents of the Database individually. Licensors may therefore wish +to use this license together with another license for the contents. + +Sometimes the contents of a database, or the database itself, can be +covered by other rights not addressed here (such as private contracts, +trademark over the name, or privacy rights / data protection rights +over information in the contents), and so you are advised that you may +have to consult other documents or clear other rights before doing +activities not covered by this License. + +------ + +The Licensor (as defined below) + +and + +You (as defined below) + +agree as follows: + +### 1.0 Definitions of Capitalised Words + +"Collective Database" - Means this Database in unmodified form as part +of a collection of independent databases in themselves that together are +assembled into a collective whole. A work that constitutes a Collective +Database will not be considered a Derivative Database. + +"Convey" - As a verb, means Using the Database, a Derivative Database, +or the Database as part of a Collective Database in any way that enables +a Person to make or receive copies of the Database or a Derivative +Database. Conveying does not include interaction with a user through a +computer network, or creating and Using a Produced Work, where no +transfer of a copy of the Database or a Derivative Database occurs. + +"Contents" - The contents of this Database, which includes the +information, independent works, or other material collected into the +Database. For example, the contents of the Database could be factual +data or works such as images, audiovisual material, text, or sounds. + +"Database" - A collection of material (the Contents) arranged in a +systematic or methodical way and individually accessible by electronic +or other means offered under the terms of this License. + +"Database Directive" - Means Directive 96/9/EC of the European +Parliament and of the Council of 11 March 1996 on the legal protection +of databases, as amended or succeeded. + +"Database Right" - Means rights resulting from the Chapter III ("sui +generis") rights in the Database Directive (as amended and as transposed +by member states), which includes the Extraction and Re-utilisation of +the whole or a Substantial part of the Contents, as well as any similar +rights available in the relevant jurisdiction under Section 10.4. + +"Derivative Database" - Means a database based upon the Database, and +includes any translation, adaptation, arrangement, modification, or any +other alteration of the Database or of a Substantial part of the +Contents. This includes, but is not limited to, Extracting or +Re-utilising the whole or a Substantial part of the Contents in a new +Database. + +"Extraction" - Means the permanent or temporary transfer of all or a +Substantial part of the Contents to another medium by any means or in +any form. + +"License" - Means this license agreement and is both a license of rights +such as copyright and Database Rights and an agreement in contract. + +"Licensor" - Means the Person that offers the Database under the terms +of this License. + +"Person" - Means a natural or legal person or a body of persons +corporate or incorporate. + +"Produced Work" - a work (such as an image, audiovisual material, text, +or sounds) resulting from using the whole or a Substantial part of the +Contents (via a search or other query) from this Database, a Derivative +Database, or this Database as part of a Collective Database. + +"Publicly" - means to Persons other than You or under Your control by +either more than 50% ownership or by the power to direct their +activities (such as contracting with an independent consultant). + +"Re-utilisation" - means any form of making available to the public all +or a Substantial part of the Contents by the distribution of copies, by +renting, by online or other forms of transmission. + +"Substantial" - Means substantial in terms of quantity or quality or a +combination of both. The repeated and systematic Extraction or +Re-utilisation of insubstantial parts of the Contents may amount to the +Extraction or Re-utilisation of a Substantial part of the Contents. + +"Use" - As a verb, means doing any act that is restricted by copyright +or Database Rights whether in the original medium or any other; and +includes without limitation distributing, copying, publicly performing, +publicly displaying, and preparing derivative works of the Database, as +well as modifying the Database as may be technically necessary to use it +in a different mode or format. + +"You" - Means a Person exercising rights under this License who has not +previously violated the terms of this License with respect to the +Database, or who has received express permission from the Licensor to +exercise rights under this License despite a previous violation. + +Words in the singular include the plural and vice versa. + +### 2.0 What this License covers + +2.1. Legal effect of this document. This License is: + + a. A license of applicable copyright and neighbouring rights; + + b. A license of the Database Right; and + + c. An agreement in contract between You and the Licensor. + +2.2 Legal rights covered. This License covers the legal rights in the +Database, including: + + a. Copyright. Any copyright or neighbouring rights in the Database. + The copyright licensed includes any individual elements of the + Database, but does not cover the copyright over the Contents + independent of this Database. See Section 2.4 for details. Copyright + law varies between jurisdictions, but is likely to cover: the Database + model or schema, which is the structure, arrangement, and organisation + of the Database, and can also include the Database tables and table + indexes; the data entry and output sheets; and the Field names of + Contents stored in the Database; + + b. Database Rights. Database Rights only extend to the Extraction and + Re-utilisation of the whole or a Substantial part of the Contents. + Database Rights can apply even when there is no copyright over the + Database. Database Rights can also apply when the Contents are removed + from the Database and are selected and arranged in a way that would + not infringe any applicable copyright; and + + c. Contract. This is an agreement between You and the Licensor for + access to the Database. In return you agree to certain conditions of + use on this access as outlined in this License. + +2.3 Rights not covered. + + a. This License does not apply to computer programs used in the making + or operation of the Database; + + b. This License does not cover any patents over the Contents or the + Database; and + + c. This License does not cover any trademarks associated with the + Database. + +2.4 Relationship to Contents in the Database. The individual items of +the Contents contained in this Database may be covered by other rights, +including copyright, patent, data protection, privacy, or personality +rights, and this License does not cover any rights (other than Database +Rights or in contract) in individual Contents contained in the Database. +For example, if used on a Database of images (the Contents), this +License would not apply to copyright over individual images, which could +have their own separate licenses, or one single license covering all of +the rights over the images. + +### 3.0 Rights granted + +3.1 Subject to the terms and conditions of this License, the Licensor +grants to You a worldwide, royalty-free, non-exclusive, terminable (but +only under Section 9) license to Use the Database for the duration of +any applicable copyright and Database Rights. These rights explicitly +include commercial use, and do not exclude any field of endeavour. To +the extent possible in the relevant jurisdiction, these rights may be +exercised in all media and formats whether now known or created in the +future. + +The rights granted cover, for example: + + a. Extraction and Re-utilisation of the whole or a Substantial part of + the Contents; + + b. Creation of Derivative Databases; + + c. Creation of Collective Databases; + + d. Creation of temporary or permanent reproductions by any means and + in any form, in whole or in part, including of any Derivative + Databases or as a part of Collective Databases; and + + e. Distribution, communication, display, lending, making available, or + performance to the public by any means and in any form, in whole or in + part, including of any Derivative Database or as a part of Collective + Databases. + +3.2 Compulsory license schemes. For the avoidance of doubt: + + a. Non-waivable compulsory license schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme cannot be waived, the Licensor reserves + the exclusive right to collect such royalties for any exercise by You + of the rights granted under this License; + + b. Waivable compulsory license schemes. In those jurisdictions in + which the right to collect royalties through any statutory or + compulsory licensing scheme can be waived, the Licensor waives the + exclusive right to collect such royalties for any exercise by You of + the rights granted under this License; and, + + c. Voluntary license schemes. The Licensor waives the right to collect + royalties, whether individually or, in the event that the Licensor is + a member of a collecting society that administers voluntary licensing + schemes, via that society, from any exercise by You of the rights + granted under this License. + +3.3 The right to release the Database under different terms, or to stop +distributing or making available the Database, is reserved. Note that +this Database may be multiple-licensed, and so You may have the choice +of using alternative licenses for this Database. Subject to Section +10.4, all other rights not expressly granted by Licensor are reserved. + +### 4.0 Conditions of Use + +4.1 The rights granted in Section 3 above are expressly made subject to +Your complying with the following conditions of use. These are important +conditions of this License, and if You fail to follow them, You will be +in material breach of its terms. + +4.2 Notices. If You Publicly Convey this Database, any Derivative +Database, or the Database as part of a Collective Database, then You +must: + + a. Do so only under the terms of this License; + + b. Include a copy of this License or its Uniform Resource Identifier (URI) + with the Database or Derivative Database, including both in the + Database or Derivative Database and in any relevant documentation; + + c. Keep intact any copyright or Database Right notices and notices + that refer to this License; and + + d. If it is not possible to put the required notices in a particular + file due to its structure, then You must include the notices in a + location (such as a relevant directory) where users would be likely to + look for it. + +4.3 Notice for using output (Contents). Creating and Using a Produced +Work does not require the notice in Section 4.2. However, if you +Publicly Use a Produced Work, You must include a notice associated with +the Produced Work reasonably calculated to make any Person that uses, +views, accesses, interacts with, or is otherwise exposed to the Produced +Work aware that Content was obtained from the Database, Derivative +Database, or the Database as part of a Collective Database, and that it +is available under this License. + + a. Example notice. The following text will satisfy notice under + Section 4.3: + + Contains information from DATABASE NAME which is made available + under the ODC Attribution License. + +DATABASE NAME should be replaced with the name of the Database and a +hyperlink to the location of the Database. "ODC Attribution License" +should contain a hyperlink to the URI of the text of this License. If +hyperlinks are not possible, You should include the plain text of the +required URI's with the above notice. + +4.4 Licensing of others. You may not sublicense the Database. Each time +You communicate the Database, the whole or Substantial part of the +Contents, or any Derivative Database to anyone else in any way, the +Licensor offers to the recipient a license to the Database on the same +terms and conditions as this License. You are not responsible for +enforcing compliance by third parties with this License, but You may +enforce any rights that You have over a Derivative Database. You are +solely responsible for any modifications of a Derivative Database made +by You or another Person at Your direction. You may not impose any +further restrictions on the exercise of the rights granted or affirmed +under this License. + +### 5.0 Moral rights + +5.1 Moral rights. This section covers moral rights, including any rights +to be identified as the author of the Database or to object to treatment +that would otherwise prejudice the author's honour and reputation, or +any other derogatory treatment: + + a. For jurisdictions allowing waiver of moral rights, Licensor waives + all moral rights that Licensor may have in the Database to the fullest + extent possible by the law of the relevant jurisdiction under Section + 10.4; + + b. If waiver of moral rights under Section 5.1 a in the relevant + jurisdiction is not possible, Licensor agrees not to assert any moral + rights over the Database and waives all claims in moral rights to the + fullest extent possible by the law of the relevant jurisdiction under + Section 10.4; and + + c. For jurisdictions not allowing waiver or an agreement not to assert + moral rights under Section 5.1 a and b, the author may retain their + moral rights over certain aspects of the Database. + +Please note that some jurisdictions do not allow for the waiver of moral +rights, and so moral rights may still subsist over the Database in some +jurisdictions. + +### 6.0 Fair dealing, Database exceptions, and other rights not affected + +6.1 This License does not affect any rights that You or anyone else may +independently have under any applicable law to make any use of this +Database, including without limitation: + + a. Exceptions to the Database Right including: Extraction of Contents + from non-electronic Databases for private purposes, Extraction for + purposes of illustration for teaching or scientific research, and + Extraction or Re-utilisation for public security or an administrative + or judicial procedure. + + b. Fair dealing, fair use, or any other legally recognised limitation + or exception to infringement of copyright or other applicable laws. + +6.2 This License does not affect any rights of lawful users to Extract +and Re-utilise insubstantial parts of the Contents, evaluated +quantitatively or qualitatively, for any purposes whatsoever, including +creating a Derivative Database (subject to other rights over the +Contents, see Section 2.4). The repeated and systematic Extraction or +Re-utilisation of insubstantial parts of the Contents may however amount +to the Extraction or Re-utilisation of a Substantial part of the +Contents. + +### 7.0 Warranties and Disclaimer + +7.1 The Database is licensed by the Licensor "as is" and without any +warranty of any kind, either express, implied, or arising by statute, +custom, course of dealing, or trade usage. Licensor specifically +disclaims any and all implied warranties or conditions of title, +non-infringement, accuracy or completeness, the presence or absence of +errors, fitness for a particular purpose, merchantability, or otherwise. +Some jurisdictions do not allow the exclusion of implied warranties, so +this exclusion may not apply to You. + +### 8.0 Limitation of liability + +8.1 Subject to any liability that may not be excluded or limited by law, +the Licensor is not liable for, and expressly excludes, all liability +for loss or damage however and whenever caused to anyone by any use +under this License, whether by You or by anyone else, and whether caused +by any fault on the part of the Licensor or not. This exclusion of +liability includes, but is not limited to, any special, incidental, +consequential, punitive, or exemplary damages such as loss of revenue, +data, anticipated profits, and lost business. This exclusion applies +even if the Licensor has been advised of the possibility of such +damages. + +8.2 If liability may not be excluded by law, it is limited to actual and +direct financial loss to the extent it is caused by proved negligence on +the part of the Licensor. + +### 9.0 Termination of Your rights under this License + +9.1 Any breach by You of the terms and conditions of this License +automatically terminates this License with immediate effect and without +notice to You. For the avoidance of doubt, Persons who have received the +Database, the whole or a Substantial part of the Contents, Derivative +Databases, or the Database as part of a Collective Database from You +under this License will not have their licenses terminated provided +their use is in full compliance with this License or a license granted +under Section 4.8 of this License. Sections 1, 2, 7, 8, 9 and 10 will +survive any termination of this License. + +9.2 If You are not in breach of the terms of this License, the Licensor +will not terminate Your rights under it. + +9.3 Unless terminated under Section 9.1, this License is granted to You +for the duration of applicable rights in the Database. + +9.4 Reinstatement of rights. If you cease any breach of the terms and +conditions of this License, then your full rights under this License +will be reinstated: + + a. Provisionally and subject to permanent termination until the 60th + day after cessation of breach; + + b. Permanently on the 60th day after cessation of breach unless + otherwise reasonably notified by the Licensor; or + + c. Permanently if reasonably notified by the Licensor of the + violation, this is the first time You have received notice of + violation of this License from the Licensor, and You cure the + violation prior to 30 days after your receipt of the notice. + +9.5 Notwithstanding the above, Licensor reserves the right to release +the Database under different license terms or to stop distributing or +making available the Database. Releasing the Database under different +license terms or stopping the distribution of the Database will not +withdraw this License (or any other license that has been, or is +required to be, granted under the terms of this License), and this +License will continue in full force and effect unless terminated as +stated above. + +### 10.0 General + +10.1 If any provision of this License is held to be invalid or +unenforceable, that must not affect the validity or enforceability of +the remainder of the terms and conditions of this License and each +remaining provision of this License shall be valid and enforced to the +fullest extent permitted by law. + +10.2 This License is the entire agreement between the parties with +respect to the rights granted here over the Database. It replaces any +earlier understandings, agreements or representations with respect to +the Database. + +10.3 If You are in breach of the terms of this License, You will not be +entitled to rely on the terms of this License or to complain of any +breach by the Licensor. + +10.4 Choice of law. This License takes effect in and will be governed by +the laws of the relevant jurisdiction in which the License terms are +sought to be enforced. If the standard suite of rights granted under +applicable copyright law and Database Rights in the relevant +jurisdiction includes additional rights not granted under this License, +these additional rights are granted in this License in order to meet the +terms of this License. diff --git a/components/tmax/licenses/TMAX_DATASET_README.md b/components/tmax/licenses/TMAX_DATASET_README.md new file mode 100644 index 0000000000000000000000000000000000000000..1dc1a90390a455355e7f0853edd7068f9d538a8a --- /dev/null +++ b/components/tmax/licenses/TMAX_DATASET_README.md @@ -0,0 +1,46 @@ +--- +license: odc-by +language: +- en +--- + +![image](https://cdn-uploads.huggingface.co/production/uploads/62608fc2ffe8827cb1d89f9f/XMW9_q0GCubxzTOgdsb4K.png) +

+ 💻 Code · + 🤗 Models & Data · + 📜 Paper · + 📓 Blog +

+ +> [!NOTE] +> For full information, go check out the Tmax paper [here](https://arxiv.org/abs/2606.23321). + +# TMax 15k - Open Instruct + +This is the dataset we used to train [Tmax 9b](https://huggingface.co/allenai/tmax-9b) (and our other tmax models). +This release contains general details on the data. +In general, this is a collection of roughly 15k RL environment instances. +For details on how we generated this dataset and its makeup, please see our paper! + +**You can find a version of this dataset ready for training [here](https://huggingface.co/datasets/allenai/tmax-15k-open-instruct)!** + +## License + +This dataset is licensed under ODC-BY. +It is intended for research and educational use in accordance with Ai2's [Responsible Use Guidelines](https://allenai.org/responsible-use). +The data includes outputs generated using Gemini 3.1 Pro, which are subject to Google's [Terms of Service](https://policies.google.com/terms). + +## Citation + +If you use our model or data, please cite our paper: +``` +@misc{ivison2026tmaxsimplerecipeterminal, + title={Tmax: A simple recipe for terminal agents}, + author={Hamish Ivison and Junjie Oscar Yin and Rulin Shao and Teng Xiao and Nathan Lambert and Hannaneh Hajishirzi}, + year={2026}, + eprint={2606.23321}, + archivePrefix={arXiv}, + primaryClass={cs.CL}, + url={https://arxiv.org/abs/2606.23321}, +} +``` \ No newline at end of file diff --git a/components/tmax/requirements.lock b/components/tmax/requirements.lock new file mode 100644 index 0000000000000000000000000000000000000000..6189c5eb255896cb59d46277f7acbd81419398ef --- /dev/null +++ b/components/tmax/requirements.lock @@ -0,0 +1,110 @@ +aiofile==3.12.3 --hash=sha256:5c1bcc9e929c50834608e8cc1a4cc1d7503eb60c15a535b779fd39e2f372c017 +annotated-doc==0.0.5 --hash=sha256:117bac03a25ede5df5440e855b32d556049ca169ead221505badf432fed4b101 +annotated-types==0.8.0 --hash=sha256:f072f4d804ea359e4eaf198b1af7a8b0943881a87f31bb764f8bf219bb9419e0 +anyio==4.15.1 --hash=sha256:6152fdbbf9a77fdec97731721bebf7c4c44f7c29b424b0065826173efc7ed101 +attrs==26.1.0 --hash=sha256:c647aa4a12dfbad9333ca4e71fe62ddc36f4e63b2d260a37a8b83d2f043ac309 +authlib==1.8.0 --hash=sha256:88aebbd9af6757e14e912d5dc007ae1dc1f3e27e3b2152ce7c552ee2c3b3c121 +backports.tarfile==1.2.0 --hash=sha256:77e284d754527b01fb1e6fa8a1afe577858ebe4e9dad8919e34c862cb399bc34 +beartype==0.23.0 --hash=sha256:a88b85be516c064d4de2b42045a258a43be97bce5cbc18b777f332027c0979f7 +brotli==1.2.0 --hash=sha256:40d918bce2b427a0c4ba189df7a006ac0c7277c180aee4617d99e9ccaaf59e6a +cachetools==7.2.1 --hash=sha256:63aa53dfe7473c10cccdd5a01dedf76ef2c4b73a58840d9396e7d0752cbdac3b +caio==0.12.9 --hash=sha256:bf12d4f014b2a33e642ed7905b5787656ede2fc24be21f7c086826ff0d32cec3 +certifi==2026.7.22 --hash=sha256:62f22742b58a1a33014a2b6b706588a8d7e2a88ae7bd1a6ebe8c992928483775 +cffi==2.1.1 --hash=sha256:34e261f78cb6ceaaa36f42f2613f4380d94d9c759a9c73c769ee6e0247364632 +charset-normalizer==3.5.2 --hash=sha256:211d5a3eb6af8f513b8d4ca19a8c1b7accab1b5f0d3175f9826b03c1a920dc1f +click==8.5.0 --hash=sha256:255bc9599cf7748b4b1a446ccc735421bd08a2ae529a8b88597d3de5664ee360 +cryptography==50.0.2 --hash=sha256:4061c0079120205fb760c58acab6443e217307dcf05e3702cf970e0689972856 +cyclopts==5.2.0 --hash=sha256:5da2a5d65164e03008621fc4795946b88a722b881398b5dfa58afa6218342cff +dnspython==2.9.0 --hash=sha256:9a4aedb833c3c1b49214d04d44d3032ab7a9135f7c1d29a549b4ff78fd82fda9 +docstring-parser==0.18.0 --hash=sha256:b3fcbed555c47d8479be0796ef7e19c2670d428d72e96da63f3a40122860374b +email-validator==2.3.0 --hash=sha256:80f13f623413e6b197ae73bb10bf4eb0908faf509ad8362c5edeb0be7fd450b4 +exceptiongroup==1.3.1 --hash=sha256:a7a39a3bd276781e98394987d3a5701d0c4edffb633bb7a5144577f82c773598 +fastapi==0.143.0 --hash=sha256:3e9395fd35276425b61b516a31fdd7c77fe2af83e41b4da22e30696fb1304c5d +fastmcp==3.4.8 --hash=sha256:ab4e8abe6c9d50b110f367e8c29f82b90c1478ac9180be61af10354f84f0ad8c +fastmcp-slim==3.4.8 --hash=sha256:e72c6b74e90c5dcdc8f58087fbdf213636d8b5d339384a498de1c5df6fc037a7 +filelock==4.1.0 --hash=sha256:2ce9818e3e2d8f284c1a964414447ef148d42a5fd5e2a477a7118e574b293ec1 +fsspec==2026.9.0 --hash=sha256:8dd6e646e99ea382bd85f97a45e6b526a442d79423a7dc673f1e2756d05fcb5f +gradio==6.30.0 --hash=sha256:aae3aa81ec9f44e55781b498ad2ba12b117aa512e8d2bb0ef3e52af7f2ee6305 +gradio-client==2.7.2 --hash=sha256:12c9d2d940df28eb8dce58eef61f5e808265ad87bbbca53704d1330aa701e5e2 +griffelib==2.3.2 --hash=sha256:8e710afededd5607f95bf3c8ccc175ee306e7084459faf27b9f9f44ef2a7a274 +groovy==0.1.2 --hash=sha256:7f7975bab18c729a257a8b1ae9dcd70b7cafb1720481beae47719af57c35fa64 +h11==0.16.0 --hash=sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86 +hf-gradio==0.4.1 --hash=sha256:76b8cb8be6abe62d74c1ad2d35b42f0629db89aa9e1a8d033cecfe7c856eeab3 +hf-xet==1.7.0 --hash=sha256:2814a6e999d13464c4d679b788cc5d784eb5a4edfc638a31f10e9a11ab531ef8 +httpcore==1.0.9 --hash=sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55 +httpcore2==2.13.1 --hash=sha256:e1e05d4f25f7d7d496bfb96748f6f4b67657b03da069b3a68c36069f3db73d0a +httpx==0.28.1 --hash=sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad +httpx-sse==0.4.3 --hash=sha256:0ac1c9fe3c0afad2e0ebb25a934a59f4c7823b60792691f779fad2c5568830fc +httpx2==2.13.1 --hash=sha256:6dff50fabc270ee5fd25d845d0b078ed20564579744d6d962850975996d2f9a4 +huggingface-hub==2.2.0 --hash=sha256:1667f145dc56dc210d60966069397df9ecfca9607a5d43db88b308c89dae56b3 +idna==3.20 --hash=sha256:ab7ae7122974553370f0bdb919e1a960b2cd1bc1ef0276416d896db81c14582c +importlib-metadata==9.0.1 --hash=sha256:bba5600596a7e21f3eef53281cf28d6a5195634d2f2b78ff9501a3272c6eaab0 +jaraco.classes==3.4.0 --hash=sha256:f662826b6bed8cace05e7ff873ce0f9283b5c924470fe664fff1c2f00f581790 +jaraco.context==6.1.2 --hash=sha256:bf8150b79a2d5d91ae48629d8b427a8f7ba0e1097dd6202a9059f29a36379535 +jaraco.functools==4.6.0 --hash=sha256:99e3dc0060c5cbe8fcd1cdb36258e2a65ca40f1566b2033b12abb1bb44dd3c30 +jeepney==0.9.0 --hash=sha256:97e5714520c16fc0a45695e5365a2e11b81ea79bba796e26f9f1d178cb182683 +jinja2==3.1.6 --hash=sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67 +jiter==0.17.0 --hash=sha256:5888fe5abc1ca2fa834a3e1b4c7ef0dcece286a7d7e95a609ef0934b777b9fc9 +joserfc==1.7.5 --hash=sha256:add2c2c84e8373b084d526a8b53daba5d7a513a118cd2dcd9fc9f979d0922159 +jsonref==1.1.0 --hash=sha256:590dc7773df6c21cbf948b5dac07a72a251db28b0238ceecce0a2abfa8ec30a9 +jsonschema==4.26.0 --hash=sha256:d489f15263b8d200f8387e64b4c3a75f06629559fb73deb8fdfb525f2dab50ce +jsonschema-path==0.5.0 --hash=sha256:2790a070bc7abb08ea3dbe4d340ece4efadf639223001f020c7503229ba068e2 +jsonschema-specifications==2025.9.1 --hash=sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe +keyring==25.7.0 --hash=sha256:be4a0b195f149690c166e850609a477c532ddbfbaed96a404d4e43f8d5e2689f +markdown-it-py==4.2.0 --hash=sha256:9f7ebbcd14fe59494226453aed97c1070d83f8d24b6fc3a3bcf9a38092641c4a +markupsafe==3.0.4 --hash=sha256:6da83a088f8ef93b2d483a8232a4dbf4d69d3d8496b568a03c56becac43e1808 +mcp==1.30.0 --hash=sha256:666edb5009503e1047c9d60346a756f94b261f05cc2625f23d41c728ffc484d0 +mdurl==0.1.2 --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 +more-itertools==11.1.0 --hash=sha256:4b65538ae22f6fed0ce4874efd317463a7489796a0939fa66824dd542125a192 +numpy==2.4.6 --hash=sha256:89cd468399cfd2504718f0ba50e410dca55a170b61a02ad92bb18c8a65186e93 +openai==3.28.0 --hash=sha256:1ea40a084ffe2f9f16fd3bea6e870f757853b536b18d8e737c518ef849a2920c +openapi-pydantic==0.6.0 --hash=sha256:8bd6d548a250da37db96f461bcd52b3468e8834ad7d6db14b00a6b2ebbd163a3 +openenv==0.6.1.dev0 --hash=sha256:93a5781b64e2f174f17fff40a558d43745a7f4e48a8b247363da4f27906be53a +opentelemetry-api==1.45.1 --hash=sha256:b31553efa588ae44bc306f863c785c5333a9ecc091248c6ee68b4b6c87fdedfb +orjson==3.13.0 --hash=sha256:89bcf2d4bc6c9a7e1763c8cf534f38712e66b76a0fefda7fb7785462f0d635e4 +packaging==26.3 --hash=sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c +pandas==3.0.6 --hash=sha256:47121f9571503f724c9b93e297ab6254ac99c77adf5e9ed085ea419fd585c258 +pathable==0.6.0 --hash=sha256:82c4ca6c98c502ad12e0d4e9779b6210afee93c38990988c8c5d1b49bdcdf566 +pillow==12.3.0 --hash=sha256:23d27a3e0307ec2244cc51e7287b919aa68d097504ebe19df4e76a98a3eea5bd +platformdirs==4.12.4 --hash=sha256:78bfb9db2a8471ed7eebe3c3c932da413911042994e699b384fbb4493fa872d7 +py-key-value-aio==0.4.6 --hash=sha256:820b30c7959fc738ea3d00160cdb10cd258f51e38737b2add530defeea1ded77 +pycparser==3.11 --hash=sha256:51d5a8ba2be0bbe440b99d2112604c95bbbc3c2748a64260186c541e1729cd80 +pydantic==2.14.0 --hash=sha256:15fab1bea6f1dc5003b54fc2ecab230c1fd1dbade2acd4addc52d81e32416d4b +pydantic-core==2.50.0 --hash=sha256:ac223ea031905319a64d0df116979ae438b42d6265862a3d63c9f9808c2905a7 +pydantic-settings==2.15.0 --hash=sha256:0ba092c291c94baceb5eff768aa0d56400a457585bc0175925a5a5510303da42 +pydub==0.25.1 --hash=sha256:65617e33033874b59d87db603aa1ed450633288aefead953b30bded59cb599a6 +pygments==2.21.0 --hash=sha256:2363c69b61c4a97c838da3b130dcd6468f4848992b21a82f2a63ec34377137d9 +pyjwt==2.15.1 --hash=sha256:42d59d631f7768a1028a64c7ff581a9bf7519804daf91fc5b6c56e30eec5e193 +pyperclip==1.11.0 --hash=sha256:299403e9ff44581cb9ba2ffeed69c7aa96a008622ad0c46cb575ca75b5b84273 +python-dateutil==2.9.0.post0 --hash=sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427 +python-dotenv==1.2.4 --hash=sha256:42269a8a5b3fd54ffa6f3d84b18abed50064717576b4ecf03dc4a55d8aa04fdc +python-multipart==0.0.32 --hash=sha256:ff6d3f776f16878c894e52e107296ffc890e913c611b1a4ec6c44e2821fe2e23 +pytz==2026.5 --hash=sha256:e658af3757f9e26a9d25dd2aff38335acd92bc9104f890a894b2c1ba28311b03 +pyyaml==6.0.3 --hash=sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d +referencing==0.37.0 --hash=sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231 +requests==2.34.2 --hash=sha256:2a0d60c172f83ac6ab31e4554906c0f3b3588d37b5cb939b1c061f4907e278e0 +rich==15.0.0 --hash=sha256:33bd4ef74232fb73fe9279a257718407f169c09b78a87ad3d296f548e27de0bb +rich-rst==2.2.0 --hash=sha256:1ea1c43813dc4a8d86475fce27ffb74e0ada3d4656c9f8130ba2a59868055fe9 +rpds-py==2026.9.1 --hash=sha256:136a1c3fe4402b7008bc81cb62ee538481795b61a7e83df88dff3b3f02b726ff +safehttpx==0.1.7 --hash=sha256:c4f4a162db6993464d7ca3d7cc4af0ffc6515a606dfd220b9f82c6945d869cde +secretstorage==3.5.0 --hash=sha256:0ce65888c0725fcb2c5bc0fdb8e5438eece02c523557ea40ce0703c266248137 +semantic-version==2.10.0 --hash=sha256:de78a3b8e0feda74cabc54aab2da702113e33ac9d9eb9d2389bcf1f58b7d9177 +shellingham==1.5.4 --hash=sha256:7ecfff8f2fd72616f7481040475a65b2bf8af90a56c89140852d1120324e8686 +six==1.17.0 --hash=sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274 +sniffio==1.3.1 --hash=sha256:2f6da418d1f1e0fddd844478f41680e794e6051915791a034ff65e5f100525a2 +sse-starlette==3.5.0 --hash=sha256:3e6e1070df3f0f5d9cea81496de92dbb72f6721871d99748ece67441dd8b7997 +starlette==1.7.0 --hash=sha256:67f8e99895493dd2911a03f11314af6ceebeae4e704bb9f43dfc6a9db151c93e +tomli==2.5.0 --hash=sha256:d7e369fd63331746182360977b1892bfc215476a30d61612d732425311639f56 +tomli-w==1.2.0 --hash=sha256:188306098d013b691fcadc011abd66727d3c414c571bb01b1a174ba8c983cf90 +tomlkit==0.14.0 --hash=sha256:592064ed85b40fa213469f81ac584f67a4f2992509a7c3ea2d632208623a3680 +tqdm==4.70.1 --hash=sha256:c293e525e6fef9c20e8728fd4612df02a0aa31bb5fe91ecd93e123b1b7bffa73 +truststore==0.10.4 --hash=sha256:adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981 +typer==0.27.3 --hash=sha256:e50022f28b82a86313e54501317a1db64bf8f8d036ff8cfe5ca7e47675454aff +typing-extensions==4.16.0 --hash=sha256:481caa481374e813c1b176ada14e97f1f67a4539ce9cfeb3f350d78d6370c2e8 +typing-inspection==0.4.4 --hash=sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147 +uncalled-for==0.4.1 --hash=sha256:b611b38879d9fe5088297e7bb28f2ddd12d2d73dad933d93da107fb63eb4058e +urllib3==2.8.0 --hash=sha256:0cf3cae568d36aa9576b28dfb35f11328f1cb974ca7647d9475ebb86c75ac6e3 +uvicorn==0.54.0 --hash=sha256:505bdb0f318731d45f1f712071fc781a8981f6847a31c902c9f5e652d4f67faf +watchfiles==1.3.0 --hash=sha256:b5768b49e426fd5b550b012c866db347cdf15c398ef98dc557b6e6b72fa74cd1 +websockets==17.2 --hash=sha256:376a693697ddb695ea282ead76060f4847f90e564b12b4389f2c7589e6fadb9e +zipp==4.1.1 --hash=sha256:8979f52d874162f485ff2981e3891f3a3317b7a3dd43ff1e1775b9304f307a9c