uipath 2.1.89__tar.gz → 2.1.90__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of uipath might be problematic. Click here for more details.
- {uipath-2.1.89 → uipath-2.1.90}/PKG-INFO +1 -1
- {uipath-2.1.89 → uipath-2.1.90}/pyproject.toml +1 -1
- {uipath-2.1.89 → uipath-2.1.90}/scripts/update_agents_md.py +9 -177
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_init.py +26 -12
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_resources/AGENTS.md +2 -20
- uipath-2.1.90/src/uipath/_resources/REQUIRED_STRUCTURE.md +64 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_resources/SDK_REFERENCE.md +1 -1
- uipath-2.1.90/tests/cli/test_init_agents_md.py +210 -0
- {uipath-2.1.89 → uipath-2.1.90}/uv.lock +1 -1
- uipath-2.1.89/src/uipath/_resources/REQUIRED_STRUCTURE.md +0 -93
- uipath-2.1.89/tests/cli/test_init_agents_md.py +0 -156
- {uipath-2.1.89 → uipath-2.1.90}/.claude/agents/command-tester.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.claude/commands/prepare-pr.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.cursorrules +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.editorconfig +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.gitattributes +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/labeler.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/auto-label.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/cd.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/ci.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/commitlint.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/integration_tests.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/lint.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/publish-dev.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/publish-docs.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/slack.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/test-uipath-langchain.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/test-uipath-llamaindex.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.github/workflows/test.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.gitignore +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.pre-commit-config.yaml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.python-version +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.vscode/extensions.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.vscode/launch.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/.vscode/settings.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/CONTRIBUTING.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/LICENSE +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/README.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/CONTRIBUTING.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/FAQ.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/assets/env-preparation-failed-dark.png +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/assets/env-preparation-failed-light.png +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/assets/favicon.png +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/assets/llms.txt +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/assets/logo-dark.svg +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/assets/logo-light.svg +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/cli/index.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/actions.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/assets/cloud_env_var_dark.gif +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/assets/cloud_env_var_light.gif +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/assets/cloud_env_var_secret_dark.png +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/assets/cloud_env_var_secret_light.png +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/assets/copy_path_dark.png +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/assets/copy_path_light.png +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/assets.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/attachments.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/buckets.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/connections.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/context_grounding.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/documents.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/documents_models.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/environment_variables.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/getting_started.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/jobs.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/llm_gateway.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/processes.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/queues.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/core/traced.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/hooks.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/index.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/javascripts/extra.js +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/overrides/main.html +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/overrides/partials/actions.html +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/overrides/partials/logo.html +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/release_policy.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/sample_images/google-ADK-agent/agent-output.png +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/docs/stylesheets/extra.css +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/justfile +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/mkdocs.yml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/py.typed +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/asset-modifier-agent/.env.example +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/asset-modifier-agent/README.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/asset-modifier-agent/input.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/asset-modifier-agent/main.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/asset-modifier-agent/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/asset-modifier-agent/uv.lock +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/calculator/README.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/calculator/evals/eval-sets/default.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/calculator/evals/evaluators/equality.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/calculator/evals/evaluators/llm-as-a-judge.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/calculator/main.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/calculator/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/calculator/uipath.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/event-trigger/.python-version +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/event-trigger/README.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/event-trigger/main.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/event-trigger/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/google-ADK-agent/.env.example +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/google-ADK-agent/README.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/google-ADK-agent/input.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/google-ADK-agent/multi_tool_agent/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/google-ADK-agent/multi_tool_agent/agent.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/google-ADK-agent/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/samples/google-ADK-agent/uv.lock +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/scripts/debug_test.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/scripts/lint_httpx_client.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/README.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/_auth_server.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/_auth_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/_models.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/_oidc_utils.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/_portal_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/_url_utils.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/_utils.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/auth_config.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/index.html +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/localhost.crt +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_auth/localhost.key +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_components/_chat.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_components/_details.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_components/_history.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_components/_json_input.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_components/_new.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_models/_execution.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_models/_messages.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_styles/terminal.tcss +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_utils/_chat.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_utils/_exporter.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_dev/_terminal/_utils/_logger.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_console_progress_reporter.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_evaluator_factory.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_models/_evaluation_set.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_models/_evaluator.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_models/_evaluator_base_params.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_models/_exceptions.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_models/_mocks.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_models/_output.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_models/_sw_reporting.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_progress_reporter.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_runtime.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/_span_collection.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/mocks/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/mocks/input_mocker.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/mocks/llm_mocker.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/mocks/mocker.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/mocks/mocker_factory.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/mocks/mockito_mocker.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_evals/mocks/mocks.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_push/sw_file_handler.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_runtime/_contracts.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_runtime/_escalation.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_runtime/_hitl.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_runtime/_logging.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_runtime/_runtime.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_runtime/_script_executor.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_templates/.psmdcp.template +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_templates/.rels.template +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_templates/[Content_Types].xml.template +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_templates/main.py.template +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_templates/package.nuspec.template +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_common.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_console.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_constants.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_debug.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_eval_set.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_folders.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_input_args.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_parse_ast.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_processes.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_project_files.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_studio_project.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_tracing.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/_utils/_uv_helpers.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_auth.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_deploy.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_dev.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_eval.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_invoke.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_new.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_pack.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_publish.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_pull.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_push.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/cli_run.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/middlewares.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_cli/spinner.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_config.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_events/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_events/_event_bus.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_events/_events.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_execution_context.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_folder_context.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_resources/CLAUDE.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_resources/CLI_REFERENCE.md +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/_base_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/actions_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/api_client.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/assets_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/attachments_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/buckets_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/connections_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/context_grounding_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/documents_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/entities_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/external_application_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/folder_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/jobs_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/llm_gateway_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/processes_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_services/queues_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_uipath.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_auth.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_endpoint.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_infer_bindings.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_logs.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_read_overwrites.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_request_override.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_request_spec.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_ssl_context.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_url.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/_user_agent.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/_utils/constants.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/_utils.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/async_stream.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/citation.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/content.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/conversation.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/event.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/exchange.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/message.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/meta.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/conversation/tool.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/loop/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/loop/prompts.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/loop/tools.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/agent/models/agent.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/_helpers/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/_helpers/helpers.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/evaluators/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/evaluators/base_evaluator.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/evaluators/deterministic_evaluator_base.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/evaluators/exact_match_evaluator.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/evaluators/json_similarity_evaluator.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/evaluators/llm_as_judge_evaluator.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/evaluators/trajectory_evaluator.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/mocks/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/mocks/mockable.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/models/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/eval/models/models.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/action_schema.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/actions.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/assets.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/attachment.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/auth.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/buckets.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/connections.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/context_grounding.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/context_grounding_index.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/documents.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/entities.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/errors.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/exceptions.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/interrupt_models.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/job.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/llm_gateway.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/processes.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/models/queues.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/py.typed +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/telemetry/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/telemetry/_constants.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/telemetry/_track.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/tracing/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/tracing/_otel_exporters.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/tracing/_traced.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/tracing/_utils.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/utils/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/utils/_endpoints_manager.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/src/uipath/utils/dynamic_schema.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/apicalls-testcase/main.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/apicalls-testcase/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/apicalls-testcase/run.sh +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/apicalls-testcase/src/assert.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/basic-testcase/main.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/basic-testcase/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/basic-testcase/run.sh +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/basic-testcase/src/assert.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/common/validate_output.sh +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/langchain-cross/agent.mermaid +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/langchain-cross/langgraph.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/langchain-cross/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/langchain-cross/run.sh +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/langchain-cross/src/assert.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/langchain-cross/src/main.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/llamaindex-cross/agent.mermaid +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/llamaindex-cross/llama_index.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/llamaindex-cross/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/llamaindex-cross/run.sh +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/llamaindex-cross/src/assert.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/testcases/llamaindex-cross/src/main.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/__init__.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/agent/models/test_agent.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/conftest.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/eval/mocks/test_input_mocker.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/eval/mocks/test_mocks.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/evaluators/test_json_similarity_evaluator.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/mocks/bindings_script.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/mocks/pyproject.toml +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/mocks/simple_script.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/mocks/uipath-mock.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/mocks/uipath-simple-script-mock.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_auth.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_hitl.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_init.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_input_args.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_invoke.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_new.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_oidc_utils.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_pack.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_portal_service_ensure_valid_token.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_portal_service_refresh_token.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_publish.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_pull.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_push.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_run.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/test_utils.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/utils/common.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/utils/project_details.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/utils/test_dynamic_schema.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/cli/utils/uipath_json.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/conftest.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/conftest.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_actions_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_api_client.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_assets_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_attachments_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_base_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_buckets_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_connections_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_context_grounding_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_documents_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_entities_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_external_application_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_folder_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_jobs_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_llm_integration.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_llm_schema_cleanup.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_llm_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_processes_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_queues_service.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/test_uipath_llm_integration.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/tests_data/documents_service/create_validation_action_response.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/tests_data/documents_service/extraction_response.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/services/tests_data/documents_service/validated_result.json +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/test_bindings_inference.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/test_config.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/sdk/test_overwrites.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/tracing/test_otel_exporters.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/tracing/test_span_utils.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/tracing/test_traced.py +0 -0
- {uipath-2.1.89 → uipath-2.1.90}/tests/tracing/test_tracing_manager.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath
|
|
3
|
-
Version: 2.1.
|
|
3
|
+
Version: 2.1.90
|
|
4
4
|
Summary: Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools.
|
|
5
5
|
Project-URL: Homepage, https://uipath.com
|
|
6
6
|
Project-URL: Repository, https://github.com/UiPath/uipath-python
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "uipath"
|
|
3
|
-
version = "2.1.
|
|
3
|
+
version = "2.1.90"
|
|
4
4
|
description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools."
|
|
5
5
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
6
6
|
requires-python = ">=3.10"
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
|
-
"""Script to update AGENTS.md with complete library documentation.
|
|
2
|
+
"""Script to update AGENTS.md reference files with complete library documentation.
|
|
3
3
|
|
|
4
4
|
This script extracts information from the uipath SDK and CLI commands and updates
|
|
5
|
-
the AGENTS.md
|
|
6
|
-
- SDK
|
|
7
|
-
- Quick API Reference (SDK services and methods)
|
|
5
|
+
the AGENTS.md reference files with comprehensive documentation including
|
|
6
|
+
- API Reference (SDK services and methods)
|
|
8
7
|
- CLI Commands Reference
|
|
9
8
|
"""
|
|
10
9
|
|
|
@@ -147,101 +146,8 @@ def get_service_methods(service_class: type) -> list[tuple[str, Any]]:
|
|
|
147
146
|
return methods
|
|
148
147
|
|
|
149
148
|
|
|
150
|
-
def generate_required_structure() -> str:
|
|
151
|
-
"""Generate Required Agent Structure documentation.
|
|
152
|
-
|
|
153
|
-
Returns:
|
|
154
|
-
Markdown string with required agent structure
|
|
155
|
-
"""
|
|
156
|
-
output = StringIO()
|
|
157
|
-
output.write("\n## Required Agent Structure\n\n")
|
|
158
|
-
output.write(
|
|
159
|
-
"**IMPORTANT**: All UiPath coded agents MUST follow this standard structure unless explicitly specified otherwise by the user.\n\n"
|
|
160
|
-
)
|
|
161
|
-
|
|
162
|
-
output.write("### Required Components\n\n")
|
|
163
|
-
output.write(
|
|
164
|
-
"Every agent implementation MUST include these three Pydantic models:\n\n"
|
|
165
|
-
)
|
|
166
|
-
output.write("```python\n")
|
|
167
|
-
output.write("from pydantic import BaseModel\n\n")
|
|
168
|
-
output.write("class Input(BaseModel):\n")
|
|
169
|
-
output.write(' """Define input fields that the agent accepts"""\n')
|
|
170
|
-
output.write(" # Add your input fields here\n")
|
|
171
|
-
output.write(" pass\n\n")
|
|
172
|
-
output.write("class State(BaseModel):\n")
|
|
173
|
-
output.write(
|
|
174
|
-
' """Define the agent\'s internal state that flows between nodes"""\n'
|
|
175
|
-
)
|
|
176
|
-
output.write(" # Add your state fields here\n")
|
|
177
|
-
output.write(" pass\n\n")
|
|
178
|
-
output.write("class Output(BaseModel):\n")
|
|
179
|
-
output.write(' """Define output fields that the agent returns"""\n')
|
|
180
|
-
output.write(" # Add your output fields here\n")
|
|
181
|
-
output.write(" pass\n")
|
|
182
|
-
output.write("```\n\n")
|
|
183
|
-
|
|
184
|
-
output.write("### Required LLM Initialization\n\n")
|
|
185
|
-
output.write(
|
|
186
|
-
"Unless the user explicitly requests a different LLM provider, always use `UiPathChat`:\n\n"
|
|
187
|
-
)
|
|
188
|
-
output.write("```python\n")
|
|
189
|
-
output.write("from uipath_langchain.chat import UiPathChat\n\n")
|
|
190
|
-
output.write('llm = UiPathChat(model="gpt-4o-2024-08-06", temperature=0.7)\n')
|
|
191
|
-
output.write("```\n\n")
|
|
192
|
-
output.write("**Alternative LLMs** (only use if explicitly requested):\n")
|
|
193
|
-
output.write("- `ChatOpenAI` from `langchain_openai`\n")
|
|
194
|
-
output.write("- `ChatAnthropic` from `langchain_anthropic`\n")
|
|
195
|
-
output.write("- Other LangChain-compatible LLMs\n\n")
|
|
196
|
-
|
|
197
|
-
output.write("### Standard Agent Template\n\n")
|
|
198
|
-
output.write("Every agent should follow this basic structure:\n\n")
|
|
199
|
-
output.write("```python\n")
|
|
200
|
-
output.write("from langchain_core.messages import SystemMessage, HumanMessage\n")
|
|
201
|
-
output.write("from langgraph.graph import START, StateGraph, END\n")
|
|
202
|
-
output.write("from uipath_langchain.chat import UiPathChat\n")
|
|
203
|
-
output.write("from pydantic import BaseModel\n\n")
|
|
204
|
-
output.write("# 1. Define Input, State, and Output models\n")
|
|
205
|
-
output.write("class Input(BaseModel):\n")
|
|
206
|
-
output.write(" field: str\n\n")
|
|
207
|
-
output.write("class State(BaseModel):\n")
|
|
208
|
-
output.write(" field: str\n")
|
|
209
|
-
output.write(' result: str = ""\n\n')
|
|
210
|
-
output.write("class Output(BaseModel):\n")
|
|
211
|
-
output.write(" result: str\n\n")
|
|
212
|
-
output.write("# 2. Initialize UiPathChat LLM\n")
|
|
213
|
-
output.write('llm = UiPathChat(model="gpt-4o-2024-08-06", temperature=0.7)\n\n')
|
|
214
|
-
output.write("# 3. Define agent nodes (async functions)\n")
|
|
215
|
-
output.write("async def process_node(state: State) -> State:\n")
|
|
216
|
-
output.write(" response = await llm.ainvoke([HumanMessage(state.field)])\n")
|
|
217
|
-
output.write(" return State(field=state.field, result=response.content)\n\n")
|
|
218
|
-
output.write("async def output_node(state: State) -> Output:\n")
|
|
219
|
-
output.write(" return Output(result=state.result)\n\n")
|
|
220
|
-
output.write("# 4. Build the graph\n")
|
|
221
|
-
output.write("builder = StateGraph(State, input=Input, output=Output)\n")
|
|
222
|
-
output.write('builder.add_node("process", process_node)\n')
|
|
223
|
-
output.write('builder.add_node("output", output_node)\n')
|
|
224
|
-
output.write('builder.add_edge(START, "process")\n')
|
|
225
|
-
output.write('builder.add_edge("process", "output")\n')
|
|
226
|
-
output.write('builder.add_edge("output", END)\n\n')
|
|
227
|
-
output.write("# 5. Compile the graph\n")
|
|
228
|
-
output.write("graph = builder.compile()\n")
|
|
229
|
-
output.write("```\n\n")
|
|
230
|
-
|
|
231
|
-
output.write("**Key Rules**:\n")
|
|
232
|
-
output.write("1. Always use async/await for all node functions\n")
|
|
233
|
-
output.write("2. All nodes (except output) must accept and return `State`\n")
|
|
234
|
-
output.write("3. The final output node must return `Output`\n")
|
|
235
|
-
output.write(
|
|
236
|
-
"4. Use `StateGraph(State, input=Input, output=Output)` for initialization\n"
|
|
237
|
-
)
|
|
238
|
-
output.write("5. Always compile with `graph = builder.compile()`\n\n")
|
|
239
|
-
|
|
240
|
-
return output.getvalue()
|
|
241
|
-
|
|
242
|
-
|
|
243
149
|
def generate_quick_api_docs() -> str:
|
|
244
|
-
"""Generate
|
|
150
|
+
"""Generate API Reference documentation for SDK.
|
|
245
151
|
|
|
246
152
|
Returns:
|
|
247
153
|
Markdown string with SDK API documentation
|
|
@@ -249,7 +155,7 @@ def generate_quick_api_docs() -> str:
|
|
|
249
155
|
from uipath import UiPath
|
|
250
156
|
|
|
251
157
|
output = StringIO()
|
|
252
|
-
output.write("\n##
|
|
158
|
+
output.write("\n## API Reference\n\n")
|
|
253
159
|
output.write(
|
|
254
160
|
"This section provides a comprehensive reference for all UiPath SDK services and methods. "
|
|
255
161
|
"Each service is documented with complete method signatures, including parameter types and return types.\n\n"
|
|
@@ -567,103 +473,29 @@ def generate_cli_docs() -> str:
|
|
|
567
473
|
return output.getvalue()
|
|
568
474
|
|
|
569
475
|
|
|
570
|
-
def
|
|
571
|
-
"""
|
|
476
|
+
def generate_agents_md_reference_files() -> None:
|
|
477
|
+
"""Generate separate reference files."""
|
|
572
478
|
resources_dir = Path(__file__).parent.parent / "src" / "uipath" / "_resources"
|
|
573
|
-
agents_md_path = resources_dir / "AGENTS.md"
|
|
574
479
|
|
|
575
|
-
if not agents_md_path.exists():
|
|
576
|
-
print(f"Error: AGENTS.md not found at {agents_md_path}", file=sys.stderr)
|
|
577
|
-
sys.exit(1)
|
|
578
|
-
|
|
579
|
-
with open(agents_md_path, "r", encoding="utf-8") as f:
|
|
580
|
-
content = f.read()
|
|
581
|
-
|
|
582
|
-
required_structure_marker = "## Required Agent Structure"
|
|
583
|
-
api_marker = "## Quick API Reference"
|
|
584
|
-
cli_marker = "## CLI Commands Reference"
|
|
585
|
-
reference_marker = "## Documentation Structure"
|
|
586
|
-
|
|
587
|
-
if reference_marker in content:
|
|
588
|
-
header = content.split(reference_marker)[0].rstrip()
|
|
589
|
-
elif required_structure_marker in content:
|
|
590
|
-
header = content.split(required_structure_marker)[0].rstrip()
|
|
591
|
-
elif api_marker in content:
|
|
592
|
-
header = content.split(api_marker)[0].rstrip()
|
|
593
|
-
elif cli_marker in content:
|
|
594
|
-
header = content.split(cli_marker)[0].rstrip()
|
|
595
|
-
else:
|
|
596
|
-
header = content.rstrip()
|
|
597
|
-
|
|
598
|
-
required_structure_path = resources_dir / "REQUIRED_STRUCTURE.md"
|
|
599
480
|
sdk_reference_path = resources_dir / "SDK_REFERENCE.md"
|
|
600
481
|
cli_reference_path = resources_dir / "CLI_REFERENCE.md"
|
|
601
482
|
|
|
602
|
-
required_structure = generate_required_structure()
|
|
603
483
|
api_docs = generate_quick_api_docs()
|
|
604
484
|
cli_docs = generate_cli_docs()
|
|
605
485
|
|
|
606
|
-
with open(required_structure_path, "w", encoding="utf-8") as f:
|
|
607
|
-
f.write(required_structure.lstrip("\n"))
|
|
608
|
-
|
|
609
486
|
with open(sdk_reference_path, "w", encoding="utf-8") as f:
|
|
610
487
|
f.write(api_docs.lstrip("\n"))
|
|
611
488
|
|
|
612
489
|
with open(cli_reference_path, "w", encoding="utf-8") as f:
|
|
613
490
|
f.write(cli_docs.lstrip("\n"))
|
|
614
491
|
|
|
615
|
-
updated_content = f"""{header}
|
|
616
|
-
|
|
617
|
-
## Documentation Structure
|
|
618
|
-
|
|
619
|
-
This documentation is split into multiple files for efficient context loading. Load only the files you need:
|
|
620
|
-
|
|
621
|
-
### Core Documentation Files
|
|
622
|
-
|
|
623
|
-
1. **@.agent/REQUIRED_STRUCTURE.md** - Agent structure patterns and templates
|
|
624
|
-
- **When to load:** Creating a new agent or understanding required patterns
|
|
625
|
-
- **Contains:** Required Pydantic models (Input, State, Output), LLM initialization patterns, standard agent template
|
|
626
|
-
- **Size:** ~90 lines
|
|
627
|
-
|
|
628
|
-
2. **@.agent/SDK_REFERENCE.md** - Complete SDK API reference
|
|
629
|
-
- **When to load:** Calling UiPath SDK methods, working with services (actions, assets, jobs, etc.)
|
|
630
|
-
- **Contains:** All SDK services and methods with full signatures and type annotations
|
|
631
|
-
- **Size:** ~400 lines
|
|
632
|
-
|
|
633
|
-
3. **@.agent/CLI_REFERENCE.md** - CLI commands documentation
|
|
634
|
-
- **When to load:** Working with `uipath init`, `uipath run`, or `uipath eval` commands
|
|
635
|
-
- **Contains:** Command syntax, options, usage examples, and workflows
|
|
636
|
-
- **Size:** ~200 lines
|
|
637
|
-
|
|
638
|
-
### Usage Guidelines
|
|
639
|
-
|
|
640
|
-
**For LLMs:**
|
|
641
|
-
- Read this file (AGENTS.md) first to understand the documentation structure
|
|
642
|
-
- Load .agent/REQUIRED_STRUCTURE.md when building new agents or need structure reference
|
|
643
|
-
- Load .agent/SDK_REFERENCE.md only when you need to call specific SDK methods
|
|
644
|
-
- Load .agent/CLI_REFERENCE.md only when working with CLI commands
|
|
645
|
-
|
|
646
|
-
**Benefits:**
|
|
647
|
-
- Reduced token usage by loading only relevant context
|
|
648
|
-
- Faster response times
|
|
649
|
-
- More focused context for specific tasks
|
|
650
|
-
"""
|
|
651
|
-
|
|
652
|
-
with open(agents_md_path, "w", encoding="utf-8") as f:
|
|
653
|
-
f.write(updated_content)
|
|
654
|
-
|
|
655
|
-
print(f"Successfully updated {agents_md_path}")
|
|
656
|
-
print(f"Generated {required_structure_path}")
|
|
657
|
-
print(f"Generated {sdk_reference_path}")
|
|
658
|
-
print(f"Generated {cli_reference_path}")
|
|
659
|
-
|
|
660
492
|
|
|
661
493
|
def main():
|
|
662
494
|
"""Main function."""
|
|
663
495
|
try:
|
|
664
|
-
|
|
496
|
+
generate_agents_md_reference_files()
|
|
665
497
|
except Exception as e:
|
|
666
|
-
print(f"Error updating AGENTS.md: {e}", file=sys.stderr)
|
|
498
|
+
print(f"Error updating AGENTS.md reference files: {e}", file=sys.stderr)
|
|
667
499
|
sys.exit(1)
|
|
668
500
|
|
|
669
501
|
|
|
@@ -60,20 +60,17 @@ def generate_env_file(target_directory):
|
|
|
60
60
|
console.success(f"Created '{relative_path}' file.")
|
|
61
61
|
|
|
62
62
|
|
|
63
|
-
def
|
|
63
|
+
def generate_agent_md_file(target_directory: str, file_name: str) -> None:
|
|
64
64
|
"""Generate an agent-specific file from the packaged resource.
|
|
65
65
|
|
|
66
66
|
Args:
|
|
67
67
|
target_directory: The directory where the file should be created.
|
|
68
68
|
file_name: The name of the file should be created.
|
|
69
69
|
"""
|
|
70
|
-
|
|
71
|
-
os.makedirs(agent_dir, exist_ok=True)
|
|
72
|
-
|
|
73
|
-
target_path = os.path.join(agent_dir, file_name)
|
|
70
|
+
target_path = os.path.join(target_directory, file_name)
|
|
74
71
|
|
|
75
72
|
if os.path.exists(target_path):
|
|
76
|
-
logger.debug(f"File '
|
|
73
|
+
logger.debug(f"File '{target_path}' already exists.")
|
|
77
74
|
return
|
|
78
75
|
|
|
79
76
|
try:
|
|
@@ -82,11 +79,32 @@ def generate_agent_specific_file_md(target_directory: str, file_name: str) -> No
|
|
|
82
79
|
with importlib.resources.as_file(source_path) as s_path:
|
|
83
80
|
shutil.copy(s_path, target_path)
|
|
84
81
|
|
|
85
|
-
console.success(f"Created '{f'.agent/{file_name}'}' file.")
|
|
86
82
|
except Exception as e:
|
|
87
83
|
console.warning(f"Could not create {file_name}: {e}")
|
|
88
84
|
|
|
89
85
|
|
|
86
|
+
def generate_agent_md_files(target_directory: str) -> None:
|
|
87
|
+
"""Generate an agent-specific file from the packaged resource.
|
|
88
|
+
|
|
89
|
+
Args:
|
|
90
|
+
target_directory: The directory where the files should be created.
|
|
91
|
+
"""
|
|
92
|
+
agent_dir = os.path.join(target_directory, ".agent")
|
|
93
|
+
os.makedirs(agent_dir, exist_ok=True)
|
|
94
|
+
|
|
95
|
+
root_files = ["AGENTS.md", "CLAUDE.md"]
|
|
96
|
+
|
|
97
|
+
agent_files = ["CLI_REFERENCE.md", "REQUIRED_STRUCTURE.md", "SDK_REFERENCE.md"]
|
|
98
|
+
|
|
99
|
+
for file_name in root_files:
|
|
100
|
+
generate_agent_md_file(target_directory, file_name)
|
|
101
|
+
|
|
102
|
+
for file_name in agent_files:
|
|
103
|
+
generate_agent_md_file(agent_dir, file_name)
|
|
104
|
+
|
|
105
|
+
console.success(f"Created {click.style('AGENTS.md', fg='cyan')} file.")
|
|
106
|
+
|
|
107
|
+
|
|
90
108
|
def get_existing_settings(config_path: str) -> Optional[Dict[str, Any]]:
|
|
91
109
|
"""Read existing settings from uipath.json if it exists.
|
|
92
110
|
|
|
@@ -161,11 +179,6 @@ def init(entrypoint: str, infer_bindings: bool) -> None:
|
|
|
161
179
|
current_directory = os.getcwd()
|
|
162
180
|
generate_env_file(current_directory)
|
|
163
181
|
create_telemetry_config_file(current_directory)
|
|
164
|
-
generate_agent_specific_file_md(current_directory, "AGENTS.md")
|
|
165
|
-
generate_agent_specific_file_md(current_directory, "CLI_REFERENCE.md")
|
|
166
|
-
generate_agent_specific_file_md(current_directory, "REQUIRED_STRUCTURE.md")
|
|
167
|
-
generate_agent_specific_file_md(current_directory, "SDK_REFERENCE.md")
|
|
168
|
-
generate_agent_specific_file_md(current_directory, "CLAUDE.md")
|
|
169
182
|
|
|
170
183
|
result = Middlewares.next(
|
|
171
184
|
"init",
|
|
@@ -185,6 +198,7 @@ def init(entrypoint: str, infer_bindings: bool) -> None:
|
|
|
185
198
|
if not result.should_continue:
|
|
186
199
|
return
|
|
187
200
|
|
|
201
|
+
generate_agent_md_files(current_directory)
|
|
188
202
|
script_path = get_user_script(current_directory, entrypoint=entrypoint)
|
|
189
203
|
|
|
190
204
|
if not script_path:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Agent Code Patterns Reference
|
|
2
2
|
|
|
3
|
-
This document provides practical code patterns for building UiPath coded agents using
|
|
3
|
+
This document provides practical code patterns for building UiPath coded agents using the UiPath Python SDK.
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,32 +8,14 @@ This document provides practical code patterns for building UiPath coded agents
|
|
|
8
8
|
|
|
9
9
|
This documentation is split into multiple files for efficient context loading. Load only the files you need:
|
|
10
10
|
|
|
11
|
-
### Core Documentation Files
|
|
12
|
-
|
|
13
11
|
1. **@.agent/REQUIRED_STRUCTURE.md** - Agent structure patterns and templates
|
|
14
12
|
- **When to load:** Creating a new agent or understanding required patterns
|
|
15
|
-
- **Contains:** Required Pydantic models (Input,
|
|
16
|
-
- **Size:** ~90 lines
|
|
13
|
+
- **Contains:** Required Pydantic models (Input, Output), SDK initialization patterns, standard agent template
|
|
17
14
|
|
|
18
15
|
2. **@.agent/SDK_REFERENCE.md** - Complete SDK API reference
|
|
19
16
|
- **When to load:** Calling UiPath SDK methods, working with services (actions, assets, jobs, etc.)
|
|
20
17
|
- **Contains:** All SDK services and methods with full signatures and type annotations
|
|
21
|
-
- **Size:** ~400 lines
|
|
22
18
|
|
|
23
19
|
3. **@.agent/CLI_REFERENCE.md** - CLI commands documentation
|
|
24
20
|
- **When to load:** Working with `uipath init`, `uipath run`, or `uipath eval` commands
|
|
25
21
|
- **Contains:** Command syntax, options, usage examples, and workflows
|
|
26
|
-
- **Size:** ~200 lines
|
|
27
|
-
|
|
28
|
-
### Usage Guidelines
|
|
29
|
-
|
|
30
|
-
**For LLMs:**
|
|
31
|
-
- Read this file (AGENTS.md) first to understand the documentation structure
|
|
32
|
-
- Load .agent/REQUIRED_STRUCTURE.md when building new agents or need structure reference
|
|
33
|
-
- Load .agent/SDK_REFERENCE.md only when you need to call specific SDK methods
|
|
34
|
-
- Load .agent/CLI_REFERENCE.md only when working with CLI commands
|
|
35
|
-
|
|
36
|
-
**Benefits:**
|
|
37
|
-
- Reduced token usage by loading only relevant context
|
|
38
|
-
- Faster response times
|
|
39
|
-
- More focused context for specific tasks
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
## Required Agent Structure
|
|
2
|
+
|
|
3
|
+
**IMPORTANT**: All UiPath coded agents MUST follow this standard structure unless explicitly specified otherwise by the user.
|
|
4
|
+
|
|
5
|
+
### Required Components
|
|
6
|
+
|
|
7
|
+
Every agent implementation MUST include these two Pydantic models:
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
from pydantic import BaseModel
|
|
11
|
+
|
|
12
|
+
class Input(BaseModel):
|
|
13
|
+
"""Define input fields that the agent accepts"""
|
|
14
|
+
# Add your input fields here
|
|
15
|
+
pass
|
|
16
|
+
|
|
17
|
+
class Output(BaseModel):
|
|
18
|
+
"""Define output fields that the agent returns"""
|
|
19
|
+
# Add your output fields here
|
|
20
|
+
pass
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### SDK Initialization
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from uipath import UiPath
|
|
27
|
+
|
|
28
|
+
# Initialize with environment variables
|
|
29
|
+
uipath = UiPath()
|
|
30
|
+
|
|
31
|
+
# With explicit credentials
|
|
32
|
+
uipath = UiPath(base_url="https://cloud.uipath.com/...", secret="your_token")
|
|
33
|
+
|
|
34
|
+
# Or with client_id and client_secret
|
|
35
|
+
uipath = UiPath(
|
|
36
|
+
client_id=UIPATH_CLIENT_ID,
|
|
37
|
+
client_secret=UIPATH_CLIENT_SECRET,
|
|
38
|
+
scope=UIPATH_SCOPE,
|
|
39
|
+
base_url=UIPATH_URL
|
|
40
|
+
)
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Standard Agent Template
|
|
44
|
+
|
|
45
|
+
Every agent should follow this basic structure:
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from uipath import UiPath
|
|
49
|
+
from pydantic import BaseModel
|
|
50
|
+
|
|
51
|
+
# 1. Define Input, and Output models
|
|
52
|
+
class Input(BaseModel):
|
|
53
|
+
field: str
|
|
54
|
+
|
|
55
|
+
class Output(BaseModel):
|
|
56
|
+
result: str
|
|
57
|
+
|
|
58
|
+
# 2. Initialize with environment variables
|
|
59
|
+
uipath = UiPath()
|
|
60
|
+
|
|
61
|
+
# 3. Define the main function (the main function can be named "main", "run" or "execute")
|
|
62
|
+
def main(input_data: Input) -> Output:
|
|
63
|
+
pass
|
|
64
|
+
```
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
"""Tests for AGENTS.md generation in the init command."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import tempfile
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from unittest.mock import MagicMock, patch
|
|
7
|
+
|
|
8
|
+
from click.testing import CliRunner
|
|
9
|
+
|
|
10
|
+
from uipath._cli import cli
|
|
11
|
+
from uipath._cli.cli_init import ( # type: ignore[attr-defined]
|
|
12
|
+
generate_agent_md_file,
|
|
13
|
+
generate_agent_md_files,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class TestGenerateAgentMdFile:
|
|
18
|
+
"""Test the generate_agent_md_file helper function."""
|
|
19
|
+
|
|
20
|
+
def test_generate_agent_md_file_creates_file(self) -> None:
|
|
21
|
+
"""Test that a single md file is created successfully."""
|
|
22
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
23
|
+
original_cwd = os.getcwd()
|
|
24
|
+
try:
|
|
25
|
+
os.chdir(temp_dir)
|
|
26
|
+
mock_source = (
|
|
27
|
+
Path(__file__).parent.parent.parent
|
|
28
|
+
/ "src"
|
|
29
|
+
/ "uipath"
|
|
30
|
+
/ "_resources"
|
|
31
|
+
/ "AGENTS.md"
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
with (
|
|
35
|
+
patch(
|
|
36
|
+
"uipath._cli.cli_init.importlib.resources.files"
|
|
37
|
+
) as mock_files,
|
|
38
|
+
patch(
|
|
39
|
+
"uipath._cli.cli_init.importlib.resources.as_file"
|
|
40
|
+
) as mock_as_file,
|
|
41
|
+
):
|
|
42
|
+
mock_path = MagicMock()
|
|
43
|
+
mock_files.return_value.joinpath.return_value = mock_path
|
|
44
|
+
mock_as_file.return_value.__enter__.return_value = mock_source
|
|
45
|
+
mock_as_file.return_value.__exit__.return_value = None
|
|
46
|
+
|
|
47
|
+
generate_agent_md_file(temp_dir, "AGENTS.md")
|
|
48
|
+
|
|
49
|
+
assert (Path(temp_dir) / "AGENTS.md").exists()
|
|
50
|
+
finally:
|
|
51
|
+
os.chdir(original_cwd)
|
|
52
|
+
|
|
53
|
+
def test_generate_agents_md_skips_existing_file(self) -> None:
|
|
54
|
+
"""Test that existing AGENTS.md is not overwritten."""
|
|
55
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
56
|
+
agents_path = Path(temp_dir) / "AGENTS.md"
|
|
57
|
+
original_content = "Original content"
|
|
58
|
+
agents_path.write_text(original_content)
|
|
59
|
+
|
|
60
|
+
generate_agent_md_file(temp_dir, "AGENTS.md")
|
|
61
|
+
|
|
62
|
+
assert agents_path.read_text() == original_content
|
|
63
|
+
|
|
64
|
+
def test_generate_agents_md_handles_errors_gracefully(self) -> None:
|
|
65
|
+
"""Test that errors are handled gracefully."""
|
|
66
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
67
|
+
with (
|
|
68
|
+
patch("uipath._cli.cli_init.importlib.resources.files") as mock_files,
|
|
69
|
+
patch("uipath._cli.cli_init.console") as mock_console,
|
|
70
|
+
):
|
|
71
|
+
mock_files.side_effect = RuntimeError("Test error")
|
|
72
|
+
|
|
73
|
+
generate_agent_md_file(temp_dir, "AGENTS.md")
|
|
74
|
+
|
|
75
|
+
mock_console.warning.assert_called_once()
|
|
76
|
+
assert "Could not create AGENTS.md: Test error" in str(
|
|
77
|
+
mock_console.warning.call_args
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class TestGenerateAgentMdFiles:
|
|
82
|
+
"""Test the generate_agent_md_files function that creates multiple files."""
|
|
83
|
+
|
|
84
|
+
def test_generate_agent_md_files_creates_all_files(self) -> None:
|
|
85
|
+
"""Test that all root and agent files are created in the correct locations."""
|
|
86
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
87
|
+
with (
|
|
88
|
+
patch("uipath._cli.cli_init.importlib.resources.files") as mock_files,
|
|
89
|
+
patch(
|
|
90
|
+
"uipath._cli.cli_init.importlib.resources.as_file"
|
|
91
|
+
) as mock_as_file,
|
|
92
|
+
patch("uipath._cli.cli_init.console"),
|
|
93
|
+
):
|
|
94
|
+
temp_source = Path(temp_dir) / "temp_source.md"
|
|
95
|
+
temp_source.write_text("Test content")
|
|
96
|
+
|
|
97
|
+
mock_path = MagicMock()
|
|
98
|
+
mock_files.return_value.joinpath.return_value = mock_path
|
|
99
|
+
mock_as_file.return_value.__enter__.return_value = temp_source
|
|
100
|
+
mock_as_file.return_value.__exit__.return_value = None
|
|
101
|
+
|
|
102
|
+
generate_agent_md_files(temp_dir)
|
|
103
|
+
|
|
104
|
+
agent_dir = Path(temp_dir) / ".agent"
|
|
105
|
+
assert agent_dir.exists()
|
|
106
|
+
assert agent_dir.is_dir()
|
|
107
|
+
|
|
108
|
+
assert (Path(temp_dir) / "AGENTS.md").exists()
|
|
109
|
+
assert (Path(temp_dir) / "CLAUDE.md").exists()
|
|
110
|
+
|
|
111
|
+
assert (agent_dir / "CLI_REFERENCE.md").exists()
|
|
112
|
+
assert (agent_dir / "REQUIRED_STRUCTURE.md").exists()
|
|
113
|
+
assert (agent_dir / "SDK_REFERENCE.md").exists()
|
|
114
|
+
|
|
115
|
+
def test_generate_agent_md_files_skips_existing_files(self) -> None:
|
|
116
|
+
"""Test that existing files are not overwritten."""
|
|
117
|
+
with tempfile.TemporaryDirectory() as temp_dir:
|
|
118
|
+
agent_dir = Path(temp_dir) / ".agent"
|
|
119
|
+
agent_dir.mkdir()
|
|
120
|
+
|
|
121
|
+
agents_path = Path(temp_dir) / "AGENTS.md"
|
|
122
|
+
agents_content = "Original AGENTS content"
|
|
123
|
+
agents_path.write_text(agents_content)
|
|
124
|
+
|
|
125
|
+
cli_ref_path = agent_dir / "CLI_REFERENCE.md"
|
|
126
|
+
cli_ref_content = "Original CLI_REFERENCE content"
|
|
127
|
+
cli_ref_path.write_text(cli_ref_content)
|
|
128
|
+
|
|
129
|
+
with (
|
|
130
|
+
patch("uipath._cli.cli_init.importlib.resources.files") as mock_files,
|
|
131
|
+
patch(
|
|
132
|
+
"uipath._cli.cli_init.importlib.resources.as_file"
|
|
133
|
+
) as mock_as_file,
|
|
134
|
+
):
|
|
135
|
+
temp_source = Path(temp_dir) / "temp_source.md"
|
|
136
|
+
temp_source.write_text("Test content")
|
|
137
|
+
|
|
138
|
+
mock_path = MagicMock()
|
|
139
|
+
mock_files.return_value.joinpath.return_value = mock_path
|
|
140
|
+
mock_as_file.return_value.__enter__.return_value = temp_source
|
|
141
|
+
mock_as_file.return_value.__exit__.return_value = None
|
|
142
|
+
|
|
143
|
+
generate_agent_md_files(temp_dir)
|
|
144
|
+
|
|
145
|
+
assert agents_path.read_text() == agents_content
|
|
146
|
+
assert cli_ref_path.read_text() == cli_ref_content
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class TestInitWithAgentsMd:
|
|
150
|
+
"""Test the init command with default AGENTS.md creation."""
|
|
151
|
+
|
|
152
|
+
def test_init_creates_agent_files_by_default(
|
|
153
|
+
self, runner: CliRunner, temp_dir: str
|
|
154
|
+
) -> None:
|
|
155
|
+
"""Test that agent files are created by default during init."""
|
|
156
|
+
with runner.isolated_filesystem(temp_dir=temp_dir):
|
|
157
|
+
# Create a simple Python file
|
|
158
|
+
with open("main.py", "w") as f:
|
|
159
|
+
f.write("def main(input): return input")
|
|
160
|
+
|
|
161
|
+
temp_source = Path(temp_dir) / "temp_source.md"
|
|
162
|
+
temp_source.write_text("Test content")
|
|
163
|
+
|
|
164
|
+
with (
|
|
165
|
+
patch("uipath._cli.cli_init.importlib.resources.files") as mock_files,
|
|
166
|
+
patch(
|
|
167
|
+
"uipath._cli.cli_init.importlib.resources.as_file"
|
|
168
|
+
) as mock_as_file,
|
|
169
|
+
):
|
|
170
|
+
# Setup mocks
|
|
171
|
+
mock_path = MagicMock()
|
|
172
|
+
mock_files.return_value.joinpath.return_value = mock_path
|
|
173
|
+
mock_as_file.return_value.__enter__.return_value = temp_source
|
|
174
|
+
mock_as_file.return_value.__exit__.return_value = None
|
|
175
|
+
|
|
176
|
+
result = runner.invoke(cli, ["init"])
|
|
177
|
+
|
|
178
|
+
assert result.exit_code == 0
|
|
179
|
+
assert "AGENTS.md" in result.output
|
|
180
|
+
assert "file." in result.output
|
|
181
|
+
|
|
182
|
+
assert os.path.exists("AGENTS.md")
|
|
183
|
+
assert os.path.exists("CLAUDE.md")
|
|
184
|
+
|
|
185
|
+
assert os.path.exists(".agent/CLI_REFERENCE.md")
|
|
186
|
+
assert os.path.exists(".agent/REQUIRED_STRUCTURE.md")
|
|
187
|
+
assert os.path.exists(".agent/SDK_REFERENCE.md")
|
|
188
|
+
|
|
189
|
+
def test_init_does_not_overwrite_existing_agents_md(
|
|
190
|
+
self, runner: CliRunner, temp_dir: str
|
|
191
|
+
) -> None:
|
|
192
|
+
"""Test that existing AGENTS.md is not overwritten."""
|
|
193
|
+
with runner.isolated_filesystem(temp_dir=temp_dir):
|
|
194
|
+
# Create a simple Python file
|
|
195
|
+
with open("main.py", "w") as f:
|
|
196
|
+
f.write("def main(input): return input")
|
|
197
|
+
|
|
198
|
+
# Create existing AGENTS.md
|
|
199
|
+
original_content = "Original AGENTS.md content"
|
|
200
|
+
with open("AGENTS.md", "w") as f:
|
|
201
|
+
f.write(original_content)
|
|
202
|
+
|
|
203
|
+
# Run init (AGENTS.md creation is now default)
|
|
204
|
+
result = runner.invoke(cli, ["init"])
|
|
205
|
+
|
|
206
|
+
assert result.exit_code == 0
|
|
207
|
+
|
|
208
|
+
# Verify content wasn't changed
|
|
209
|
+
with open("AGENTS.md", "r") as f:
|
|
210
|
+
assert f.read() == original_content
|