affinity-sdk 0.8.5__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.
- affinity_sdk-0.8.5/.claude-plugin/marketplace.json +26 -0
- affinity_sdk-0.8.5/.editorconfig +19 -0
- affinity_sdk-0.8.5/.env.example +3 -0
- affinity_sdk-0.8.5/.gitattributes +7 -0
- affinity_sdk-0.8.5/.github/CODEOWNERS +9 -0
- affinity_sdk-0.8.5/.github/ISSUE_TEMPLATE/bug_report.yml +44 -0
- affinity_sdk-0.8.5/.github/ISSUE_TEMPLATE/feature_request.yml +27 -0
- affinity_sdk-0.8.5/.github/PULL_REQUEST_TEMPLATE/cli_command.md +89 -0
- affinity_sdk-0.8.5/.github/PULL_REQUEST_TEMPLATE/release.md +31 -0
- affinity_sdk-0.8.5/.github/dependabot.yml +12 -0
- affinity_sdk-0.8.5/.github/labels.yml +51 -0
- affinity_sdk-0.8.5/.github/pull_request_template.md +14 -0
- affinity_sdk-0.8.5/.github/workflows/ci.yml +134 -0
- affinity_sdk-0.8.5/.github/workflows/docs.yml +101 -0
- affinity_sdk-0.8.5/.github/workflows/labels.yml +22 -0
- affinity_sdk-0.8.5/.github/workflows/linkcheck.yml +44 -0
- affinity_sdk-0.8.5/.github/workflows/openapi-validation.yml +30 -0
- affinity_sdk-0.8.5/.github/workflows/plugin-build.yml +106 -0
- affinity_sdk-0.8.5/.github/workflows/plugin-release.yml +102 -0
- affinity_sdk-0.8.5/.github/workflows/release.yml +218 -0
- affinity_sdk-0.8.5/.github/workflows/version-check.yml +92 -0
- affinity_sdk-0.8.5/.gitignore +60 -0
- affinity_sdk-0.8.5/.pre-commit-config.yaml +62 -0
- affinity_sdk-0.8.5/CHANGELOG.md +325 -0
- affinity_sdk-0.8.5/CODE_OF_CONDUCT.md +96 -0
- affinity_sdk-0.8.5/CONTRIBUTING.md +123 -0
- affinity_sdk-0.8.5/LICENSE +21 -0
- affinity_sdk-0.8.5/PKG-INFO +622 -0
- affinity_sdk-0.8.5/README.md +565 -0
- affinity_sdk-0.8.5/SECURITY.md +10 -0
- affinity_sdk-0.8.5/VERSIONING.md +141 -0
- affinity_sdk-0.8.5/affinity/__init__.py +139 -0
- affinity_sdk-0.8.5/affinity/cli/__init__.py +7 -0
- affinity_sdk-0.8.5/affinity/cli/click_compat.py +27 -0
- affinity_sdk-0.8.5/affinity/cli/commands/__init__.py +1 -0
- affinity_sdk-0.8.5/affinity/cli/commands/_entity_files_dump.py +219 -0
- affinity_sdk-0.8.5/affinity/cli/commands/_list_entry_fields.py +41 -0
- affinity_sdk-0.8.5/affinity/cli/commands/_v1_parsing.py +77 -0
- affinity_sdk-0.8.5/affinity/cli/commands/company_cmds.py +2142 -0
- affinity_sdk-0.8.5/affinity/cli/commands/completion_cmd.py +33 -0
- affinity_sdk-0.8.5/affinity/cli/commands/config_cmds.py +540 -0
- affinity_sdk-0.8.5/affinity/cli/commands/entry_cmds.py +33 -0
- affinity_sdk-0.8.5/affinity/cli/commands/field_cmds.py +413 -0
- affinity_sdk-0.8.5/affinity/cli/commands/interaction_cmds.py +874 -0
- affinity_sdk-0.8.5/affinity/cli/commands/list_cmds.py +3152 -0
- affinity_sdk-0.8.5/affinity/cli/commands/note_cmds.py +435 -0
- affinity_sdk-0.8.5/affinity/cli/commands/opportunity_cmds.py +1172 -0
- affinity_sdk-0.8.5/affinity/cli/commands/person_cmds.py +1983 -0
- affinity_sdk-0.8.5/affinity/cli/commands/relationship_strength_cmds.py +62 -0
- affinity_sdk-0.8.5/affinity/cli/commands/reminder_cmds.py +595 -0
- affinity_sdk-0.8.5/affinity/cli/commands/resolve_url_cmd.py +127 -0
- affinity_sdk-0.8.5/affinity/cli/commands/session_cmds.py +84 -0
- affinity_sdk-0.8.5/affinity/cli/commands/task_cmds.py +110 -0
- affinity_sdk-0.8.5/affinity/cli/commands/version_cmd.py +29 -0
- affinity_sdk-0.8.5/affinity/cli/commands/whoami_cmd.py +36 -0
- affinity_sdk-0.8.5/affinity/cli/config.py +108 -0
- affinity_sdk-0.8.5/affinity/cli/context.py +747 -0
- affinity_sdk-0.8.5/affinity/cli/csv_utils.py +205 -0
- affinity_sdk-0.8.5/affinity/cli/date_utils.py +42 -0
- affinity_sdk-0.8.5/affinity/cli/decorators.py +77 -0
- affinity_sdk-0.8.5/affinity/cli/errors.py +28 -0
- affinity_sdk-0.8.5/affinity/cli/field_utils.py +355 -0
- affinity_sdk-0.8.5/affinity/cli/help_json.py +283 -0
- affinity_sdk-0.8.5/affinity/cli/logging.py +100 -0
- affinity_sdk-0.8.5/affinity/cli/main.py +259 -0
- affinity_sdk-0.8.5/affinity/cli/options.py +46 -0
- affinity_sdk-0.8.5/affinity/cli/paths.py +32 -0
- affinity_sdk-0.8.5/affinity/cli/progress.py +183 -0
- affinity_sdk-0.8.5/affinity/cli/render.py +1495 -0
- affinity_sdk-0.8.5/affinity/cli/resolve.py +222 -0
- affinity_sdk-0.8.5/affinity/cli/resolvers.py +249 -0
- affinity_sdk-0.8.5/affinity/cli/results.py +265 -0
- affinity_sdk-0.8.5/affinity/cli/runner.py +161 -0
- affinity_sdk-0.8.5/affinity/cli/serialization.py +65 -0
- affinity_sdk-0.8.5/affinity/cli/session_cache.py +276 -0
- affinity_sdk-0.8.5/affinity/cli/types.py +70 -0
- affinity_sdk-0.8.5/affinity/client.py +769 -0
- affinity_sdk-0.8.5/affinity/clients/__init__.py +19 -0
- affinity_sdk-0.8.5/affinity/clients/http.py +3664 -0
- affinity_sdk-0.8.5/affinity/clients/pipeline.py +165 -0
- affinity_sdk-0.8.5/affinity/downloads.py +114 -0
- affinity_sdk-0.8.5/affinity/exceptions.py +615 -0
- affinity_sdk-0.8.5/affinity/filters.py +740 -0
- affinity_sdk-0.8.5/affinity/hooks.py +198 -0
- affinity_sdk-0.8.5/affinity/inbound_webhooks.py +302 -0
- affinity_sdk-0.8.5/affinity/models/__init__.py +163 -0
- affinity_sdk-0.8.5/affinity/models/entities.py +798 -0
- affinity_sdk-0.8.5/affinity/models/pagination.py +513 -0
- affinity_sdk-0.8.5/affinity/models/rate_limit_snapshot.py +48 -0
- affinity_sdk-0.8.5/affinity/models/secondary.py +413 -0
- affinity_sdk-0.8.5/affinity/models/types.py +663 -0
- affinity_sdk-0.8.5/affinity/policies.py +40 -0
- affinity_sdk-0.8.5/affinity/progress.py +22 -0
- affinity_sdk-0.8.5/affinity/py.typed +0 -0
- affinity_sdk-0.8.5/affinity/services/__init__.py +42 -0
- affinity_sdk-0.8.5/affinity/services/companies.py +1216 -0
- affinity_sdk-0.8.5/affinity/services/lists.py +1781 -0
- affinity_sdk-0.8.5/affinity/services/opportunities.py +1330 -0
- affinity_sdk-0.8.5/affinity/services/persons.py +1178 -0
- affinity_sdk-0.8.5/affinity/services/rate_limits.py +173 -0
- affinity_sdk-0.8.5/affinity/services/tasks.py +193 -0
- affinity_sdk-0.8.5/affinity/services/v1_only.py +2445 -0
- affinity_sdk-0.8.5/affinity/types.py +83 -0
- affinity_sdk-0.8.5/docs/cli-development-guide.md +586 -0
- affinity_sdk-0.8.5/docs/public/ai-integrations/index.md +77 -0
- affinity_sdk-0.8.5/docs/public/changelog.md +3 -0
- affinity_sdk-0.8.5/docs/public/cli/commands.md +780 -0
- affinity_sdk-0.8.5/docs/public/cli/index.md +150 -0
- affinity_sdk-0.8.5/docs/public/cli/scripting.md +151 -0
- affinity_sdk-0.8.5/docs/public/cli-reference.md +523 -0
- affinity_sdk-0.8.5/docs/public/examples.md +77 -0
- affinity_sdk-0.8.5/docs/public/getting-started.md +120 -0
- affinity_sdk-0.8.5/docs/public/glossary.md +22 -0
- affinity_sdk-0.8.5/docs/public/guides/api-versions-and-routing.md +46 -0
- affinity_sdk-0.8.5/docs/public/guides/authentication.md +52 -0
- affinity_sdk-0.8.5/docs/public/guides/claude-code-plugins.md +148 -0
- affinity_sdk-0.8.5/docs/public/guides/configuration.md +191 -0
- affinity_sdk-0.8.5/docs/public/guides/csv-export.md +332 -0
- affinity_sdk-0.8.5/docs/public/guides/datetime-handling.md +100 -0
- affinity_sdk-0.8.5/docs/public/guides/debugging-hooks.md +92 -0
- affinity_sdk-0.8.5/docs/public/guides/errors-and-retries.md +156 -0
- affinity_sdk-0.8.5/docs/public/guides/field-types-and-values.md +126 -0
- affinity_sdk-0.8.5/docs/public/guides/field-values.md +150 -0
- affinity_sdk-0.8.5/docs/public/guides/filtering.md +197 -0
- affinity_sdk-0.8.5/docs/public/guides/ids-and-types.md +21 -0
- affinity_sdk-0.8.5/docs/public/guides/models.md +64 -0
- affinity_sdk-0.8.5/docs/public/guides/opportunity-associations.md +135 -0
- affinity_sdk-0.8.5/docs/public/guides/pagination.md +81 -0
- affinity_sdk-0.8.5/docs/public/guides/performance.md +106 -0
- affinity_sdk-0.8.5/docs/public/guides/rate-limits.md +36 -0
- affinity_sdk-0.8.5/docs/public/guides/sync-vs-async.md +54 -0
- affinity_sdk-0.8.5/docs/public/guides/webhooks.md +226 -0
- affinity_sdk-0.8.5/docs/public/index.md +33 -0
- affinity_sdk-0.8.5/docs/public/mcp/index.md +375 -0
- affinity_sdk-0.8.5/docs/public/reference/client.md +9 -0
- affinity_sdk-0.8.5/docs/public/reference/exceptions.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/filters.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/models.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/companies.md +10 -0
- affinity_sdk-0.8.5/docs/public/reference/services/lists.md +5 -0
- affinity_sdk-0.8.5/docs/public/reference/services/opportunities.md +5 -0
- affinity_sdk-0.8.5/docs/public/reference/services/persons.md +5 -0
- affinity_sdk-0.8.5/docs/public/reference/services/tasks.md +5 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/auth.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/field-values.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/fields.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/files.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/interactions.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/notes.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/relationships.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/reminders.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/services/v1/webhooks.md +3 -0
- affinity_sdk-0.8.5/docs/public/reference/types.md +3 -0
- affinity_sdk-0.8.5/docs/public/troubleshooting.md +22 -0
- affinity_sdk-0.8.5/examples/advanced_usage.py +480 -0
- affinity_sdk-0.8.5/examples/async_lifecycle.py +43 -0
- affinity_sdk-0.8.5/examples/basic_usage.py +74 -0
- affinity_sdk-0.8.5/examples/filter_builder.py +36 -0
- affinity_sdk-0.8.5/examples/hooks_debugging.py +40 -0
- affinity_sdk-0.8.5/examples/list_management.py +120 -0
- affinity_sdk-0.8.5/examples/resolve_helpers.py +38 -0
- affinity_sdk-0.8.5/examples/task_polling.py +34 -0
- affinity_sdk-0.8.5/mcp/.claude-plugin/.gitignore +14 -0
- affinity_sdk-0.8.5/mcp/.claude-plugin/.mcp.json +6 -0
- affinity_sdk-0.8.5/mcp/.claude-plugin/plugin.json +24 -0
- affinity_sdk-0.8.5/mcp/.claude-plugin/skills/affinity-mcp-workflows/SKILL.md +212 -0
- affinity_sdk-0.8.5/mcp/.claude-plugin/xaffinity-mcp.sh +107 -0
- affinity_sdk-0.8.5/mcp/.gitignore +22 -0
- affinity_sdk-0.8.5/mcp/.registry/commands-metadata.json +75 -0
- affinity_sdk-0.8.5/mcp/.registry/commands.json +2907 -0
- affinity_sdk-0.8.5/mcp/.registry/prompts.json +253 -0
- affinity_sdk-0.8.5/mcp/.registry/resource-templates.json +30 -0
- affinity_sdk-0.8.5/mcp/.registry/resources.json +41 -0
- affinity_sdk-0.8.5/mcp/CHANGELOG.md +279 -0
- affinity_sdk-0.8.5/mcp/COMPATIBILITY +25 -0
- affinity_sdk-0.8.5/mcp/Makefile +120 -0
- affinity_sdk-0.8.5/mcp/README.md +243 -0
- affinity_sdk-0.8.5/mcp/VERSION +1 -0
- affinity_sdk-0.8.5/mcp/completions/entity-name.sh +51 -0
- affinity_sdk-0.8.5/mcp/completions/list-name.sh +42 -0
- affinity_sdk-0.8.5/mcp/completions/status-value.sh +46 -0
- affinity_sdk-0.8.5/mcp/docs/DEBUGGING.md +151 -0
- affinity_sdk-0.8.5/mcp/docs/internal/debugging-improvements-plan.md +375 -0
- affinity_sdk-0.8.5/mcp/docs/internal/mcp-bash-progress-timeout-feature-request.md +215 -0
- affinity_sdk-0.8.5/mcp/icon.svg +19 -0
- affinity_sdk-0.8.5/mcp/lib/cache.sh +124 -0
- affinity_sdk-0.8.5/mcp/lib/cli-gateway.sh +451 -0
- affinity_sdk-0.8.5/mcp/lib/common.sh +453 -0
- affinity_sdk-0.8.5/mcp/lib/entity-types.sh +84 -0
- affinity_sdk-0.8.5/mcp/lib/field-resolution.sh +124 -0
- affinity_sdk-0.8.5/mcp/mcp-bash.lock +5 -0
- affinity_sdk-0.8.5/mcp/mcpb.conf +24 -0
- affinity_sdk-0.8.5/mcp/prompts/change-status/change-status.meta.json +26 -0
- affinity_sdk-0.8.5/mcp/prompts/change-status/change-status.txt +13 -0
- affinity_sdk-0.8.5/mcp/prompts/interaction-brief/interaction-brief.meta.json +19 -0
- affinity_sdk-0.8.5/mcp/prompts/interaction-brief/interaction-brief.txt +13 -0
- affinity_sdk-0.8.5/mcp/prompts/log-call/log-call.meta.json +32 -0
- affinity_sdk-0.8.5/mcp/prompts/log-call/log-call.txt +16 -0
- affinity_sdk-0.8.5/mcp/prompts/log-interaction-and-update-workflow/log-interaction-and-update-workflow.meta.json +27 -0
- affinity_sdk-0.8.5/mcp/prompts/log-interaction-and-update-workflow/log-interaction-and-update-workflow.txt +16 -0
- affinity_sdk-0.8.5/mcp/prompts/log-message/log-message.meta.json +33 -0
- affinity_sdk-0.8.5/mcp/prompts/log-message/log-message.txt +16 -0
- affinity_sdk-0.8.5/mcp/prompts/pipeline-review/pipeline-review.meta.json +14 -0
- affinity_sdk-0.8.5/mcp/prompts/pipeline-review/pipeline-review.txt +17 -0
- affinity_sdk-0.8.5/mcp/prompts/prepare-briefing/prepare-briefing.meta.json +19 -0
- affinity_sdk-0.8.5/mcp/prompts/prepare-briefing/prepare-briefing.txt +16 -0
- affinity_sdk-0.8.5/mcp/prompts/warm-intro/warm-intro.meta.json +18 -0
- affinity_sdk-0.8.5/mcp/prompts/warm-intro/warm-intro.txt +17 -0
- affinity_sdk-0.8.5/mcp/providers/xaffinity.sh +107 -0
- affinity_sdk-0.8.5/mcp/resources/data-model/data-model.md +178 -0
- affinity_sdk-0.8.5/mcp/resources/data-model/data-model.meta.json +7 -0
- affinity_sdk-0.8.5/mcp/resources/field-catalogs/field-catalogs.meta.json +7 -0
- affinity_sdk-0.8.5/mcp/resources/field-catalogs/field-catalogs.sh +76 -0
- affinity_sdk-0.8.5/mcp/resources/interaction-enums/interaction-enums.json +13 -0
- affinity_sdk-0.8.5/mcp/resources/interaction-enums/interaction-enums.meta.json +7 -0
- affinity_sdk-0.8.5/mcp/resources/me/me.meta.json +7 -0
- affinity_sdk-0.8.5/mcp/resources/me/me.sh +16 -0
- affinity_sdk-0.8.5/mcp/resources/me-person-id/me-person-id.meta.json +7 -0
- affinity_sdk-0.8.5/mcp/resources/me-person-id/me-person-id.sh +29 -0
- affinity_sdk-0.8.5/mcp/resources/saved-views/saved-views.meta.json +7 -0
- affinity_sdk-0.8.5/mcp/resources/saved-views/saved-views.sh +28 -0
- affinity_sdk-0.8.5/mcp/resources/workflow-config/workflow-config.meta.json +7 -0
- affinity_sdk-0.8.5/mcp/resources/workflow-config/workflow-config.sh +47 -0
- affinity_sdk-0.8.5/mcp/scripts/install-framework.sh +80 -0
- affinity_sdk-0.8.5/mcp/server.d/env.sh +71 -0
- affinity_sdk-0.8.5/mcp/server.d/health-checks.sh +32 -0
- affinity_sdk-0.8.5/mcp/server.d/policy.sh +32 -0
- affinity_sdk-0.8.5/mcp/server.d/requirements.json +29 -0
- affinity_sdk-0.8.5/mcp/server.d/server.meta.json +6 -0
- affinity_sdk-0.8.5/mcp/test/README.md +136 -0
- affinity_sdk-0.8.5/mcp/test/run.sh +390 -0
- affinity_sdk-0.8.5/mcp/test-progress.sh +254 -0
- affinity_sdk-0.8.5/mcp/tools/discover-commands/tool.meta.json +46 -0
- affinity_sdk-0.8.5/mcp/tools/discover-commands/tool.sh +152 -0
- affinity_sdk-0.8.5/mcp/tools/execute-read-command/tool.meta.json +36 -0
- affinity_sdk-0.8.5/mcp/tools/execute-read-command/tool.sh +156 -0
- affinity_sdk-0.8.5/mcp/tools/execute-write-command/tool.meta.json +36 -0
- affinity_sdk-0.8.5/mcp/tools/execute-write-command/tool.sh +207 -0
- affinity_sdk-0.8.5/mcp/tools/get-entity-dossier/tool.meta.json +46 -0
- affinity_sdk-0.8.5/mcp/tools/get-entity-dossier/tool.sh +131 -0
- affinity_sdk-0.8.5/mcp/tools/read-xaffinity-resource/tool.meta.json +19 -0
- affinity_sdk-0.8.5/mcp/tools/read-xaffinity-resource/tool.sh +23 -0
- affinity_sdk-0.8.5/mcp/xaffinity-mcp-env.sh +37 -0
- affinity_sdk-0.8.5/mcp/xaffinity-mcp.sh +178 -0
- affinity_sdk-0.8.5/mkdocs.yml +89 -0
- affinity_sdk-0.8.5/plugins/affinity-sdk/.claude-plugin/plugin.json +22 -0
- affinity_sdk-0.8.5/plugins/affinity-sdk/.claude-plugin/skills/affinity-python-sdk/SKILL.md +288 -0
- affinity_sdk-0.8.5/plugins/xaffinity-cli/.claude-plugin/commands/affinity-help.md +56 -0
- affinity_sdk-0.8.5/plugins/xaffinity-cli/.claude-plugin/hooks/hooks.json +17 -0
- affinity_sdk-0.8.5/plugins/xaffinity-cli/.claude-plugin/hooks/pre-xaffinity.sh +36 -0
- affinity_sdk-0.8.5/plugins/xaffinity-cli/.claude-plugin/plugin.json +28 -0
- affinity_sdk-0.8.5/plugins/xaffinity-cli/.claude-plugin/skills/xaffinity-cli-usage/SKILL.md +193 -0
- affinity_sdk-0.8.5/pyproject.toml +185 -0
- affinity_sdk-0.8.5/tests/conftest.py +180 -0
- affinity_sdk-0.8.5/tests/fixtures/webhooks/field_value_updated.json +26 -0
- affinity_sdk-0.8.5/tests/fixtures/webhooks/list_entry_created.json +20 -0
- affinity_sdk-0.8.5/tests/fixtures/webhooks/organization_created.json +12 -0
- affinity_sdk-0.8.5/tests/fixtures/webhooks/organization_merged.json +31 -0
- affinity_sdk-0.8.5/tests/fixtures/webhooks/person_created.json +13 -0
- affinity_sdk-0.8.5/tests/fixtures/webhooks/unknown_event.json +7 -0
- affinity_sdk-0.8.5/tests/test_affinity_client_wrapper_additional_coverage.py +194 -0
- affinity_sdk-0.8.5/tests/test_async_file_download_streaming.py +159 -0
- affinity_sdk-0.8.5/tests/test_cli_column_limiting.py +199 -0
- affinity_sdk-0.8.5/tests/test_cli_command_context.py +257 -0
- affinity_sdk-0.8.5/tests/test_cli_company_cmds_coverage.py +278 -0
- affinity_sdk-0.8.5/tests/test_cli_company_get.py +625 -0
- affinity_sdk-0.8.5/tests/test_cli_config_cmds.py +434 -0
- affinity_sdk-0.8.5/tests/test_cli_csv_export.py +1012 -0
- affinity_sdk-0.8.5/tests/test_cli_date_params.py +154 -0
- affinity_sdk-0.8.5/tests/test_cli_date_utils.py +82 -0
- affinity_sdk-0.8.5/tests/test_cli_datetime_formatting.py +40 -0
- affinity_sdk-0.8.5/tests/test_cli_datetime_header_offsets.py +50 -0
- affinity_sdk-0.8.5/tests/test_cli_domain_linkification.py +24 -0
- affinity_sdk-0.8.5/tests/test_cli_entity_files_dump.py +128 -0
- affinity_sdk-0.8.5/tests/test_cli_entry_field.py +1317 -0
- affinity_sdk-0.8.5/tests/test_cli_error_rendering.py +123 -0
- affinity_sdk-0.8.5/tests/test_cli_field_history.py +202 -0
- affinity_sdk-0.8.5/tests/test_cli_field_value_humanization.py +110 -0
- affinity_sdk-0.8.5/tests/test_cli_interaction_date_chunking.py +1046 -0
- affinity_sdk-0.8.5/tests/test_cli_json_safety.py +288 -0
- affinity_sdk-0.8.5/tests/test_cli_list_cmds_coverage.py +519 -0
- affinity_sdk-0.8.5/tests/test_cli_missing_coverage.py +324 -0
- affinity_sdk-0.8.5/tests/test_cli_no_network_commands.py +126 -0
- affinity_sdk-0.8.5/tests/test_cli_opportunity_cmds.py +391 -0
- affinity_sdk-0.8.5/tests/test_cli_opportunity_cmds_coverage.py +155 -0
- affinity_sdk-0.8.5/tests/test_cli_pager_logic.py +55 -0
- affinity_sdk-0.8.5/tests/test_cli_person_cmds_coverage.py +348 -0
- affinity_sdk-0.8.5/tests/test_cli_person_get.py +114 -0
- affinity_sdk-0.8.5/tests/test_cli_progress_manager.py +164 -0
- affinity_sdk-0.8.5/tests/test_cli_rate_limit_rendering.py +38 -0
- affinity_sdk-0.8.5/tests/test_cli_resolve_url_parsing.py +30 -0
- affinity_sdk-0.8.5/tests/test_cli_serialization.py +174 -0
- affinity_sdk-0.8.5/tests/test_cli_session_cache.py +389 -0
- affinity_sdk-0.8.5/tests/test_cli_types.py +152 -0
- affinity_sdk-0.8.5/tests/test_cli_v1_only_cmds.py +374 -0
- affinity_sdk-0.8.5/tests/test_cli_write_ops.py +418 -0
- affinity_sdk-0.8.5/tests/test_client.py +1283 -0
- affinity_sdk-0.8.5/tests/test_env_helpers.py +68 -0
- affinity_sdk-0.8.5/tests/test_exceptions_coverage.py +341 -0
- affinity_sdk-0.8.5/tests/test_field_value_type.py +77 -0
- affinity_sdk-0.8.5/tests/test_file_download_streaming.py +338 -0
- affinity_sdk-0.8.5/tests/test_file_upload_helpers_and_validation.py +91 -0
- affinity_sdk-0.8.5/tests/test_filters.py +390 -0
- affinity_sdk-0.8.5/tests/test_hooks.py +404 -0
- affinity_sdk-0.8.5/tests/test_http_client_additional_coverage.py +424 -0
- affinity_sdk-0.8.5/tests/test_http_client_remaining_coverage.py +1210 -0
- affinity_sdk-0.8.5/tests/test_inbound_webhooks.py +144 -0
- affinity_sdk-0.8.5/tests/test_integration_smoke.py +36 -0
- affinity_sdk-0.8.5/tests/test_interactions_and_files_regressions.py +196 -0
- affinity_sdk-0.8.5/tests/test_isodatetime.py +433 -0
- affinity_sdk-0.8.5/tests/test_list_entry_membership_and_opportunities.py +209 -0
- affinity_sdk-0.8.5/tests/test_models.py +860 -0
- affinity_sdk-0.8.5/tests/test_new_features.py +712 -0
- affinity_sdk-0.8.5/tests/test_pagination_iterators.py +486 -0
- affinity_sdk-0.8.5/tests/test_public_api.py +215 -0
- affinity_sdk-0.8.5/tests/test_raw_pipeline_hook_events.py +359 -0
- affinity_sdk-0.8.5/tests/test_requirements_additional.py +211 -0
- affinity_sdk-0.8.5/tests/test_services_companies_coverage_gaps.py +460 -0
- affinity_sdk-0.8.5/tests/test_services_lists_additional_coverage.py +987 -0
- affinity_sdk-0.8.5/tests/test_services_lists_coverage_gaps.py +402 -0
- affinity_sdk-0.8.5/tests/test_services_opportunities_additional_coverage.py +747 -0
- affinity_sdk-0.8.5/tests/test_services_opportunities_coverage_gaps.py +339 -0
- affinity_sdk-0.8.5/tests/test_services_opportunities_tasks_additional_coverage.py +386 -0
- affinity_sdk-0.8.5/tests/test_services_persons_companies_additional_coverage.py +1933 -0
- affinity_sdk-0.8.5/tests/test_services_rate_limits_coverage_gaps.py +287 -0
- affinity_sdk-0.8.5/tests/test_services_v1_only_async.py +458 -0
- affinity_sdk-0.8.5/tests/test_services_v1_only_coverage_gaps.py +336 -0
- affinity_sdk-0.8.5/tests/test_small_modules_coverage.py +176 -0
- affinity_sdk-0.8.5/tests/test_transport_and_readonly_mode.py +109 -0
- affinity_sdk-0.8.5/tests/test_v1_only_services_additional_coverage.py +1308 -0
- affinity_sdk-0.8.5/tests/test_v1_only_services_more_coverage.py +602 -0
- affinity_sdk-0.8.5/tools/check_cli_patterns.py +118 -0
- affinity_sdk-0.8.5/tools/generate_cli_commands_registry.py +200 -0
- affinity_sdk-0.8.5/tools/generate_requirements_mapping.py +140 -0
- affinity_sdk-0.8.5/tools/sync_mcp_registry.py +136 -0
- affinity_sdk-0.8.5/tools/sync_plugin_version.py +69 -0
- affinity_sdk-0.8.5/tools/validate_openapi_models.py +436 -0
- affinity_sdk-0.8.5/uv.lock +1485 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xaffinity",
|
|
3
|
+
"owner": {
|
|
4
|
+
"name": "Yaniv Golan"
|
|
5
|
+
},
|
|
6
|
+
"metadata": {
|
|
7
|
+
"description": "Plugins for Affinity CRM - Python SDK, CLI, and MCP integrations"
|
|
8
|
+
},
|
|
9
|
+
"plugins": [
|
|
10
|
+
{
|
|
11
|
+
"name": "sdk",
|
|
12
|
+
"source": "./plugins/affinity-sdk/.claude-plugin",
|
|
13
|
+
"description": "Python SDK for Affinity CRM - typed IDs, async support, pagination patterns for developers"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "cli",
|
|
17
|
+
"source": "./plugins/xaffinity-cli/.claude-plugin",
|
|
18
|
+
"description": "Command-line interface for Affinity CRM - search, export, filter CRM data via xaffinity commands"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"name": "mcp",
|
|
22
|
+
"source": "./mcp/.claude-plugin",
|
|
23
|
+
"description": "MCP server for Affinity CRM - workflow tools, relationship intelligence, pipeline management"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
root = true
|
|
2
|
+
|
|
3
|
+
[*]
|
|
4
|
+
charset = utf-8
|
|
5
|
+
end_of_line = lf
|
|
6
|
+
insert_final_newline = true
|
|
7
|
+
trim_trailing_whitespace = true
|
|
8
|
+
|
|
9
|
+
[*.py]
|
|
10
|
+
indent_style = space
|
|
11
|
+
indent_size = 4
|
|
12
|
+
max_line_length = 100
|
|
13
|
+
|
|
14
|
+
[*.{yml,yaml}]
|
|
15
|
+
indent_style = space
|
|
16
|
+
indent_size = 2
|
|
17
|
+
|
|
18
|
+
[*.md]
|
|
19
|
+
trim_trailing_whitespace = false
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Default owners for the entire repository.
|
|
2
|
+
* @yaniv-golan
|
|
3
|
+
|
|
4
|
+
# CLI Commands require extra attention to serialization patterns
|
|
5
|
+
# See docs/cli-development-guide.md for review guidelines
|
|
6
|
+
/affinity/cli/commands/ @yaniv-golan
|
|
7
|
+
/affinity/cli/serialization.py @yaniv-golan
|
|
8
|
+
/affinity/cli/resolvers.py @yaniv-golan
|
|
9
|
+
/affinity/cli/types.py @yaniv-golan
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Bug report
|
|
2
|
+
description: Report a problem with the SDK
|
|
3
|
+
labels: [bug]
|
|
4
|
+
body:
|
|
5
|
+
- type: markdown
|
|
6
|
+
attributes:
|
|
7
|
+
value: |
|
|
8
|
+
Thanks for taking the time to report an issue.
|
|
9
|
+
|
|
10
|
+
- type: textarea
|
|
11
|
+
id: what-happened
|
|
12
|
+
attributes:
|
|
13
|
+
label: What happened?
|
|
14
|
+
description: What did you expect to happen, and what happened instead?
|
|
15
|
+
validations:
|
|
16
|
+
required: true
|
|
17
|
+
|
|
18
|
+
- type: textarea
|
|
19
|
+
id: reproduction
|
|
20
|
+
attributes:
|
|
21
|
+
label: Reproduction steps
|
|
22
|
+
description: Minimal steps/code to reproduce the issue.
|
|
23
|
+
render: python
|
|
24
|
+
validations:
|
|
25
|
+
required: true
|
|
26
|
+
|
|
27
|
+
- type: input
|
|
28
|
+
id: version
|
|
29
|
+
attributes:
|
|
30
|
+
label: affinity-sdk version
|
|
31
|
+
placeholder: e.g. 0.1.0
|
|
32
|
+
validations:
|
|
33
|
+
required: false
|
|
34
|
+
|
|
35
|
+
- type: textarea
|
|
36
|
+
id: environment
|
|
37
|
+
attributes:
|
|
38
|
+
label: Environment
|
|
39
|
+
description: OS, Python version, etc.
|
|
40
|
+
placeholder: |
|
|
41
|
+
- OS:
|
|
42
|
+
- Python:
|
|
43
|
+
validations:
|
|
44
|
+
required: false
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
name: Feature request
|
|
2
|
+
description: Suggest an idea or enhancement
|
|
3
|
+
labels: [enhancement]
|
|
4
|
+
body:
|
|
5
|
+
- type: textarea
|
|
6
|
+
id: problem
|
|
7
|
+
attributes:
|
|
8
|
+
label: Problem / use case
|
|
9
|
+
description: What are you trying to accomplish?
|
|
10
|
+
validations:
|
|
11
|
+
required: true
|
|
12
|
+
|
|
13
|
+
- type: textarea
|
|
14
|
+
id: proposal
|
|
15
|
+
attributes:
|
|
16
|
+
label: Proposed solution
|
|
17
|
+
description: What would you like to see added/changed?
|
|
18
|
+
validations:
|
|
19
|
+
required: true
|
|
20
|
+
|
|
21
|
+
- type: textarea
|
|
22
|
+
id: alternatives
|
|
23
|
+
attributes:
|
|
24
|
+
label: Alternatives considered
|
|
25
|
+
description: Any other approaches you've tried or considered.
|
|
26
|
+
validations:
|
|
27
|
+
required: false
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
## CLI Command PR Checklist
|
|
2
|
+
|
|
3
|
+
**Type of Change**:
|
|
4
|
+
- [ ] New CLI command
|
|
5
|
+
- [ ] CLI command modification
|
|
6
|
+
- [ ] CLI infrastructure change
|
|
7
|
+
|
|
8
|
+
### Code Quality
|
|
9
|
+
|
|
10
|
+
- [ ] Uses `serialize_model_for_cli()` for all model serialization
|
|
11
|
+
- [ ] No direct `model_dump()` calls (or documented exception with TODO comment)
|
|
12
|
+
- [ ] Pagination key matches data key (if applicable)
|
|
13
|
+
- [ ] Resolved metadata follows standard structure (if applicable)
|
|
14
|
+
- [ ] Similar commands updated if pattern changed
|
|
15
|
+
|
|
16
|
+
### Testing
|
|
17
|
+
|
|
18
|
+
- [ ] Integration test includes `--json` flag
|
|
19
|
+
- [ ] JSON output verified to parse correctly
|
|
20
|
+
- [ ] All tests passing (505+ tests)
|
|
21
|
+
- [ ] Cross-command consistency tested (if CRUD operation)
|
|
22
|
+
|
|
23
|
+
### Documentation
|
|
24
|
+
|
|
25
|
+
- [ ] Help text (`--help`) updated with clear examples
|
|
26
|
+
- [ ] Docstring includes:
|
|
27
|
+
- [ ] Description of what the command does
|
|
28
|
+
- [ ] Explanation of selector formats (if applicable)
|
|
29
|
+
- [ ] JSON output behavior documentation (if applicable)
|
|
30
|
+
- [ ] At least 3 usage examples
|
|
31
|
+
- [ ] Special JSON behavior documented (if any)
|
|
32
|
+
- [ ] CLI reference documentation updated (if user-facing change)
|
|
33
|
+
|
|
34
|
+
### Pre-Commit Hooks
|
|
35
|
+
|
|
36
|
+
- [ ] All pre-commit hooks passing (ruff, mypy, check-cli-patterns)
|
|
37
|
+
- [ ] If bypassing `check-cli-patterns`, justification documented with TODO comment
|
|
38
|
+
|
|
39
|
+
### Related Issues
|
|
40
|
+
|
|
41
|
+
Closes #
|
|
42
|
+
|
|
43
|
+
### Description
|
|
44
|
+
|
|
45
|
+
<!-- Provide a brief description of what this PR does -->
|
|
46
|
+
|
|
47
|
+
### Command Examples
|
|
48
|
+
|
|
49
|
+
<!-- If applicable, add command output examples showing both table and JSON output -->
|
|
50
|
+
|
|
51
|
+
**Table output:**
|
|
52
|
+
```bash
|
|
53
|
+
$ affinity my-command 12345
|
|
54
|
+
# Output here
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**JSON output:**
|
|
58
|
+
```bash
|
|
59
|
+
$ affinity my-command 12345 --json
|
|
60
|
+
{
|
|
61
|
+
"ok": true,
|
|
62
|
+
"command": "my-command",
|
|
63
|
+
"data": {
|
|
64
|
+
...
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Breaking Changes
|
|
70
|
+
|
|
71
|
+
<!-- List any breaking changes, or write "None" -->
|
|
72
|
+
|
|
73
|
+
### Reviewer Notes
|
|
74
|
+
|
|
75
|
+
<!-- Any special considerations for reviewers? -->
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## For Reviewers
|
|
80
|
+
|
|
81
|
+
When reviewing CLI command PRs, verify:
|
|
82
|
+
|
|
83
|
+
1. **Serialization Pattern**: All models use `serialize_model_for_cli()` or have documented exceptions
|
|
84
|
+
2. **JSON Safety**: Test with `--json` flag to ensure output parses correctly
|
|
85
|
+
3. **Documentation**: Help text is clear and includes good examples
|
|
86
|
+
4. **Consistency**: Similar commands follow the same patterns
|
|
87
|
+
5. **Testing**: Adequate test coverage, especially for JSON output
|
|
88
|
+
|
|
89
|
+
See [CLI Development Guide](../../docs/cli-development-guide.md) for detailed patterns and best practices.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Release
|
|
3
|
+
about: Checklist for SDK or MCP releases
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Release Type
|
|
7
|
+
|
|
8
|
+
- [ ] SDK Release (vX.Y.Z)
|
|
9
|
+
- [ ] MCP Release (plugin-vX.Y.Z)
|
|
10
|
+
|
|
11
|
+
## SDK Release Checklist (vX.Y.Z)
|
|
12
|
+
|
|
13
|
+
- [ ] Version bumped in `pyproject.toml`
|
|
14
|
+
- [ ] Plugin versions synced (pre-commit should handle)
|
|
15
|
+
- [ ] `CHANGELOG.md` updated with breaking changes noted
|
|
16
|
+
- [ ] If CLI output format changed: MCP `COMPATIBILITY` updated
|
|
17
|
+
- [ ] Tests pass locally and in CI
|
|
18
|
+
|
|
19
|
+
## MCP Release Checklist (plugin-vX.Y.Z)
|
|
20
|
+
|
|
21
|
+
- [ ] Version bumped in `mcp/VERSION`
|
|
22
|
+
- [ ] `mcp/.claude-plugin/plugin.json` version updated
|
|
23
|
+
- [ ] `mcp/mcpb.conf` MCPB_VERSION updated
|
|
24
|
+
- [ ] `mcp/COMPATIBILITY` CLI requirements updated if needed
|
|
25
|
+
- [ ] `mcp/CHANGELOG.md` documents CLI compatibility
|
|
26
|
+
- [ ] Builds successfully: `cd mcp && make all verify`
|
|
27
|
+
|
|
28
|
+
## Post-Merge
|
|
29
|
+
|
|
30
|
+
- [ ] Tag pushed: `git tag vX.Y.Z && git push --tags` (SDK)
|
|
31
|
+
- [ ] Tag pushed: `git tag plugin-vX.Y.Z && git push --tags` (MCP)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
- name: bug
|
|
2
|
+
color: d73a4a
|
|
3
|
+
description: Something isn't working
|
|
4
|
+
|
|
5
|
+
- name: enhancement
|
|
6
|
+
color: a2eeef
|
|
7
|
+
description: New feature or improvement
|
|
8
|
+
|
|
9
|
+
- name: documentation
|
|
10
|
+
color: 0075ca
|
|
11
|
+
description: Documentation-only changes
|
|
12
|
+
|
|
13
|
+
- name: dependencies
|
|
14
|
+
color: 0366d6
|
|
15
|
+
description: Dependency updates
|
|
16
|
+
|
|
17
|
+
- name: security
|
|
18
|
+
color: b60205
|
|
19
|
+
description: Security-related changes
|
|
20
|
+
|
|
21
|
+
- name: breaking-change
|
|
22
|
+
color: b60205
|
|
23
|
+
description: Backwards-incompatible change
|
|
24
|
+
|
|
25
|
+
- name: needs-triage
|
|
26
|
+
color: fbca04
|
|
27
|
+
description: Needs initial review and categorization
|
|
28
|
+
|
|
29
|
+
- name: question
|
|
30
|
+
color: d876e3
|
|
31
|
+
description: Question or support request
|
|
32
|
+
|
|
33
|
+
- name: good first issue
|
|
34
|
+
color: 7057ff
|
|
35
|
+
description: Good for newcomers
|
|
36
|
+
|
|
37
|
+
- name: help wanted
|
|
38
|
+
color: 008672
|
|
39
|
+
description: Extra attention is needed
|
|
40
|
+
|
|
41
|
+
- name: tests
|
|
42
|
+
color: cfd3d7
|
|
43
|
+
description: Tests or test infrastructure
|
|
44
|
+
|
|
45
|
+
- name: ci
|
|
46
|
+
color: cfd3d7
|
|
47
|
+
description: CI/workflows
|
|
48
|
+
|
|
49
|
+
- name: release
|
|
50
|
+
color: 0e8a16
|
|
51
|
+
description: Release process and packaging
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
mcp-plugin:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
steps:
|
|
11
|
+
- uses: actions/checkout@v6
|
|
12
|
+
|
|
13
|
+
- name: Build MCP plugin
|
|
14
|
+
run: make -C mcp plugin
|
|
15
|
+
|
|
16
|
+
- name: Verify plugin structure
|
|
17
|
+
run: |
|
|
18
|
+
# Ensure critical files exist after build (ZIP-based distribution)
|
|
19
|
+
make -C mcp verify
|
|
20
|
+
test -f mcp/.claude-plugin/xaffinity-mcp.sh
|
|
21
|
+
test -f mcp/.claude-plugin/plugin.json
|
|
22
|
+
test -f mcp/.claude-plugin/xaffinity-mcp-plugin.zip
|
|
23
|
+
test -f mcp/.claude-plugin/VERSION
|
|
24
|
+
echo "Plugin structure validated successfully"
|
|
25
|
+
|
|
26
|
+
- name: Test ZIP extraction
|
|
27
|
+
run: |
|
|
28
|
+
cd mcp/.claude-plugin
|
|
29
|
+
mkdir -p .mcp-extracted
|
|
30
|
+
unzip -q xaffinity-mcp-plugin.zip -d .mcp-extracted
|
|
31
|
+
test -x .mcp-extracted/xaffinity-mcp.sh
|
|
32
|
+
test -d .mcp-extracted/tools
|
|
33
|
+
test -d .mcp-extracted/prompts
|
|
34
|
+
echo "ZIP extraction test passed"
|
|
35
|
+
|
|
36
|
+
test:
|
|
37
|
+
runs-on: ubuntu-latest
|
|
38
|
+
strategy:
|
|
39
|
+
fail-fast: false
|
|
40
|
+
matrix:
|
|
41
|
+
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
42
|
+
|
|
43
|
+
steps:
|
|
44
|
+
- uses: actions/checkout@v6
|
|
45
|
+
|
|
46
|
+
- name: Set up Python
|
|
47
|
+
uses: actions/setup-python@v6
|
|
48
|
+
with:
|
|
49
|
+
python-version: ${{ matrix.python-version }}
|
|
50
|
+
cache: pip
|
|
51
|
+
cache-dependency-path: pyproject.toml
|
|
52
|
+
|
|
53
|
+
- name: Install
|
|
54
|
+
run: |
|
|
55
|
+
python -m pip install --upgrade pip
|
|
56
|
+
python -m pip install -e ".[dev]"
|
|
57
|
+
|
|
58
|
+
- name: Lint
|
|
59
|
+
run: |
|
|
60
|
+
ruff format --check .
|
|
61
|
+
ruff check .
|
|
62
|
+
|
|
63
|
+
- name: Type check
|
|
64
|
+
run: |
|
|
65
|
+
mypy affinity
|
|
66
|
+
|
|
67
|
+
- name: Test
|
|
68
|
+
run: |
|
|
69
|
+
pytest --cov=affinity --cov-report=term-missing --cov-report=xml
|
|
70
|
+
|
|
71
|
+
- name: Upload coverage to Codecov
|
|
72
|
+
uses: codecov/codecov-action@v5
|
|
73
|
+
with:
|
|
74
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
75
|
+
files: ./coverage.xml
|
|
76
|
+
fail_ci_if_error: false
|
|
77
|
+
|
|
78
|
+
- name: Traceability mapping is up to date
|
|
79
|
+
run: |
|
|
80
|
+
if [ -d docs/internal ]; then
|
|
81
|
+
python tools/generate_requirements_mapping.py
|
|
82
|
+
git diff --exit-code docs/internal/requirements_to_tests_mapping.md
|
|
83
|
+
else
|
|
84
|
+
echo "Skipping traceability mapping (docs/internal not present in repo checkout)."
|
|
85
|
+
fi
|
|
86
|
+
|
|
87
|
+
- name: CLI commands registry is valid
|
|
88
|
+
run: |
|
|
89
|
+
# Verify registry file exists and is valid JSON with expected structure
|
|
90
|
+
python -c "
|
|
91
|
+
import json
|
|
92
|
+
import sys
|
|
93
|
+
with open('mcp/.registry/commands.json') as f:
|
|
94
|
+
data = json.load(f)
|
|
95
|
+
assert 'commands' in data, 'Missing commands key'
|
|
96
|
+
assert isinstance(data['commands'], list), 'commands must be a list'
|
|
97
|
+
assert len(data['commands']) > 0, 'commands list is empty'
|
|
98
|
+
for cmd in data['commands']:
|
|
99
|
+
assert 'name' in cmd, f'Command missing name: {cmd}'
|
|
100
|
+
assert 'category' in cmd, f'Command {cmd[\"name\"]} missing category'
|
|
101
|
+
assert cmd['category'] in ('read', 'write', 'local'), f'Invalid category for {cmd[\"name\"]}'
|
|
102
|
+
print(f'Registry valid: {len(data[\"commands\"])} commands')
|
|
103
|
+
"
|
|
104
|
+
# Regenerate registry and verify it matches committed version
|
|
105
|
+
python tools/generate_cli_commands_registry.py
|
|
106
|
+
git diff --exit-code mcp/.registry/commands.json
|
|
107
|
+
|
|
108
|
+
test-timezone:
|
|
109
|
+
runs-on: ubuntu-latest
|
|
110
|
+
strategy:
|
|
111
|
+
fail-fast: false
|
|
112
|
+
matrix:
|
|
113
|
+
tz: ["UTC", "America/New_York", "Europe/London", "Asia/Tokyo"]
|
|
114
|
+
|
|
115
|
+
steps:
|
|
116
|
+
- uses: actions/checkout@v6
|
|
117
|
+
|
|
118
|
+
- name: Set up Python
|
|
119
|
+
uses: actions/setup-python@v6
|
|
120
|
+
with:
|
|
121
|
+
python-version: "3.12"
|
|
122
|
+
cache: pip
|
|
123
|
+
cache-dependency-path: pyproject.toml
|
|
124
|
+
|
|
125
|
+
- name: Install
|
|
126
|
+
run: |
|
|
127
|
+
python -m pip install --upgrade pip
|
|
128
|
+
python -m pip install -e ".[dev]"
|
|
129
|
+
|
|
130
|
+
- name: Test with TZ=${{ matrix.tz }}
|
|
131
|
+
env:
|
|
132
|
+
TZ: ${{ matrix.tz }}
|
|
133
|
+
run: |
|
|
134
|
+
pytest tests/test_isodatetime.py -v
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
name: Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
push:
|
|
6
|
+
branches: ["main"]
|
|
7
|
+
tags: ["v*.*.*"]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
|
|
20
|
+
- name: Set up Python
|
|
21
|
+
uses: actions/setup-python@v6
|
|
22
|
+
with:
|
|
23
|
+
python-version: "3.12"
|
|
24
|
+
cache: pip
|
|
25
|
+
cache-dependency-path: pyproject.toml
|
|
26
|
+
|
|
27
|
+
- name: Install
|
|
28
|
+
run: |
|
|
29
|
+
python -m pip install --upgrade pip
|
|
30
|
+
python -m pip install -e ".[docs]"
|
|
31
|
+
|
|
32
|
+
- name: Smoke import
|
|
33
|
+
run: |
|
|
34
|
+
python -c "import affinity; print(affinity.__version__)"
|
|
35
|
+
|
|
36
|
+
- name: Build
|
|
37
|
+
run: |
|
|
38
|
+
mkdocs build -s
|
|
39
|
+
|
|
40
|
+
- name: Check internal links
|
|
41
|
+
uses: lycheeverse/lychee-action@v2
|
|
42
|
+
with:
|
|
43
|
+
args: >-
|
|
44
|
+
--no-progress
|
|
45
|
+
--exclude '^https?://'
|
|
46
|
+
--exclude '^mailto:'
|
|
47
|
+
site/
|
|
48
|
+
|
|
49
|
+
deploy:
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
needs: build
|
|
52
|
+
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
|
|
53
|
+
permissions:
|
|
54
|
+
contents: write
|
|
55
|
+
concurrency:
|
|
56
|
+
group: docs-deploy
|
|
57
|
+
cancel-in-progress: false
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v6
|
|
60
|
+
with:
|
|
61
|
+
fetch-depth: 0
|
|
62
|
+
|
|
63
|
+
- name: Set up Python
|
|
64
|
+
uses: actions/setup-python@v6
|
|
65
|
+
with:
|
|
66
|
+
python-version: "3.12"
|
|
67
|
+
cache: pip
|
|
68
|
+
cache-dependency-path: pyproject.toml
|
|
69
|
+
|
|
70
|
+
- name: Install
|
|
71
|
+
run: |
|
|
72
|
+
python -m pip install --upgrade pip
|
|
73
|
+
python -m pip install -e ".[docs]"
|
|
74
|
+
|
|
75
|
+
- name: Smoke import
|
|
76
|
+
run: |
|
|
77
|
+
python -c "import affinity; print(affinity.__version__)"
|
|
78
|
+
|
|
79
|
+
- name: Configure git
|
|
80
|
+
run: |
|
|
81
|
+
git config user.name "github-actions[bot]"
|
|
82
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
83
|
+
|
|
84
|
+
- name: Fetch gh-pages branch
|
|
85
|
+
run: |
|
|
86
|
+
git fetch origin gh-pages:gh-pages || true
|
|
87
|
+
|
|
88
|
+
- name: Deploy (dev)
|
|
89
|
+
if: github.ref == 'refs/heads/main'
|
|
90
|
+
run: |
|
|
91
|
+
mike deploy --push dev
|
|
92
|
+
if ! mike list | awk '{print $1}' | grep -Fxq latest; then
|
|
93
|
+
mike set-default --push dev
|
|
94
|
+
fi
|
|
95
|
+
|
|
96
|
+
- name: Deploy (release)
|
|
97
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
98
|
+
run: |
|
|
99
|
+
VERSION="${GITHUB_REF_NAME#v}"
|
|
100
|
+
mike deploy --push --update-aliases "${VERSION}" latest
|
|
101
|
+
mike set-default --push latest
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: Label sync
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
paths:
|
|
8
|
+
- .github/labels.yml
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
issues: write
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
sync:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v6
|
|
19
|
+
- name: Sync labels
|
|
20
|
+
uses: EndBug/label-sync@v2
|
|
21
|
+
with:
|
|
22
|
+
config-file: .github/labels.yml
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Link Check (External)
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: "0 7 * * 1" # Mondays at 07:00 UTC
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
linkcheck:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
timeout-minutes: 10
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
|
|
18
|
+
- name: Set up Python
|
|
19
|
+
uses: actions/setup-python@v6
|
|
20
|
+
with:
|
|
21
|
+
python-version: "3.12"
|
|
22
|
+
cache: pip
|
|
23
|
+
cache-dependency-path: pyproject.toml
|
|
24
|
+
|
|
25
|
+
- name: Install
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
python -m pip install -e ".[docs]"
|
|
29
|
+
|
|
30
|
+
- name: Build
|
|
31
|
+
run: |
|
|
32
|
+
mkdocs build -s
|
|
33
|
+
|
|
34
|
+
- name: Check links (including external)
|
|
35
|
+
uses: lycheeverse/lychee-action@v2
|
|
36
|
+
with:
|
|
37
|
+
args: >-
|
|
38
|
+
--no-progress
|
|
39
|
+
--max-concurrency 8
|
|
40
|
+
--max-retries 2
|
|
41
|
+
--retry-wait-time 2
|
|
42
|
+
--timeout 20
|
|
43
|
+
--exclude '^mailto:'
|
|
44
|
+
site/
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: OpenAPI Validation
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
schedule:
|
|
6
|
+
- cron: "0 7 * * 1" # Mondays at 07:00 UTC
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
validate:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
timeout-minutes: 10
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v6
|
|
15
|
+
|
|
16
|
+
- name: Set up Python
|
|
17
|
+
uses: actions/setup-python@v6
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.12"
|
|
20
|
+
cache: pip
|
|
21
|
+
cache-dependency-path: pyproject.toml
|
|
22
|
+
|
|
23
|
+
- name: Install
|
|
24
|
+
run: |
|
|
25
|
+
python -m pip install --upgrade pip
|
|
26
|
+
python -m pip install -e ".[dev]"
|
|
27
|
+
|
|
28
|
+
- name: Validate OpenAPI alignment
|
|
29
|
+
run: |
|
|
30
|
+
python tools/validate_openapi_models.py
|