From ecbffe0b9e45bdd3ead76299af6d980a1132b32a Mon Sep 17 00:00:00 2001 From: Phlo <90307961+YoungPhlo@users.noreply.github.com> Date: Fri, 15 Dec 2023 13:35:59 -0600 Subject: [PATCH] Fix Prettier and ESLint issues (#86) Co-authored-by: J. Zane Cook --- .github/workflows/js-sdk-publish.yaml | 4 +- .github/workflows/python-client-publish.yaml | 2 +- .github/workflows/python-sdk-publish.yaml | 2 +- .gitignore | 530 +-- .postman/api | 8 +- .../api_63f5e342-f43f-45fa-9a50-87934ccddcab | 44 +- LICENSE | 42 +- apps/agentprotocol.ai/.gitignore | 56 +- apps/agentprotocol.ai/public/test.sh | 118 +- .../src/app/clients/others/page.mdx | 6 +- .../app/contributing/code-of-conduct/page.mdx | 20 +- .../src/app/contributing/guide/page.mdx | 11 +- .../src/app/endpoints/page.mdx | 50 +- apps/agentprotocol.ai/src/app/layout.jsx | 1 - apps/agentprotocol.ai/src/app/providers.jsx | 5 +- apps/agentprotocol.ai/src/components/Code.jsx | 2 +- .../src/components/Navigation.jsx | 4 +- .../src/images/icons/python.svg | 418 +-- apps/agentprotocol.ai/src/images/logos/js.svg | 6 +- .../src/images/logos/python.svg | 26 +- packages/client/python/Makefile | 4 +- .../python/agent_protocol_client/__init__.py | 80 +- .../agent_protocol_client/api/__init__.py | 8 +- .../agent_protocol_client/api/agent_api.py | 3302 ++++++++--------- .../agent_protocol_client/api_client.py | 1676 ++++----- .../agent_protocol_client/api_response.py | 52 +- .../agent_protocol_client/configuration.py | 896 ++--- .../agent_protocol_client/docs/AgentApi.md | 4 +- .../agent_protocol_client/exceptions.py | 308 +- .../agent_protocol_client/models/__init__.py | 46 +- .../agent_protocol_client/models/artifact.py | 154 +- .../agent_protocol_client/models/step.py | 290 +- .../models/step_all_of.py | 264 +- .../models/step_request_body.py | 154 +- .../models/step_result.py | 178 +- .../agent_protocol_client/models/task.py | 196 +- .../models/task_all_of.py | 174 +- .../models/task_request_body.py | 154 +- .../python/agent_protocol_client/rest.py | 622 ++-- packages/client/python/examples/minimal.py | 94 +- packages/client/python/poetry.lock | 1476 ++++---- packages/client/python/pyproject.toml | 58 +- packages/client/python/scripts/generate.sh | 56 +- packages/sdk/js/README.md | 1 + packages/sdk/js/src/agent.ts | 136 +- packages/sdk/js/src/api.ts | 61 +- packages/sdk/js/src/index.ts | 2 +- packages/sdk/js/src/models.ts | 16 +- packages/sdk/python/.gitignore | 34 +- packages/sdk/python/Makefile | 22 +- packages/sdk/python/README.md | 3 +- .../sdk/python/agent_protocol/__init__.py | 36 +- packages/sdk/python/agent_protocol/agent.py | 520 +-- packages/sdk/python/agent_protocol/cli.py | 50 +- packages/sdk/python/agent_protocol/db.py | 364 +- .../sdk/python/agent_protocol/middlewares.py | 20 +- packages/sdk/python/agent_protocol/models.py | 438 +-- packages/sdk/python/agent_protocol/server.py | 34 +- .../utils/compliance/__init__.py | 2 +- .../utils/compliance/conftest.py | 20 +- .../agent_protocol/utils/compliance/main.py | 208 +- packages/sdk/python/codegen/main.jinja2 | 32 +- packages/sdk/python/examples/minimal.py | 32 +- .../sdk/python/examples/smol_developer.py | 188 +- packages/sdk/python/poetry.lock | 3020 +++++++-------- packages/sdk/python/pyproject.toml | 68 +- rfcs/2023-08-28-Pagination-RFC.md | 13 +- rfcs/2023-08-28-agent-created-RFC-.md | 13 +- rfcs/2023-08-28-list-entities-RFC.md | 14 +- rfcs/2023-09-15-endpoint-schema.md | 15 +- schemas/openapi.json | 198 +- schemas/openapi.yml | 2 +- testing_suite/agent_protocol_v1.json | 2995 ++++++++------- testing_suite/contract_tests.json | 3067 ++++++++------- testing_suite/local_test.sh | 118 +- testing_suite/test.sh | 118 +- 76 files changed, 11656 insertions(+), 11805 deletions(-) diff --git a/.github/workflows/js-sdk-publish.yaml b/.github/workflows/js-sdk-publish.yaml index a0f991f1..2a2c4ef6 100644 --- a/.github/workflows/js-sdk-publish.yaml +++ b/.github/workflows/js-sdk-publish.yaml @@ -20,8 +20,8 @@ jobs: - name: Setup Node uses: actions/setup-node@v3 with: - node-version: "16.x" - registry-url: "https://registry.npmjs.org" + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' cache: npm cache-dependency-path: package-lock.json diff --git a/.github/workflows/python-client-publish.yaml b/.github/workflows/python-client-publish.yaml index 0b2e8221..6c6a67ef 100644 --- a/.github/workflows/python-client-publish.yaml +++ b/.github/workflows/python-client-publish.yaml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: '3.10' - name: Install and configure Poetry uses: snok/install-poetry@v1 diff --git a/.github/workflows/python-sdk-publish.yaml b/.github/workflows/python-sdk-publish.yaml index 921105c6..60ea0d5f 100644 --- a/.github/workflows/python-sdk-publish.yaml +++ b/.github/workflows/python-sdk-publish.yaml @@ -21,7 +21,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v4 with: - python-version: "3.10" + python-version: '3.10' - name: Install and configure Poetry uses: snok/install-poetry@v1 diff --git a/.gitignore b/.gitignore index 720ad5b1..3a98a728 100644 --- a/.gitignore +++ b/.gitignore @@ -1,266 +1,266 @@ -### Node template -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* -lerna-debug.log* -.pnpm-debug.log* - -# Diagnostic reports (https://nodejs.org/api/report.html) -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage -*.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (https://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Snowpack dependency directory (https://snowpack.dev/) -web_modules/ - -# TypeScript cache -*.tsbuildinfo - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional stylelint cache -.stylelintcache - -# Microbundle cache -.rpt2_cache/ -.rts2_cache_cjs/ -.rts2_cache_es/ -.rts2_cache_umd/ - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variable files -.env -.env.development.local -.env.test.local -.env.production.local -.env.local - -# parcel-bundler cache (https://parceljs.org/) -.cache -.parcel-cache - -# Next.js build output -.next -out - -# Nuxt.js build / generate output -.nuxt -dist - -# Gatsby files -.cache/ -# Comment in the public line in if your project uses Gatsby and not Next.js -# https://nextjs.org/blog/next-9-1#public-directory-support -# public - -# vuepress build output -.vuepress/dist - -# vuepress v2.x temp and cache directory -.temp - -# Docusaurus cache and generated files -.docusaurus - -# Serverless directories -.serverless/ - -# FuseBox cache -.fusebox/ - -# DynamoDB Local files -.dynamodb/ - -# TernJS port file -.tern-port - -# Stores VSCode versions used for testing VSCode extensions -.vscode-test - -# yarn v2 -.yarn/cache -.yarn/unplugged -.yarn/build-state.yml -.yarn/install-state.gz -.pnp.* - -### Python template -# Byte-compiled / optimized / DLL files -__pycache__/ -*.py[cod] -*$py.class - -# C extensions -*.so - -# Distribution / packaging -.Python -build/ -develop-eggs/ -dist/ -downloads/ -eggs/ -.eggs/ -!docs/src/lib -lib64/ -parts/ -sdist/ -var/ -wheels/ -share/python-wheels/ -*.egg-info/ -.installed.cfg -*.egg -MANIFEST - -# PyInstaller -# Usually these files are written by a python script from a template -# before PyInstaller builds the exe, so as to inject date/other infos into it. -*.manifest -*.spec - -# Installer logs -pip-log.txt -pip-delete-this-directory.txt - -# Unit test / coverage reports -htmlcov/ -.tox/ -.nox/ -.coverage -.coverage.* -nosetests.xml -coverage.xml -*.cover -*.py,cover -.hypothesis/ -.pytest_cache/ -cover/ - -# Translations -*.mo -*.pot - -# Django stuff: -local_settings.py -db.sqlite3 -db.sqlite3-journal - -# Flask stuff: -instance/ -.webassets-cache - -# Scrapy stuff: -.scrapy - -# Sphinx documentation -docs/_build/ - -# PyBuilder -.pybuilder/ -target/ - -# Jupyter Notebook -.ipynb_checkpoints - -# IPython -profile_default/ -ipython_config.py - -# pdm -# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it -# in version control. -# https://pdm.fming.dev/#use-with-ide -.pdm.toml - -# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm -__pypackages__/ - -# Celery stuff -celerybeat-schedule -celerybeat.pid - -# SageMath parsed files -*.sage.py - -# Environments -.venv -env/ -venv/ -ENV/ -env.bak/ -venv.bak/ - -# Spyder project settings -.spyderproject -.spyproject - -# Rope project settings -.ropeproject - -# mkdocs documentation -/site - -# mypy -.mypy_cache/ -.dmypy.json -dmypy.json - -# Pyre type checker -.pyre/ - -# pytype static type analyzer -.pytype/ - -# Cython debug symbols -cython_debug/ - -.idea/ - -# Testing Suite HTML Reports +### Node template +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional stylelint cache +.stylelintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# vuepress v2.x temp and cache directory +.temp + +# Docusaurus cache and generated files +.docusaurus + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +### Python template +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +!docs/src/lib +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pdm +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +.idea/ + +# Testing Suite HTML Reports report.html \ No newline at end of file diff --git a/.postman/api b/.postman/api index b4e726fd..4437645e 100644 --- a/.postman/api +++ b/.postman/api @@ -1,4 +1,4 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY -apis[] = {"apiId":"63f5e342-f43f-45fa-9a50-87934ccddcab"} -configVersion = 1.0.0 -type = api +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY +apis[] = {"apiId":"63f5e342-f43f-45fa-9a50-87934ccddcab"} +configVersion = 1.0.0 +type = api diff --git a/.postman/api_63f5e342-f43f-45fa-9a50-87934ccddcab b/.postman/api_63f5e342-f43f-45fa-9a50-87934ccddcab index c8e8a5de..e4d0bcd1 100644 --- a/.postman/api_63f5e342-f43f-45fa-9a50-87934ccddcab +++ b/.postman/api_63f5e342-f43f-45fa-9a50-87934ccddcab @@ -1,22 +1,22 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY -configVersion = 1.0.0 -type = apiEntityData - -[config] -id = 63f5e342-f43f-45fa-9a50-87934ccddcab - -[config.relations] - -[config.relations.collections] -rootDirectory = postman/collections - -[config.relations.collections.metaData] - -[config.relations.apiDefinition] -rootDirectory = schemas -files[] = {"path":"openapi.json","metaData":{}} -files[] = {"path":"openapi.yml","metaData":{}} - -[config.relations.apiDefinition.metaData] -type = openapi:3 -rootFiles[] = openapi.yml +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY +configVersion = 1.0.0 +type = apiEntityData + +[config] +id = 63f5e342-f43f-45fa-9a50-87934ccddcab + +[config.relations] + +[config.relations.collections] +rootDirectory = postman/collections + +[config.relations.collections.metaData] + +[config.relations.apiDefinition] +rootDirectory = schemas +files[] = {"path":"openapi.json","metaData":{}} +files[] = {"path":"openapi.yml","metaData":{}} + +[config.relations.apiDefinition.metaData] +type = openapi:3 +rootFiles[] = openapi.yml diff --git a/LICENSE b/LICENSE index 2622310a..0b61b6a5 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2023 e2b - -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. +MIT License + +Copyright (c) 2023 e2b + +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/apps/agentprotocol.ai/.gitignore b/apps/agentprotocol.ai/.gitignore index 8c9ef8dd..ddd4c5da 100644 --- a/apps/agentprotocol.ai/.gitignore +++ b/apps/agentprotocol.ai/.gitignore @@ -1,29 +1,29 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# dependencies -node_modules -/.pnp -.pnp.js -yarn.lock -package-lock.json -npm-shrinkwrap.json - -# testing -/coverage - -# production -/build - -# misc -.DS_Store -.env.local -.env.development.local -.env.test.local -.env.production.local - -# Next.js -/.next -/out - -# Bun +# See https://help.github.com/ignore-files/ for more about ignoring files. + +# dependencies +node_modules +/.pnp +.pnp.js +yarn.lock +package-lock.json +npm-shrinkwrap.json + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +# Next.js +/.next +/out + +# Bun bun.lockb \ No newline at end of file diff --git a/apps/agentprotocol.ai/public/test.sh b/apps/agentprotocol.ai/public/test.sh index 69fb09e2..8ea608ab 100644 --- a/apps/agentprotocol.ai/public/test.sh +++ b/apps/agentprotocol.ai/public/test.sh @@ -1,59 +1,59 @@ -#!/bin/bash - -# Check if a URL was provided as an environment variable -if [ -z "$URL" ]; then - echo "Usage: URL= bash