review-sensei-github 0.1.1__py3-none-any.whl
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.
- review_sensei_github/__init__.py +189 -0
- review_sensei_github/__main__.py +10 -0
- review_sensei_github/application.py +2465 -0
- review_sensei_github/approval.py +653 -0
- review_sensei_github/auth.py +514 -0
- review_sensei_github/broker.py +519 -0
- review_sensei_github/broker_client.py +439 -0
- review_sensei_github/checks.py +496 -0
- review_sensei_github/cli.py +156 -0
- review_sensei_github/command_bodies.py +1244 -0
- review_sensei_github/commands.py +82 -0
- review_sensei_github/conversation.py +2066 -0
- review_sensei_github/doctor.py +36 -0
- review_sensei_github/eligibility_parts.py +378 -0
- review_sensei_github/errors.py +198 -0
- review_sensei_github/feedback_attestation.py +217 -0
- review_sensei_github/fixtures/__init__.py +1 -0
- review_sensei_github/fixtures/historical-v4-uninstall.yml +62 -0
- review_sensei_github/fixtures/merge-focused-v4-caller.yml +359 -0
- review_sensei_github/fixtures/merge-focused-v4-config.yml +19 -0
- review_sensei_github/fixtures/released-v4-resolve-trigger-runner-switch.yml +341 -0
- review_sensei_github/fixtures/sensei-only-v5-caller.yml +280 -0
- review_sensei_github/http.py +494 -0
- review_sensei_github/human_assessment.py +1077 -0
- review_sensei_github/human_file_review.py +879 -0
- review_sensei_github/jwt.py +136 -0
- review_sensei_github/learning_pr.py +2782 -0
- review_sensei_github/observed.py +900 -0
- review_sensei_github/oidc.py +370 -0
- review_sensei_github/openrouter_workflow.py +46 -0
- review_sensei_github/operation_comments.py +357 -0
- review_sensei_github/operation_entry.py +522 -0
- review_sensei_github/operation_host.py +2050 -0
- review_sensei_github/pending.py +263 -0
- review_sensei_github/prose_publication.py +353 -0
- review_sensei_github/publication.py +2941 -0
- review_sensei_github/publication_parts.py +242 -0
- review_sensei_github/reply_budget.py +97 -0
- review_sensei_github/reservation_recovery.py +221 -0
- review_sensei_github/review_hooks.py +37 -0
- review_sensei_github/session_ledger.py +2180 -0
- review_sensei_github/setup.py +2863 -0
- review_sensei_github/trigger.py +294 -0
- review_sensei_github/webhooks.py +327 -0
- review_sensei_github-0.1.1.dist-info/METADATA +29 -0
- review_sensei_github-0.1.1.dist-info/RECORD +49 -0
- review_sensei_github-0.1.1.dist-info/WHEEL +5 -0
- review_sensei_github-0.1.1.dist-info/entry_points.txt +2 -0
- review_sensei_github-0.1.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
"""GitHub App identity, installation-time setup, and webhook safety.
|
|
2
|
+
|
|
3
|
+
This package is a narrow transport/auth boundary outside the provider-neutral
|
|
4
|
+
review core. It owns GitHub App JWTs, installation-token exchange, token
|
|
5
|
+
caching, webhook signature verification, sanitized webhook failures, and
|
|
6
|
+
idempotent installation-time setup pull request bootstrap for optional
|
|
7
|
+
App-identity comments, reviews, or setup.
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
from .application import GitHubApplication, GitHubWriteOptions
|
|
11
|
+
from .auth import (
|
|
12
|
+
AppInstallationToken,
|
|
13
|
+
EnvPrivateKeySource,
|
|
14
|
+
FilePrivateKeySource,
|
|
15
|
+
GitHubAppAuth,
|
|
16
|
+
GitHubTokenTransport,
|
|
17
|
+
InstallationToken,
|
|
18
|
+
InstallationTokenScope,
|
|
19
|
+
PrivateKeySource,
|
|
20
|
+
RequestedPermissions,
|
|
21
|
+
)
|
|
22
|
+
from .broker import (
|
|
23
|
+
DEFAULT_BROKER_AUDIENCE,
|
|
24
|
+
ApprovedWorkflow,
|
|
25
|
+
AuditRecord,
|
|
26
|
+
AuditSink,
|
|
27
|
+
BrokerPolicy,
|
|
28
|
+
ForkChecker,
|
|
29
|
+
GitHubForkChecker,
|
|
30
|
+
GitHubInstallationLookup,
|
|
31
|
+
InMemoryAuditSink,
|
|
32
|
+
InMemoryInstallationMapping,
|
|
33
|
+
InstallationMapping,
|
|
34
|
+
OIDCBroker,
|
|
35
|
+
RateLimiter,
|
|
36
|
+
TokenBucketRateLimiter,
|
|
37
|
+
)
|
|
38
|
+
from .broker_client import BrokerClient
|
|
39
|
+
from .conversation import ConversationPublisher, PreparedConversation, ReplyResult
|
|
40
|
+
from .errors import (
|
|
41
|
+
BrokerPolicyError,
|
|
42
|
+
BrokerRateLimitError,
|
|
43
|
+
BrokerRejectionError,
|
|
44
|
+
GitHubAuthConfigurationError,
|
|
45
|
+
GitHubAuthError,
|
|
46
|
+
GitHubAuthInsufficientPermissionError,
|
|
47
|
+
GitHubAuthTransientError,
|
|
48
|
+
GitHubAuthUnavailableInstallationError,
|
|
49
|
+
GitHubBrokerClientError,
|
|
50
|
+
GitHubConversationError,
|
|
51
|
+
GitHubConversationTransientError,
|
|
52
|
+
GitHubHTTPError,
|
|
53
|
+
GitHubHTTPPaginationLimitError,
|
|
54
|
+
GitHubHTTPResponseTooLargeError,
|
|
55
|
+
GitHubHTTPTransientError,
|
|
56
|
+
GitHubLearningProposalError,
|
|
57
|
+
GitHubLearningProposalTransientError,
|
|
58
|
+
GitHubOIDCAudienceError,
|
|
59
|
+
GitHubOIDCClaimsError,
|
|
60
|
+
GitHubOIDCError,
|
|
61
|
+
GitHubOIDCExpiredError,
|
|
62
|
+
GitHubOIDCInvalidTokenError,
|
|
63
|
+
GitHubOIDCIssuerError,
|
|
64
|
+
GitHubOIDCSignatureError,
|
|
65
|
+
GitHubPublicationError,
|
|
66
|
+
GitHubPublicationTransientError,
|
|
67
|
+
GitHubSetupError,
|
|
68
|
+
GitHubSetupTransientError,
|
|
69
|
+
GitHubWebhookError,
|
|
70
|
+
GitHubWebhookSignatureError,
|
|
71
|
+
)
|
|
72
|
+
from .http import GitHubHttp
|
|
73
|
+
from .jwt import JWTAlgorithms, decode_jwt_parts, jwt_encode_rs256
|
|
74
|
+
from .learning_pr import LearningPRPublisher, LearningPRResult
|
|
75
|
+
from .oidc import (
|
|
76
|
+
DEFAULT_OIDC_ISSUER,
|
|
77
|
+
HttpJwksFetcher,
|
|
78
|
+
JwksFetcher,
|
|
79
|
+
VerifiedOIDCClaims,
|
|
80
|
+
verify_oidc_token,
|
|
81
|
+
)
|
|
82
|
+
from .publication import PublicationResult, ReviewPublisher
|
|
83
|
+
from .session_ledger import GitHubIssueCommentSessionLedger
|
|
84
|
+
from .setup import (
|
|
85
|
+
GitHubSetupClient,
|
|
86
|
+
GitHubSetupTransport,
|
|
87
|
+
SetupFile,
|
|
88
|
+
SetupPlan,
|
|
89
|
+
SetupPlanBuilder,
|
|
90
|
+
SetupPullRequestResult,
|
|
91
|
+
SetupPullRequestService,
|
|
92
|
+
)
|
|
93
|
+
from .webhooks import (
|
|
94
|
+
DeliveryLedger,
|
|
95
|
+
EnvWebhookSecretSource,
|
|
96
|
+
InMemoryDeliveryLedger,
|
|
97
|
+
VerifiedDelivery,
|
|
98
|
+
WebhookSecretSource,
|
|
99
|
+
WebhookVerifier,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
__all__ = [
|
|
103
|
+
"AppInstallationToken",
|
|
104
|
+
"ApprovedWorkflow",
|
|
105
|
+
"AuditRecord",
|
|
106
|
+
"AuditSink",
|
|
107
|
+
"BrokerClient",
|
|
108
|
+
"BrokerPolicy",
|
|
109
|
+
"BrokerPolicyError",
|
|
110
|
+
"BrokerRateLimitError",
|
|
111
|
+
"BrokerRejectionError",
|
|
112
|
+
"ConversationPublisher",
|
|
113
|
+
"PreparedConversation",
|
|
114
|
+
"DEFAULT_BROKER_AUDIENCE",
|
|
115
|
+
"DEFAULT_OIDC_ISSUER",
|
|
116
|
+
"EnvPrivateKeySource",
|
|
117
|
+
"FilePrivateKeySource",
|
|
118
|
+
"ForkChecker",
|
|
119
|
+
"GitHubApplication",
|
|
120
|
+
"GitHubAppAuth",
|
|
121
|
+
"GitHubBrokerClientError",
|
|
122
|
+
"GitHubAuthConfigurationError",
|
|
123
|
+
"GitHubAuthError",
|
|
124
|
+
"GitHubAuthInsufficientPermissionError",
|
|
125
|
+
"GitHubAuthTransientError",
|
|
126
|
+
"GitHubAuthUnavailableInstallationError",
|
|
127
|
+
"GitHubConversationError",
|
|
128
|
+
"GitHubConversationTransientError",
|
|
129
|
+
"GitHubForkChecker",
|
|
130
|
+
"GitHubHTTPError",
|
|
131
|
+
"GitHubHTTPPaginationLimitError",
|
|
132
|
+
"GitHubHTTPResponseTooLargeError",
|
|
133
|
+
"GitHubHTTPTransientError",
|
|
134
|
+
"GitHubHttp",
|
|
135
|
+
"GitHubIssueCommentSessionLedger",
|
|
136
|
+
"GitHubInstallationLookup",
|
|
137
|
+
"GitHubLearningProposalError",
|
|
138
|
+
"GitHubLearningProposalTransientError",
|
|
139
|
+
"GitHubOIDCAudienceError",
|
|
140
|
+
"GitHubOIDCClaimsError",
|
|
141
|
+
"GitHubOIDCError",
|
|
142
|
+
"GitHubOIDCExpiredError",
|
|
143
|
+
"GitHubOIDCInvalidTokenError",
|
|
144
|
+
"GitHubOIDCIssuerError",
|
|
145
|
+
"GitHubOIDCSignatureError",
|
|
146
|
+
"GitHubPublicationError",
|
|
147
|
+
"GitHubPublicationTransientError",
|
|
148
|
+
"GitHubSetupClient",
|
|
149
|
+
"GitHubSetupError",
|
|
150
|
+
"GitHubSetupTransientError",
|
|
151
|
+
"GitHubSetupTransport",
|
|
152
|
+
"GitHubTokenTransport",
|
|
153
|
+
"InstallationToken",
|
|
154
|
+
"InstallationTokenScope",
|
|
155
|
+
"InstallationMapping",
|
|
156
|
+
"InMemoryAuditSink",
|
|
157
|
+
"InMemoryInstallationMapping",
|
|
158
|
+
"DeliveryLedger",
|
|
159
|
+
"EnvWebhookSecretSource",
|
|
160
|
+
"InMemoryDeliveryLedger",
|
|
161
|
+
"JWTAlgorithms",
|
|
162
|
+
"LearningPRPublisher",
|
|
163
|
+
"LearningPRResult",
|
|
164
|
+
"PrivateKeySource",
|
|
165
|
+
"PublicationResult",
|
|
166
|
+
"RequestedPermissions",
|
|
167
|
+
"ReplyResult",
|
|
168
|
+
"ReviewPublisher",
|
|
169
|
+
"GitHubWriteOptions",
|
|
170
|
+
"HttpJwksFetcher",
|
|
171
|
+
"JwksFetcher",
|
|
172
|
+
"OIDCBroker",
|
|
173
|
+
"RateLimiter",
|
|
174
|
+
"SetupFile",
|
|
175
|
+
"SetupPlan",
|
|
176
|
+
"SetupPlanBuilder",
|
|
177
|
+
"SetupPullRequestResult",
|
|
178
|
+
"SetupPullRequestService",
|
|
179
|
+
"TokenBucketRateLimiter",
|
|
180
|
+
"VerifiedDelivery",
|
|
181
|
+
"VerifiedOIDCClaims",
|
|
182
|
+
"WebhookSecretSource",
|
|
183
|
+
"WebhookVerifier",
|
|
184
|
+
"decode_jwt_parts",
|
|
185
|
+
"jwt_encode_rs256",
|
|
186
|
+
"verify_oidc_token",
|
|
187
|
+
"GitHubWebhookError",
|
|
188
|
+
"GitHubWebhookSignatureError",
|
|
189
|
+
]
|