simcord 3.0.2__tar.gz → 3.1.0__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.
- {simcord-3.0.2 → simcord-3.1.0}/CHANGELOG.md +12 -1
- {simcord-3.0.2 → simcord-3.1.0}/PKG-INFO +1 -1
- {simcord-3.0.2 → simcord-3.1.0}/docs/api.md +11 -1
- {simcord-3.0.2 → simcord-3.1.0}/docs/concepts.md +17 -1
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/intents.md +2 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/interactions.md +40 -9
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/messages.md +36 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/parity-matrix.md +2 -1
- {simcord-3.0.2 → simcord-3.1.0}/pyproject.toml +1 -1
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/_dpy_internals.py +11 -2
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/_runtime.py +1 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/_settlement.py +5 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/actors.py +39 -7
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/access.py +7 -1
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/errors.py +4 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/interaction.py +9 -9
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/message.py +1 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/base.py +12 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/commands.py +12 -1
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/messages.py +128 -8
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/permissions.py +0 -12
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/serializers.py +37 -5
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/builders.py +3 -9
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/env.py +6 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/_helpers.py +26 -12
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/router.py +1 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/interactions.py +43 -19
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/intents.py +12 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_actions.py +3 -1
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_assets.py +40 -15
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_messages.py +53 -5
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_pages.py +9 -1
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_queries.py +18 -11
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/app.js +3 -3
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/messages.js +70 -53
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/preview.css +5 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/results.py +9 -2
- simcord-3.1.0/tests/integration/test_forwarding.py +471 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_interaction_followups.py +206 -11
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_interactions.py +6 -4
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_message_content_rest.py +9 -2
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_message_routes.py +136 -3
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_additional.py +0 -6
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_capture_dx.py +1 -1
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_edges.py +0 -5
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_security.py +142 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_settlement_contract.py +64 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_intent_rules.py +39 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_preview_action_specs.py +22 -1
- {simcord-3.0.2 → simcord-3.1.0}/uv.lock +1 -1
- {simcord-3.0.2 → simcord-3.1.0}/.github/ISSUE_TEMPLATE/bug.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.github/ISSUE_TEMPLATE/feature.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.github/ISSUE_TEMPLATE/parity-gap.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.github/dependabot.yml +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.github/workflows/ci.yml +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.github/workflows/dpy-master.yml +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.github/workflows/release.yml +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.github/workflows/verify.yml +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.gitignore +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.pre-commit-config.yaml +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.python-version +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/.readthedocs.yaml +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/CODE_OF_CONDUCT.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/CONTRIBUTING.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/LICENSE +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/README.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/SECURITY.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/benchmarks/_helpers.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/benchmarks/test_dispatch_benchmarks.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/benchmarks/test_perf_guards.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/changes/README.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/architecture.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/adventure/alpine.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/adventure/canyon.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/attachments.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/buttons.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/embeds.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/entities.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/layouts.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/markdown.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/modals.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/polls.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/replies.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/selects.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/preview/slash-commands.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/simcord-showcase-poll-refresh.gif +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/simcord-terminal-demo.gif +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/simcord-transparent.webp +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/assets/social-card.png +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/changelog.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/cookbook.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/faq.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/ai-coding-agents.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/components.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/diagnostics.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/discord-visual-calibration.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/fixtures.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/mocks-vs-simulation.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/moderation-and-guild.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/permissions.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/preview.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/test-without-token.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/testing-discord-py-bots.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/testing-slash-commands.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/threads-reactions-dms.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/guides/time-control.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/index.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/installation.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/llms.txt +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/performance.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/preview-attestation.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/quickstart.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/robots.txt +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/docs/stability.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/examples/README.md +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/examples/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/examples/bot.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/examples/conftest.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/examples/preview_example.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/examples/test_bot.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/mkdocs.yml +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/overrides/main.html +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/capture_discord_reference.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/capture_visual_reference.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/check_discoverability.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/check_package.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/check_reference_modal_offline.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/compare_visual_reference.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/discord_reference_bot.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/preview_dogfood.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/record_readme_demo.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/replay_visual_reference.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/scripts/validate_discord_reference_pack.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/_modal.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/asserts.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/cdn.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/command_access.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/auditlog.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/automod.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/channel.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/expression.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/guild.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/invite.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/member.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/role.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/scheduled_event.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/stage_instance.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/user.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/voice.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/models/webhook.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/audit.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/channels.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/expressions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/guilds.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/invites.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/polls.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/reactions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/scheduled_events.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/voice.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/ops/webhooks.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/permissions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/backend/state.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/components.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/enums.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/gateway.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/client.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/application.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/auditlogs.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/automod.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/channels.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/commands.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/expressions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/guilds.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/invites.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/messages.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/reactions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/scheduled_events.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/http/routes/stage_instances.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/interactions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/parity.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_action_plans.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_capture.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_commands.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_component_projection.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_diagnostics.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_identity.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_markdown.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_media.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_media_worker.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_server.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/_snapshot.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/protocol.schema.json +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/commands.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/components.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/composer.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/dom.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/OFL-1.1-Noto-Arabic.txt +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/OFL-1.1-Noto-CJK.txt +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/OFL-1.1-Noto-Devanagari.txt +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/OFL-1.1-Noto-Emoji.txt +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/OFL-1.1-Noto-Hebrew.txt +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/OFL-1.1-Noto.txt +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/manifest.json +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/noto-color-emoji-v2.051.ttf +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/noto-sans-arabic-v2.012.ttf +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/noto-sans-devanagari-v2.007.ttf +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/noto-sans-hebrew-v3.001.ttf +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/noto-sans-latin-italic-v2.015.ttf +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/noto-sans-latin-v2.015.ttf +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/noto-sans-mono-v2.014.ttf +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/fonts/noto-sans-sc-v2.004.ttf +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/index.html +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/listbox.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/media.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/select-drafts.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/selects.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/text.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/timeline.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/transport.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/LICENSE +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/SHA256SUMS +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/core.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/bash.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/cpp.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/csharp.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/css.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/diff.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/dockerfile.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/go.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/ini.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/java.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/javascript.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/json.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/markdown.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/python.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/rust.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/sql.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/typescript.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/xml.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/highlight/es/languages/yaml.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/lottie/5.12.2/lottie_light_canvas.min.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/lottie/LICENSE +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/vendor/lottie/SHA256SUMS +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/preview/static/workbench.js +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/py.typed +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/pytest_plugin.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/src/simcord/types.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/conformance/_world.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/conformance/test_field_honesty.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/conformance/test_field_honesty_fuzz.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/conformance/test_route_coverage.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/conformance/test_serializers.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/conftest.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/commands/option_cases.json +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/catalog.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/coverage.json +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/measurements.json +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/moving-square.json +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/profiles.json +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/states.json +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/video.mp4 +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/preview/voice.ogg +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/sample_bot/__init__.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/sample_bot/events.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/sample_bot/general.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/sample_bot/interactions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/sample_bot/moderation.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/fixtures/sample_bot/picker.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/preview_helpers.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_app_commands.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_application_emojis.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_asserts.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_audit_logs.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_automod.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_bot_users_and_webhooks.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_channels.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_command_permissions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_command_visibility.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_common_bot_sweep.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_components_v2_interactions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_components_v2_messages.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_coverage_sweep.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_diagnostics.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_edge_cases.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_error_capture_and_edits.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_expressions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_forum.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_gateway_and_automod_exempt.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_guilds.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_intents.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_invites.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_lifecycle.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_members.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_messages.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_misc_branches.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_moderation.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_observation_contracts.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_polls.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_capture.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_channel.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_command_picker.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_commands.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_coverage.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_dx.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_fixes.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_fonts.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_identity.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_preview_message_actions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_reactions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_reference_replay.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_roles_and_ordering.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_scheduled_events.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_setup_hook_suspension.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_sharding.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_stage_instances.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_threads.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_time.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_transport_edges.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_voice_state.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/integration/test_world_helpers.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_assert_helpers.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_backend_lookup_errors.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_command_access.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_components_v2_validation.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_dpy_internals.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_errors.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_lazy_import.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_option_validation.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_parity.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_parity_tooling.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_permission_validators.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_permissions.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_pytest_plugin.py +0 -0
- {simcord-3.0.2 → simcord-3.1.0}/tests/unit/test_router.py +0 -0
|
@@ -4,13 +4,24 @@ This changelog is generated with [towncrier](https://towncrier.readthedocs.io/).
|
|
|
4
4
|
|
|
5
5
|
<!-- towncrier release notes start -->
|
|
6
6
|
|
|
7
|
+
## 3.1.0 (2026-10-16)
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
- Thinking interaction defers now create fetchable, stable-ID originals; completing them through the first followup preserves defer-time visibility, while later followups are independent. Initial callbacks expire after three seconds (`10062`), separately from 15-minute continuation tokens (`10015`) and deleted originals (`10008`).
|
|
12
|
+
|
|
13
|
+
Add native actor and SDK forwarding with immutable rich snapshots, shared Message Content projection, permissions, and frozen Preview media authorized against the forward rather than the live source. Reject foreign-environment message handles before deterministic-ID resolution. Already-forwarded sources remain explicitly unsupported; snapshot metadata is copied while immutable CDN bytes are reused.
|
|
14
|
+
|
|
15
|
+
Keep strict task-scoped settlement diagnostics, but withdraw the unsafe blanket framework-run adapter recipe: only verified external handoffs should be declared, and no generic pydantic-ai adapter is established.
|
|
16
|
+
|
|
17
|
+
|
|
7
18
|
## 3.0.2 (2026-10-16)
|
|
8
19
|
|
|
9
20
|
### Bug fixes
|
|
10
21
|
|
|
11
22
|
- Honor explicit application Message Content approval on REST message responses independently of Gateway intents, including nested references. Restore ping-enabled replies to regular bot messages without exposing replies to interaction responses, preserve contextual interaction/token access, and keep backend fixtures complete. The default `approved_intents=None` retains unrestricted REST access; explicit absent approval is restricted.
|
|
12
23
|
|
|
13
|
-
Explicitly unapproved applications now receive redacted REST content, so tests that previously relied on unauthorized reads may fail and expose consumer bugs. Selecting a message in an interaction does not authorize later REST reads. Reply wire metadata and edit/deletion details remain offline-tested rather than live-Discord calibrated.
|
|
24
|
+
Explicitly unapproved applications now receive redacted REST content, so tests that previously relied on unauthorized reads may fail and expose consumer bugs. Selecting a message in an interaction does not authorize later REST reads. Reply wire metadata and edit/deletion details remain offline-tested rather than live-Discord calibrated.
|
|
14
25
|
|
|
15
26
|
|
|
16
27
|
## 3.0.1 (2026-10-06)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: simcord
|
|
3
|
-
Version: 3.0
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: Offline discord.py bot testing with pytest. No network, token, or test server.
|
|
5
5
|
Project-URL: Homepage, https://github.com/SilentHacks/simcord
|
|
6
6
|
Project-URL: Documentation, https://simcord.readthedocs.io/
|
|
@@ -24,7 +24,17 @@ top-level `simcord` package unless a module-qualified path is shown.
|
|
|
24
24
|
`settle_timeout` is the default maximum time spent joining runnable bot work. A direct
|
|
25
25
|
`await env.settle(timeout=...)` override is available; `idle=` is only the polling interval.
|
|
26
26
|
Use `await env.external_wait(awaitable, reason="...")` for one explicitly scoped external
|
|
27
|
-
input wait. Unknown waits remain active and produce
|
|
27
|
+
input wait. It applies to the calling task only. Unknown waits remain active and produce
|
|
28
|
+
a diagnostic timeout. Do not label whole framework runs as external waits; see the
|
|
29
|
+
[framework integration limits](concepts.md#actors-act-as-a-real-user).
|
|
30
|
+
|
|
31
|
+
### `Env(approved_intents=None)`
|
|
32
|
+
|
|
33
|
+
`None` skips explicit privileged-intent approval checks and permits REST Message Content
|
|
34
|
+
access, preserving the permissive fixture default. An explicit `discord.Intents.none()`
|
|
35
|
+
denies that access. REST authorization follows this Portal/API setting independently of
|
|
36
|
+
the bot's requested Gateway mask; normal exemptions and interaction-selected access remain.
|
|
37
|
+
Bot-visible projections never redact authoritative actor/backend fixture state.
|
|
28
38
|
|
|
29
39
|
|
|
30
40
|
## Request observability
|
|
@@ -112,6 +112,22 @@ input:
|
|
|
112
112
|
await env.external_wait(stop.wait(), reason="wait for the next message")
|
|
113
113
|
```
|
|
114
114
|
|
|
115
|
+
Declarations are **task-scoped**, not inherited. A framework can have three distinct waits:
|
|
116
|
+
graph-event delivery in its caller, a lifecycle wrapper waiting for that caller to finish,
|
|
117
|
+
and a model/provider task waiting for external input. Declaring only the provider wait does
|
|
118
|
+
not make the other two safe to ignore. Declare only verified external handoffs through
|
|
119
|
+
the framework's public hooks; do not infer safety from coroutine names or suppress
|
|
120
|
+
every sibling task.
|
|
121
|
+
|
|
122
|
+
Do **not** wrap an entire `agent.run()` or lifecycle `wrap_run(handler)` in
|
|
123
|
+
`external_wait`. Ordinary initialization and finalization also run there, and timers
|
|
124
|
+
created by the declaring task become virtual. Even an ordinary initialization sleep
|
|
125
|
+
can then stop progressing without `env.advance_time()`. No safe generic pydantic-ai
|
|
126
|
+
framework adapter is established here: declaring a provider/backoff wait alone does
|
|
127
|
+
not solve its orchestration waits. Keep undeclared workers visible as errors rather
|
|
128
|
+
than weakening settlement to make the integration pass.
|
|
129
|
+
|
|
130
|
+
|
|
115
131
|
Successful settlement means no runnable tracked bot work remains. Public operations reject
|
|
116
132
|
overlap before mutating state, and teardown cancels only bot-owned work; caller tasks survive.
|
|
117
133
|
|
|
@@ -119,7 +135,7 @@ The actor verbs, by area:
|
|
|
119
135
|
|
|
120
136
|
| Area | Verbs |
|
|
121
137
|
| --- | --- |
|
|
122
|
-
| Text | `send`, `edit`, `delete`, `typing`, `send_dm` |
|
|
138
|
+
| Text | `send`, `forward`, `edit`, `delete`, `typing`, `send_dm` |
|
|
123
139
|
| Reactions | `react`, `unreact` |
|
|
124
140
|
| App commands | `slash`, `context_menu`, `autocomplete` |
|
|
125
141
|
| Components | `click`, `select`, `submit_modal` |
|
|
@@ -108,6 +108,8 @@ the bot's event callbacks or SDK fetches to assert its restricted view. The tran
|
|
|
108
108
|
also retains authoritative event data and is **not** a privacy-redacted export.
|
|
109
109
|
These contracts are covered offline; reply wire metadata and edit/deletion details
|
|
110
110
|
have not been calibrated against a live Discord capture.
|
|
111
|
+
Forward snapshots inherit their containing message's content access: redaction removes
|
|
112
|
+
content-bearing fields while retaining snapshot metadata.
|
|
111
113
|
|
|
112
114
|
## Member chunking
|
|
113
115
|
|
|
@@ -43,13 +43,13 @@ everything the bot did in response:
|
|
|
43
43
|
|
|
44
44
|
```python
|
|
45
45
|
result.acknowledged # did the bot respond at all?
|
|
46
|
-
result.deferred #
|
|
46
|
+
result.deferred # an original is still loading, or a component update was deferred
|
|
47
47
|
result.ephemeral # the response is only visible to the invoker
|
|
48
48
|
result.response # the response message (ResponseMessage | None)
|
|
49
49
|
result.response.content # its text
|
|
50
50
|
result.response.embeds # list[discord.Embed]
|
|
51
51
|
result.response.message # the full discord.Message, when you need it
|
|
52
|
-
result.followups # messages
|
|
52
|
+
result.followups # independent followup messages, excluding completion of a thinking original
|
|
53
53
|
result.modal # the modal payload, if one was shown
|
|
54
54
|
result.autocomplete_choices # choices, for autocomplete interactions
|
|
55
55
|
```
|
|
@@ -83,23 +83,54 @@ matching error-acknowledgement transition.
|
|
|
83
83
|
|
|
84
84
|
The full lifecycle behaves as on Discord:
|
|
85
85
|
|
|
86
|
-
- **
|
|
87
|
-
|
|
86
|
+
- **Initial deadline** — reply or defer before three seconds on the backend clock.
|
|
87
|
+
An unacknowledged callback at or after that deadline fails with `10062` (Unknown
|
|
88
|
+
Interaction), and its continuation token is invalid. Use `env.advance_time()` to
|
|
89
|
+
exercise this boundary without wall-clock sleeps.
|
|
90
|
+
|
|
91
|
+
- **Thinking defers (type 5)** — `await interaction.response.defer(thinking=True)` immediately
|
|
92
|
+
creates a fetchable original with `flags.loading`, its chosen ephemeral flag, and a stable
|
|
93
|
+
message ID. Public originals appear in public history; private ones are visible only to
|
|
94
|
+
the invoker.
|
|
95
|
+
- **Completing a thinking defer** — `edit_original_response()` is the preferred endpoint.
|
|
96
|
+
Discord's deprecated compatibility behavior also lets the first `followup.send()` complete
|
|
97
|
+
that same original. Both clear loading without changing its ID or visibility; a conflicting
|
|
98
|
+
`ephemeral=` flag cannot turn an existing public message private (or vice versa).
|
|
99
|
+
- **Component update defers (type 6)** — `defer()` without `thinking=True` keeps the clicked
|
|
100
|
+
message as the original. A followup is independent and does not consume or replace it.
|
|
88
101
|
- **Double-acknowledging** — responding twice raises the real Discord error `40060`. (A
|
|
89
102
|
callback that *fails* — e.g. a 400 from an oversized embed — does **not** consume the
|
|
90
103
|
interaction, so a retried response still gets through.)
|
|
91
|
-
- **Followups** —
|
|
92
|
-
|
|
93
|
-
|
|
104
|
+
- **Followups** — after the original is completed, `interaction.followup.send()` creates an
|
|
105
|
+
independent message with its requested visibility. Only these messages enter
|
|
106
|
+
`result.followups`; completion of a thinking original is available as `result.response`.
|
|
107
|
+
- **`@original` operations** — fetching, editing and deleting resolve the same stored message.
|
|
108
|
+
Deletion returns `result.response` to `None`, and later original reads/edits fail with
|
|
109
|
+
`10008`; a deleted pending original cannot be resurrected by a followup. Deleting an
|
|
110
|
+
already-completed original does not prevent independent followups.
|
|
111
|
+
- **Token expiry** — continuation webhooks expire after 15 minutes on the backend clock.
|
|
112
|
+
Expired tokens fail with `10015`, distinct from an absent/deleted message's `10008`.
|
|
94
113
|
|
|
95
114
|
```python
|
|
96
115
|
async def test_defer_then_followup(simcord_env):
|
|
97
116
|
...
|
|
98
117
|
result = await alice.slash(channel, "slow-task")
|
|
99
|
-
assert result.deferred
|
|
100
|
-
assert result.
|
|
118
|
+
assert not result.deferred
|
|
119
|
+
assert result.response.content == "Done!"
|
|
120
|
+
assert result.followups == []
|
|
101
121
|
```
|
|
102
122
|
|
|
123
|
+
This corrects the former first-followup-as-new-message behavior: migrate assertions from
|
|
124
|
+
`result.followups[0]` to `result.response` when the send completes a thinking original.
|
|
125
|
+
Pending originals also consume a message ID immediately, rather than on completion.
|
|
126
|
+
|
|
127
|
+
discord.py caches `interaction.original_response()` as a snapshot. To observe a later edit,
|
|
128
|
+
fetch fresh state with `interaction.followup.fetch_message(original.id)`; SimCord does not
|
|
129
|
+
patch the SDK cache. Choose private visibility at the initial defer when a response may
|
|
130
|
+
contain sensitive data. If visibility must change, complete the original without sensitive
|
|
131
|
+
content before sending a new, independently visible followup.
|
|
132
|
+
|
|
133
|
+
|
|
103
134
|
## Autocomplete
|
|
104
135
|
|
|
105
136
|
Type into an autocomplete option and get back the choices the bot offered:
|
|
@@ -47,6 +47,42 @@ Editing a message preserves immutable flags: ephemeral messages stay ephemeral,
|
|
|
47
47
|
on. If your test setup denies the action, you get a `SetupError` — see
|
|
48
48
|
[Permissions](permissions.md).
|
|
49
49
|
|
|
50
|
+
## Forwarding immutable message snapshots
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
source = await alice.send(channel, "Evidence", attachments=[("proof.txt", b"original")])
|
|
54
|
+
forwarded = await alice.forward(source, destination)
|
|
55
|
+
assert forwarded.reference.type is discord.MessageReferenceType.forward
|
|
56
|
+
assert forwarded.message_snapshots[0].content == "Evidence"
|
|
57
|
+
assert await forwarded.message_snapshots[0].attachments[0].read() == b"original"
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Bot code can use native `await message.forward(destination)` too. Both paths store a
|
|
61
|
+
type-1 reference and a snapshot, rather than a reply's live `referenced_message`. Forwarding
|
|
62
|
+
does not ping the original author. Source visibility/history and destination send/attachment
|
|
63
|
+
permissions are enforced; SDK forwarding also requires application-level content access.
|
|
64
|
+
Actor message handles must belong to the same environment; colliding deterministic
|
|
65
|
+
IDs from another environment do not identify a local source. Cross-guild forwarding
|
|
66
|
+
within one environment remains supported, including SDK interaction originals and
|
|
67
|
+
webhook followups. Message handles retained across a bot restart remain environment-owned.
|
|
68
|
+
|
|
69
|
+
Snapshot metadata is copied when the forward is created and detached on observation. Later
|
|
70
|
+
source edits/deletion and mutations of returned objects do not alter it. Existing immutable
|
|
71
|
+
CDN bytes are reused, not duplicated. Actors and fixture history see authoritative snapshots;
|
|
72
|
+
bot Gateway/REST observations apply the normal Message Content policy.
|
|
73
|
+
|
|
74
|
+
Preview renders the frozen text, embeds, attachments, stickers and components without
|
|
75
|
+
inventing a source author or resolving a live reply. Historical interaction controls are
|
|
76
|
+
disabled; safe link buttons remain links. Snapshot downloads are authorized against the
|
|
77
|
+
forwarding message, not the source: readers of a deliberately shared forward need not have
|
|
78
|
+
source-channel access, but deleting the forward revokes its retained downloads.
|
|
79
|
+
|
|
80
|
+
**Explicit limit:** forwarding an already-forwarded message raises `NotImplementedError`.
|
|
81
|
+
Discord documents a nesting cap but not the transformation of nested snapshots plus outer
|
|
82
|
+
annotations; SimCord does not silently flatten/drop content or fabricate a Discord error.
|
|
83
|
+
Ordinary forwards, including outer annotations sent through the native SDK, are supported.
|
|
84
|
+
|
|
85
|
+
|
|
50
86
|
## Converters and checks run for real
|
|
51
87
|
|
|
52
88
|
Because the cache is populated through discord.py's actual parsers, converters resolve
|
|
@@ -24,6 +24,7 @@ routes are local presentation endpoints and are intentionally not part of the Di
|
|
|
24
24
|
| Messages (send/edit/delete/fetch/history) | ✅ | Content & embed limits enforced (`50035`); immutable edit flags are retained; `publish` (announcement crosspost) |
|
|
25
25
|
| Bulk delete (`purge` / `delete_messages`) | ✅ | 2–100 messages, single `MESSAGE_DELETE_BULK`, audit-logged |
|
|
26
26
|
| Embeds, attachments, replies, mentions | ✅ | In-memory CDN; slash `ATTACHMENT` options accept `(filename, bytes)` uploads; `attachment.read()` works |
|
|
27
|
+
| Message forwarding | ⚠️ | Native `actor.forward(message, channel)` and SDK `message.forward(channel)`; immutable rich snapshots, permissions, content-access projection and Preview. Already-forwarded sources fail explicitly rather than flattening unverified nested semantics. |
|
|
27
28
|
| Pins | ✅ | Current paginated endpoints |
|
|
28
29
|
| Typing | ✅ | Both directions |
|
|
29
30
|
| Reactions | ✅ | Add/remove/list, clear-all & clear-emoji, gateway events |
|
|
@@ -36,7 +37,7 @@ routes are local presentation endpoints and are intentionally not part of the Di
|
|
|
36
37
|
| App command permissions | ✅ | `AppCommand.fetch_permissions`; seed via `guild.set_command_permissions` |
|
|
37
38
|
| Context menus (user & message) | ✅ | |
|
|
38
39
|
| Autocomplete | ✅ | Focused options must be declared and have autocomplete enabled |
|
|
39
|
-
| Interaction lifecycle | ✅ |
|
|
40
|
+
| Interaction lifecycle | ✅ | Three-second initial deadline (`10062`), fetchable thinking originals, stable-ID completion, first-followup visibility inheritance, distinct component-update defers, `@original` ops, `40060` double-ack, `10008` deleted messages and `10015` expired continuation tokens |
|
|
40
41
|
| Ephemeral semantics | ✅ | Visibility-aware history and component access |
|
|
41
42
|
| Buttons / selects / modals | ✅ | Real `View` dispatch; disabled/missing rejected |
|
|
42
43
|
| User/role/channel/mentionable selects | ✅ | Pass the handles a user could pick; resolved data built |
|
|
@@ -8,16 +8,17 @@ mysteriously. Keep this inventory in sync with what the framework touches.
|
|
|
8
8
|
import asyncio
|
|
9
9
|
import asyncio.timeouts
|
|
10
10
|
import sys
|
|
11
|
-
from collections.abc import Callable
|
|
11
|
+
from collections.abc import Callable, Collection
|
|
12
12
|
from typing import Any
|
|
13
13
|
|
|
14
14
|
import discord
|
|
15
15
|
from discord.ext import tasks as _ext_tasks
|
|
16
16
|
from discord.gateway import DiscordWebSocket
|
|
17
17
|
from discord.http import HTTPClient
|
|
18
|
+
from discord.interactions import _InteractionMessageState
|
|
18
19
|
from discord.state import ChunkRequest, ConnectionState
|
|
19
20
|
from discord.ui import view as _view
|
|
20
|
-
from discord.webhook.async_ import async_context
|
|
21
|
+
from discord.webhook.async_ import _WebhookState, async_context
|
|
21
22
|
|
|
22
23
|
from .backend.errors import SetupError
|
|
23
24
|
|
|
@@ -393,6 +394,14 @@ def get_state(client: discord.Client) -> Any:
|
|
|
393
394
|
return client._connection
|
|
394
395
|
|
|
395
396
|
|
|
397
|
+
def message_belongs_to_states(message: discord.Message, states: Collection[Any]) -> bool:
|
|
398
|
+
"""Check originating connections, including prior generations, without trusting IDs."""
|
|
399
|
+
state = message._state
|
|
400
|
+
if isinstance(state, (_InteractionMessageState, _WebhookState)):
|
|
401
|
+
state = state._parent
|
|
402
|
+
return state in states
|
|
403
|
+
|
|
404
|
+
|
|
396
405
|
def resolve_pending_chunk(state: Any, guild_id: int, nonce: str | None) -> None:
|
|
397
406
|
"""Wake a member-chunk request whose guild vanished before it was answered.
|
|
398
407
|
|
|
@@ -281,6 +281,7 @@ async def _attach_bot(self: Env, bot: discord.Client) -> None:
|
|
|
281
281
|
)
|
|
282
282
|
|
|
283
283
|
state = _dpy_internals.get_state(bot)
|
|
284
|
+
self._message_states.add(state)
|
|
284
285
|
state.shard_count = self._shard_count
|
|
285
286
|
state.shard_ids = list(self._shard_ids)
|
|
286
287
|
router = ShardRouter(self.backend, state, bot.dispatch, self._shard_count, self._shard_ids)
|
|
@@ -251,6 +251,11 @@ def _settle_timeout_message(
|
|
|
251
251
|
" use await env.external_wait(...) for intentional external input; "
|
|
252
252
|
"use await env.advance_time(...) for virtual timers"
|
|
253
253
|
)
|
|
254
|
+
if self._external_waits and stuck:
|
|
255
|
+
lines.append(
|
|
256
|
+
" external_wait is task-scoped; declare framework orchestration/lifecycle waits "
|
|
257
|
+
"at their public hooks rather than assuming sibling waits are external"
|
|
258
|
+
)
|
|
254
259
|
if len(all_pending) > len(stuck):
|
|
255
260
|
lines.append(f" {len(all_pending) - len(stuck)} recognized waits remain parked")
|
|
256
261
|
return "\n".join(lines)
|
|
@@ -14,6 +14,7 @@ from typing import TYPE_CHECKING, Any
|
|
|
14
14
|
import discord
|
|
15
15
|
|
|
16
16
|
from . import interactions as _interactions
|
|
17
|
+
from ._dpy_internals import message_belongs_to_states
|
|
17
18
|
from .backend import serializers
|
|
18
19
|
from .backend.access import can_access_message
|
|
19
20
|
from .backend.command_access import command_access
|
|
@@ -79,7 +80,11 @@ class MemberActor:
|
|
|
79
80
|
self._check(channel, perm)
|
|
80
81
|
reference = None
|
|
81
82
|
if reply_to is not None:
|
|
82
|
-
reference = {
|
|
83
|
+
reference = {
|
|
84
|
+
"channel_id": str(_channel_id_of(reply_to, self._env)),
|
|
85
|
+
"message_id": str(reply_to.id),
|
|
86
|
+
}
|
|
87
|
+
reference = backend.normalize_message_reference(channel.id, reference)
|
|
83
88
|
attachment_payloads = backend.store_attachments(channel.id, attachments)
|
|
84
89
|
message = backend.create_message(
|
|
85
90
|
channel.id,
|
|
@@ -92,6 +97,24 @@ class MemberActor:
|
|
|
92
97
|
await self._env._settle_internal(dispatch="MEMBER.send")
|
|
93
98
|
return to_discord_message(self._env, message)
|
|
94
99
|
|
|
100
|
+
async def forward(self, message: MessageLike, channel: ChannelHandle) -> discord.Message:
|
|
101
|
+
"""Forward the authoritative source as an immutable native message snapshot."""
|
|
102
|
+
if channel._env is not self._env:
|
|
103
|
+
raise SetupError("forward destination must belong to this environment")
|
|
104
|
+
source_channel = _channel_id_of(message, self._env)
|
|
105
|
+
forwarded = self._env.backend.create_message(
|
|
106
|
+
channel.id,
|
|
107
|
+
self.id,
|
|
108
|
+
reference={
|
|
109
|
+
"type": 1,
|
|
110
|
+
"channel_id": str(source_channel),
|
|
111
|
+
"message_id": str(message.id),
|
|
112
|
+
},
|
|
113
|
+
)
|
|
114
|
+
self._env._mark_mutation()
|
|
115
|
+
await self._env._settle_internal(dispatch="MEMBER.forward")
|
|
116
|
+
return to_discord_message(self._env, forwarded)
|
|
117
|
+
|
|
95
118
|
async def edit(self, message: MessageLike, content: str) -> None:
|
|
96
119
|
stored = self._message(message)
|
|
97
120
|
if stored.author_id != self.id:
|
|
@@ -202,7 +225,7 @@ class MemberActor:
|
|
|
202
225
|
}
|
|
203
226
|
else:
|
|
204
227
|
command_type = AppCommandType.MESSAGE
|
|
205
|
-
stored = backend.get_message(_channel_id_of(target), target.id)
|
|
228
|
+
stored = backend.get_message(_channel_id_of(target, self._env), target.id)
|
|
206
229
|
resolved = {"messages": {str(target.id): dict(serializers.message_payload(backend, stored))}}
|
|
207
230
|
# Context-menu names contain spaces and never nest, so resolve the full
|
|
208
231
|
# name directly rather than treating words as a subcommand path.
|
|
@@ -535,14 +558,21 @@ async def _autocomplete_result_resolved(
|
|
|
535
558
|
actor._env._end_operation()
|
|
536
559
|
|
|
537
560
|
|
|
538
|
-
def _channel_id_of(message: MessageLike,
|
|
561
|
+
def _channel_id_of(message: MessageLike, env: Env, *, dm_user_id: int | None = None) -> int:
|
|
539
562
|
if isinstance(message, ResponseMessage):
|
|
563
|
+
if message._env is not env:
|
|
564
|
+
raise SetupError("That message must belong to this environment")
|
|
540
565
|
return message.channel_id
|
|
566
|
+
if not isinstance(message, discord.Message) or not message_belongs_to_states(
|
|
567
|
+
message, env._message_states
|
|
568
|
+
):
|
|
569
|
+
raise SetupError("That message must belong to this environment")
|
|
541
570
|
channel = message.channel
|
|
542
571
|
if channel is None:
|
|
543
|
-
if
|
|
572
|
+
channel_id = env.backend.dm_channels.get(dm_user_id) if dm_user_id is not None else None
|
|
573
|
+
if channel_id is None:
|
|
544
574
|
raise SetupError("That message is not bound to a channel")
|
|
545
|
-
return
|
|
575
|
+
return channel_id
|
|
546
576
|
return channel.id
|
|
547
577
|
|
|
548
578
|
|
|
@@ -564,8 +594,9 @@ def _check_user_dm_channel(actor: Any, channel_id: int) -> None:
|
|
|
564
594
|
|
|
565
595
|
def _visible_message(actor: Any, message: MessageLike) -> Any:
|
|
566
596
|
backend = actor._env.backend
|
|
567
|
-
|
|
568
|
-
|
|
597
|
+
channel_id = _channel_id_of(
|
|
598
|
+
message, actor._env, dm_user_id=actor.id if isinstance(actor, UserHandle) else None
|
|
599
|
+
)
|
|
569
600
|
_check_user_dm_channel(actor, channel_id)
|
|
570
601
|
stored = backend.get_message(channel_id, message.id)
|
|
571
602
|
if not can_access_message(actor._env, channel_id, stored, actor):
|
|
@@ -731,6 +762,7 @@ async def _dispatch_actor_interaction(
|
|
|
731
762
|
|
|
732
763
|
for _operation_name in (
|
|
733
764
|
"send",
|
|
765
|
+
"forward",
|
|
734
766
|
"edit",
|
|
735
767
|
"delete",
|
|
736
768
|
"typing",
|
|
@@ -52,7 +52,13 @@ def can_access_channel(env: Env, channel_id: int, viewer: Any, *, history: bool
|
|
|
52
52
|
if history and not permissions & discord.Permissions.read_message_history.flag:
|
|
53
53
|
return False
|
|
54
54
|
if channel.type == ChannelType.PRIVATE_THREAD:
|
|
55
|
-
privileged =
|
|
55
|
+
privileged = (
|
|
56
|
+
bool(
|
|
57
|
+
permissions
|
|
58
|
+
& (discord.Permissions.administrator.flag | discord.Permissions.manage_threads.flag)
|
|
59
|
+
)
|
|
60
|
+
or viewer_id == guild.owner_id
|
|
61
|
+
)
|
|
56
62
|
if viewer_id not in channel.thread_members and not privileged:
|
|
57
63
|
return False
|
|
58
64
|
return True
|
|
@@ -73,6 +73,10 @@ def unknown_webhook() -> BackendError:
|
|
|
73
73
|
return BackendError(404, 10015, "Unknown Webhook")
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
def unknown_interaction() -> BackendError:
|
|
77
|
+
return BackendError(404, 10062, "Unknown Interaction")
|
|
78
|
+
|
|
79
|
+
|
|
76
80
|
def unknown_ban() -> BackendError:
|
|
77
81
|
return BackendError(404, 10026, "Unknown Ban")
|
|
78
82
|
|
|
@@ -9,7 +9,7 @@ class ResponseKind(StrEnum):
|
|
|
9
9
|
"""How the bot answered an interaction (Discord callback semantics)."""
|
|
10
10
|
|
|
11
11
|
MESSAGE = "message" # type 4: channel message with source
|
|
12
|
-
DEFERRED = "deferred" # type 5:
|
|
12
|
+
DEFERRED = "deferred" # type 5: pending channel message with source
|
|
13
13
|
DEFERRED_UPDATE = "deferred_update" # type 6: deferred update of the component's message
|
|
14
14
|
UPDATE = "update" # type 7: update the component's message
|
|
15
15
|
MODAL = "modal" # type 9
|
|
@@ -21,10 +21,8 @@ class ResponseKind(StrEnum):
|
|
|
21
21
|
class Interaction:
|
|
22
22
|
"""A single interaction and the evolving state of the bot's response to it.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
re-derived in each route handler. ``responded`` is only set by the marker
|
|
27
|
-
methods, which route handlers call after the callback has been validated.
|
|
24
|
+
Response markers run only after validation succeeds. A type-5 defer owns a
|
|
25
|
+
real loading message from acknowledgement through completion or deletion.
|
|
28
26
|
"""
|
|
29
27
|
|
|
30
28
|
id: int
|
|
@@ -33,6 +31,7 @@ class Interaction:
|
|
|
33
31
|
channel_id: int
|
|
34
32
|
guild_id: int | None
|
|
35
33
|
user_id: int
|
|
34
|
+
expires_at: str | None = None
|
|
36
35
|
responded: bool = False
|
|
37
36
|
response_kind: ResponseKind | None = None
|
|
38
37
|
message_id: int | None = None
|
|
@@ -47,6 +46,7 @@ class Interaction:
|
|
|
47
46
|
target_id: int | None = None
|
|
48
47
|
target_type: int | None = None
|
|
49
48
|
target_channel_id: int | None = None
|
|
49
|
+
initial_response_deadline: str | None = None
|
|
50
50
|
|
|
51
51
|
# ----------------------------------------------------- response lifecycle
|
|
52
52
|
|
|
@@ -56,8 +56,9 @@ class Interaction:
|
|
|
56
56
|
self.ephemeral = ephemeral
|
|
57
57
|
self.responded = True
|
|
58
58
|
|
|
59
|
-
def defer(self, *, ephemeral: bool) -> None:
|
|
59
|
+
def defer(self, message_id: int, *, ephemeral: bool) -> None:
|
|
60
60
|
self.response_kind = ResponseKind.DEFERRED
|
|
61
|
+
self.message_id = message_id
|
|
61
62
|
self.ephemeral = ephemeral
|
|
62
63
|
self.responded = True
|
|
63
64
|
|
|
@@ -86,10 +87,9 @@ class Interaction:
|
|
|
86
87
|
self.response_kind = ResponseKind.PONG
|
|
87
88
|
self.responded = True
|
|
88
89
|
|
|
89
|
-
def
|
|
90
|
-
"""
|
|
90
|
+
def complete_deferred(self) -> None:
|
|
91
|
+
"""Finish a pending type-5 original without changing its identity."""
|
|
91
92
|
self.response_kind = ResponseKind.MESSAGE
|
|
92
|
-
self.message_id = message_id
|
|
93
93
|
|
|
94
94
|
# ----------------------------------------------------------- derived view
|
|
95
95
|
|
|
@@ -88,6 +88,7 @@ class Message:
|
|
|
88
88
|
mention_role_ids: list[int] = field(default_factory=list)
|
|
89
89
|
mention_everyone: bool = False
|
|
90
90
|
reference: dict[str, Any] | None = None
|
|
91
|
+
snapshots: list[dict[str, Any]] = field(default_factory=list)
|
|
91
92
|
#: Original reply target facts survive target deletion; eligibility does not.
|
|
92
93
|
reply_author_id: int | None = None
|
|
93
94
|
reply_author_interaction: bool = False
|
|
@@ -180,3 +180,15 @@ class BackendBase:
|
|
|
180
180
|
if parent_id != channel_id:
|
|
181
181
|
channel = self.get_channel(parent_id)
|
|
182
182
|
return permissions.compute(guild, user_id, channel)
|
|
183
|
+
|
|
184
|
+
def require_permissions(
|
|
185
|
+
self, guild_id: int | None, user_id: int, channel_id: int | None, *names: str
|
|
186
|
+
) -> None:
|
|
187
|
+
if guild_id is None: # DMs: no guild permissions apply
|
|
188
|
+
return
|
|
189
|
+
perms = self.compute_permissions(guild_id, user_id, channel_id)
|
|
190
|
+
if channel_id is not None and not perms & permissions.flag("view_channel"):
|
|
191
|
+
raise errors.missing_access()
|
|
192
|
+
for name in names:
|
|
193
|
+
if not perms & permissions.flag(name):
|
|
194
|
+
raise errors.missing_permissions()
|
|
@@ -99,6 +99,8 @@ class CommandsMixin(BackendBase):
|
|
|
99
99
|
channel_id=channel_id,
|
|
100
100
|
guild_id=guild_id,
|
|
101
101
|
user_id=user_id,
|
|
102
|
+
expires_at=self.iso_after(15 * 60),
|
|
103
|
+
initial_response_deadline=self.iso_after(3),
|
|
102
104
|
)
|
|
103
105
|
self.interactions[interaction_id] = record
|
|
104
106
|
self.interaction_tokens[record.token] = interaction_id
|
|
@@ -108,4 +110,13 @@ class CommandsMixin(BackendBase):
|
|
|
108
110
|
interaction_id = self.interaction_tokens.get(token)
|
|
109
111
|
if interaction_id is None:
|
|
110
112
|
raise errors.unknown_webhook()
|
|
111
|
-
|
|
113
|
+
record = self.interactions[interaction_id]
|
|
114
|
+
if record.expires_at is not None and self.now_iso() >= record.expires_at:
|
|
115
|
+
raise errors.unknown_webhook()
|
|
116
|
+
if (
|
|
117
|
+
not record.responded
|
|
118
|
+
and record.initial_response_deadline is not None
|
|
119
|
+
and self.now_iso() >= record.initial_response_deadline
|
|
120
|
+
):
|
|
121
|
+
raise errors.unknown_webhook()
|
|
122
|
+
return record
|