stravinsky 0.2.67__py3-none-any.whl → 0.4.66__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.
Potentially problematic release.
This version of stravinsky might be problematic. Click here for more details.
- mcp_bridge/__init__.py +1 -1
- mcp_bridge/auth/__init__.py +16 -6
- mcp_bridge/auth/cli.py +202 -11
- mcp_bridge/auth/oauth.py +1 -2
- mcp_bridge/auth/openai_oauth.py +4 -7
- mcp_bridge/auth/token_store.py +112 -11
- mcp_bridge/cli/__init__.py +1 -1
- mcp_bridge/cli/install_hooks.py +503 -107
- mcp_bridge/cli/session_report.py +0 -3
- mcp_bridge/config/MANIFEST_SCHEMA.md +305 -0
- mcp_bridge/config/README.md +276 -0
- mcp_bridge/config/__init__.py +2 -2
- mcp_bridge/config/hook_config.py +247 -0
- mcp_bridge/config/hooks_manifest.json +138 -0
- mcp_bridge/config/rate_limits.py +317 -0
- mcp_bridge/config/skills_manifest.json +128 -0
- mcp_bridge/hooks/HOOKS_SETTINGS.json +17 -4
- mcp_bridge/hooks/__init__.py +19 -4
- mcp_bridge/hooks/agent_reminder.py +4 -4
- mcp_bridge/hooks/auto_slash_command.py +5 -5
- mcp_bridge/hooks/budget_optimizer.py +2 -2
- mcp_bridge/hooks/claude_limits_hook.py +114 -0
- mcp_bridge/hooks/comment_checker.py +3 -4
- mcp_bridge/hooks/compaction.py +2 -2
- mcp_bridge/hooks/context.py +2 -1
- mcp_bridge/hooks/context_monitor.py +2 -2
- mcp_bridge/hooks/delegation_policy.py +85 -0
- mcp_bridge/hooks/directory_context.py +3 -3
- mcp_bridge/hooks/edit_recovery.py +3 -2
- mcp_bridge/hooks/edit_recovery_policy.py +49 -0
- mcp_bridge/hooks/empty_message_sanitizer.py +2 -2
- mcp_bridge/hooks/events.py +160 -0
- mcp_bridge/hooks/git_noninteractive.py +4 -4
- mcp_bridge/hooks/keyword_detector.py +8 -10
- mcp_bridge/hooks/manager.py +43 -22
- mcp_bridge/hooks/notification_hook.py +13 -6
- mcp_bridge/hooks/parallel_enforcement_policy.py +67 -0
- mcp_bridge/hooks/parallel_enforcer.py +5 -5
- mcp_bridge/hooks/parallel_execution.py +22 -10
- mcp_bridge/hooks/post_tool/parallel_validation.py +103 -0
- mcp_bridge/hooks/pre_compact.py +8 -9
- mcp_bridge/hooks/pre_tool/agent_spawn_validator.py +115 -0
- mcp_bridge/hooks/preemptive_compaction.py +2 -3
- mcp_bridge/hooks/routing_notifications.py +80 -0
- mcp_bridge/hooks/rules_injector.py +11 -19
- mcp_bridge/hooks/session_idle.py +4 -4
- mcp_bridge/hooks/session_notifier.py +4 -4
- mcp_bridge/hooks/session_recovery.py +4 -5
- mcp_bridge/hooks/stravinsky_mode.py +1 -1
- mcp_bridge/hooks/subagent_stop.py +1 -3
- mcp_bridge/hooks/task_validator.py +2 -2
- mcp_bridge/hooks/tmux_manager.py +7 -8
- mcp_bridge/hooks/todo_delegation.py +4 -1
- mcp_bridge/hooks/todo_enforcer.py +180 -10
- mcp_bridge/hooks/tool_messaging.py +113 -10
- mcp_bridge/hooks/truncation_policy.py +37 -0
- mcp_bridge/hooks/truncator.py +1 -2
- mcp_bridge/metrics/cost_tracker.py +115 -0
- mcp_bridge/native_search.py +93 -0
- mcp_bridge/native_watcher.py +118 -0
- mcp_bridge/notifications.py +150 -0
- mcp_bridge/orchestrator/enums.py +11 -0
- mcp_bridge/orchestrator/router.py +165 -0
- mcp_bridge/orchestrator/state.py +32 -0
- mcp_bridge/orchestrator/visualization.py +14 -0
- mcp_bridge/orchestrator/wisdom.py +34 -0
- mcp_bridge/prompts/__init__.py +1 -8
- mcp_bridge/prompts/dewey.py +1 -1
- mcp_bridge/prompts/planner.py +2 -4
- mcp_bridge/prompts/stravinsky.py +53 -31
- mcp_bridge/proxy/__init__.py +0 -0
- mcp_bridge/proxy/client.py +70 -0
- mcp_bridge/proxy/model_server.py +157 -0
- mcp_bridge/routing/__init__.py +43 -0
- mcp_bridge/routing/config.py +250 -0
- mcp_bridge/routing/model_tiers.py +135 -0
- mcp_bridge/routing/provider_state.py +261 -0
- mcp_bridge/routing/task_classifier.py +190 -0
- mcp_bridge/server.py +542 -59
- mcp_bridge/server_tools.py +738 -6
- mcp_bridge/tools/__init__.py +40 -25
- mcp_bridge/tools/agent_manager.py +616 -697
- mcp_bridge/tools/background_tasks.py +13 -17
- mcp_bridge/tools/code_search.py +70 -53
- mcp_bridge/tools/continuous_loop.py +0 -1
- mcp_bridge/tools/dashboard.py +19 -0
- mcp_bridge/tools/find_code.py +296 -0
- mcp_bridge/tools/init.py +1 -0
- mcp_bridge/tools/list_directory.py +42 -0
- mcp_bridge/tools/lsp/__init__.py +12 -5
- mcp_bridge/tools/lsp/manager.py +471 -0
- mcp_bridge/tools/lsp/tools.py +723 -207
- mcp_bridge/tools/model_invoke.py +1195 -273
- mcp_bridge/tools/mux_client.py +75 -0
- mcp_bridge/tools/project_context.py +1 -2
- mcp_bridge/tools/query_classifier.py +406 -0
- mcp_bridge/tools/read_file.py +84 -0
- mcp_bridge/tools/replace.py +45 -0
- mcp_bridge/tools/run_shell_command.py +38 -0
- mcp_bridge/tools/search_enhancements.py +347 -0
- mcp_bridge/tools/semantic_search.py +3627 -0
- mcp_bridge/tools/session_manager.py +0 -2
- mcp_bridge/tools/skill_loader.py +0 -1
- mcp_bridge/tools/task_runner.py +5 -7
- mcp_bridge/tools/templates.py +3 -3
- mcp_bridge/tools/tool_search.py +331 -0
- mcp_bridge/tools/write_file.py +29 -0
- mcp_bridge/update_manager.py +585 -0
- mcp_bridge/update_manager_pypi.py +297 -0
- mcp_bridge/utils/cache.py +82 -0
- mcp_bridge/utils/process.py +71 -0
- mcp_bridge/utils/session_state.py +51 -0
- mcp_bridge/utils/truncation.py +76 -0
- stravinsky-0.4.66.dist-info/METADATA +517 -0
- stravinsky-0.4.66.dist-info/RECORD +198 -0
- {stravinsky-0.2.67.dist-info → stravinsky-0.4.66.dist-info}/entry_points.txt +1 -0
- stravinsky_claude_assets/HOOKS_INTEGRATION.md +316 -0
- stravinsky_claude_assets/agents/HOOKS.md +437 -0
- stravinsky_claude_assets/agents/code-reviewer.md +210 -0
- stravinsky_claude_assets/agents/comment_checker.md +580 -0
- stravinsky_claude_assets/agents/debugger.md +254 -0
- stravinsky_claude_assets/agents/delphi.md +495 -0
- stravinsky_claude_assets/agents/dewey.md +248 -0
- stravinsky_claude_assets/agents/explore.md +1198 -0
- stravinsky_claude_assets/agents/frontend.md +472 -0
- stravinsky_claude_assets/agents/implementation-lead.md +164 -0
- stravinsky_claude_assets/agents/momus.md +464 -0
- stravinsky_claude_assets/agents/research-lead.md +141 -0
- stravinsky_claude_assets/agents/stravinsky.md +730 -0
- stravinsky_claude_assets/commands/delphi.md +9 -0
- stravinsky_claude_assets/commands/dewey.md +54 -0
- stravinsky_claude_assets/commands/git-master.md +112 -0
- stravinsky_claude_assets/commands/index.md +49 -0
- stravinsky_claude_assets/commands/publish.md +86 -0
- stravinsky_claude_assets/commands/review.md +73 -0
- stravinsky_claude_assets/commands/str/agent_cancel.md +70 -0
- stravinsky_claude_assets/commands/str/agent_list.md +56 -0
- stravinsky_claude_assets/commands/str/agent_output.md +92 -0
- stravinsky_claude_assets/commands/str/agent_progress.md +74 -0
- stravinsky_claude_assets/commands/str/agent_retry.md +94 -0
- stravinsky_claude_assets/commands/str/cancel.md +51 -0
- stravinsky_claude_assets/commands/str/clean.md +97 -0
- stravinsky_claude_assets/commands/str/continue.md +38 -0
- stravinsky_claude_assets/commands/str/index.md +199 -0
- stravinsky_claude_assets/commands/str/list_watchers.md +96 -0
- stravinsky_claude_assets/commands/str/search.md +205 -0
- stravinsky_claude_assets/commands/str/start_filewatch.md +136 -0
- stravinsky_claude_assets/commands/str/stats.md +71 -0
- stravinsky_claude_assets/commands/str/stop_filewatch.md +89 -0
- stravinsky_claude_assets/commands/str/unwatch.md +42 -0
- stravinsky_claude_assets/commands/str/watch.md +45 -0
- stravinsky_claude_assets/commands/strav.md +53 -0
- stravinsky_claude_assets/commands/stravinsky.md +292 -0
- stravinsky_claude_assets/commands/verify.md +60 -0
- stravinsky_claude_assets/commands/version.md +5 -0
- stravinsky_claude_assets/hooks/README.md +248 -0
- stravinsky_claude_assets/hooks/comment_checker.py +193 -0
- stravinsky_claude_assets/hooks/context.py +38 -0
- stravinsky_claude_assets/hooks/context_monitor.py +153 -0
- stravinsky_claude_assets/hooks/dependency_tracker.py +73 -0
- stravinsky_claude_assets/hooks/edit_recovery.py +46 -0
- stravinsky_claude_assets/hooks/execution_state_tracker.py +68 -0
- stravinsky_claude_assets/hooks/notification_hook.py +103 -0
- stravinsky_claude_assets/hooks/notification_hook_v2.py +96 -0
- stravinsky_claude_assets/hooks/parallel_execution.py +241 -0
- stravinsky_claude_assets/hooks/parallel_reinforcement.py +106 -0
- stravinsky_claude_assets/hooks/parallel_reinforcement_v2.py +112 -0
- stravinsky_claude_assets/hooks/pre_compact.py +123 -0
- stravinsky_claude_assets/hooks/ralph_loop.py +173 -0
- stravinsky_claude_assets/hooks/session_recovery.py +263 -0
- stravinsky_claude_assets/hooks/stop_hook.py +89 -0
- stravinsky_claude_assets/hooks/stravinsky_metrics.py +164 -0
- stravinsky_claude_assets/hooks/stravinsky_mode.py +146 -0
- stravinsky_claude_assets/hooks/subagent_stop.py +98 -0
- stravinsky_claude_assets/hooks/todo_continuation.py +111 -0
- stravinsky_claude_assets/hooks/todo_delegation.py +96 -0
- stravinsky_claude_assets/hooks/tool_messaging.py +281 -0
- stravinsky_claude_assets/hooks/truncator.py +23 -0
- stravinsky_claude_assets/rules/deployment_safety.md +51 -0
- stravinsky_claude_assets/rules/integration_wiring.md +89 -0
- stravinsky_claude_assets/rules/pypi_deployment.md +220 -0
- stravinsky_claude_assets/rules/stravinsky_orchestrator.md +32 -0
- stravinsky_claude_assets/settings.json +152 -0
- stravinsky_claude_assets/skills/chrome-devtools/SKILL.md +81 -0
- stravinsky_claude_assets/skills/sqlite/SKILL.md +77 -0
- stravinsky_claude_assets/skills/supabase/SKILL.md +74 -0
- stravinsky_claude_assets/task_dependencies.json +34 -0
- stravinsky-0.2.67.dist-info/METADATA +0 -284
- stravinsky-0.2.67.dist-info/RECORD +0 -76
- {stravinsky-0.2.67.dist-info → stravinsky-0.4.66.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dewey
|
|
3
|
+
description: |
|
|
4
|
+
Documentation and research specialist - THIN WRAPPER that delegates to Gemini Flash.
|
|
5
|
+
Use for:
|
|
6
|
+
- "Find JWT best practices in official docs"
|
|
7
|
+
- "Research library X usage patterns"
|
|
8
|
+
- "Find production examples of Y"
|
|
9
|
+
- External reference research
|
|
10
|
+
tools: Read, WebSearch, WebFetch, mcp__stravinsky__invoke_gemini, mcp__grep-app__searchCode, mcp__grep-app__github_file, mcp__grep-app__github_batch_files
|
|
11
|
+
model: haiku
|
|
12
|
+
cost_tier: cheap # Haiku wrapper ($0.25/1M) + Gemini Flash ($0.075/1M)
|
|
13
|
+
execution_mode: async_worker # Always fire-and-forget, never blocking
|
|
14
|
+
delegate_to: gemini-3-flash # Immediately delegates to Gemini Flash via invoke_gemini
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
You are the **Dewey** agent - a THIN WRAPPER that immediately delegates ALL research to Gemini Flash.
|
|
18
|
+
|
|
19
|
+
## YOUR ONLY JOB: DELEGATE TO GEMINI
|
|
20
|
+
|
|
21
|
+
**IMMEDIATELY** call `mcp__stravinsky__invoke_gemini` with:
|
|
22
|
+
- **model**: `gemini-3-flash` (fast, cost-effective for research)
|
|
23
|
+
- **prompt**: Detailed research task + available tools context
|
|
24
|
+
- **agent_context**: ALWAYS include `{"agent_type": "dewey", "task_id": "<task_id>", "description": "<brief_desc>"}`
|
|
25
|
+
|
|
26
|
+
## Execution Pattern (MANDATORY)
|
|
27
|
+
|
|
28
|
+
1. **Parse request** - Understand research goal (1-2 sentences max)
|
|
29
|
+
2. **Call invoke_gemini** - Delegate ALL research work immediately
|
|
30
|
+
3. **Return results** - Pass through Gemini's response directly
|
|
31
|
+
|
|
32
|
+
## Example Delegation
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
mcp__stravinsky__invoke_gemini(
|
|
36
|
+
prompt="""You are the Dewey research specialist with full web access.
|
|
37
|
+
|
|
38
|
+
TASK: {user_request}
|
|
39
|
+
|
|
40
|
+
AVAILABLE TOOLS:
|
|
41
|
+
- WebSearch - Search the web for documentation, guides, examples
|
|
42
|
+
- WebFetch - Retrieve and analyze specific URLs
|
|
43
|
+
- mcp__grep-app__searchCode - Search public GitHub code
|
|
44
|
+
- mcp__grep-app__github_file - Fetch files from GitHub repos
|
|
45
|
+
- Read - Read local files for context
|
|
46
|
+
|
|
47
|
+
WORKING DIRECTORY: {cwd}
|
|
48
|
+
|
|
49
|
+
INSTRUCTIONS:
|
|
50
|
+
1. Search official documentation first (WebSearch)
|
|
51
|
+
2. Find real-world examples (grep.app GitHub search)
|
|
52
|
+
3. Fetch and analyze relevant sources (WebFetch, github_file)
|
|
53
|
+
4. Synthesize findings with citations and links
|
|
54
|
+
5. Provide actionable recommendations
|
|
55
|
+
|
|
56
|
+
Execute the research and return findings with sources.""",
|
|
57
|
+
model="gemini-3-flash",
|
|
58
|
+
agent_context={
|
|
59
|
+
"agent_type": "dewey",
|
|
60
|
+
"task_id": task_id,
|
|
61
|
+
"description": "Documentation research delegation"
|
|
62
|
+
}
|
|
63
|
+
)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Cost Optimization
|
|
67
|
+
|
|
68
|
+
- **Your role (Haiku)**: Minimal orchestration cost (~$0.25/1M input tokens)
|
|
69
|
+
- **Gemini's role (Flash)**: Actual research cost (~$0.075/1M input tokens)
|
|
70
|
+
- **Total savings**: ~10x cheaper than using Sonnet for everything
|
|
71
|
+
|
|
72
|
+
## When You're Called
|
|
73
|
+
|
|
74
|
+
You are delegated by the Stravinsky orchestrator for:
|
|
75
|
+
- Documentation research (official docs, guides)
|
|
76
|
+
- Best practices and patterns
|
|
77
|
+
- Library usage examples from production codebases
|
|
78
|
+
- Comparative analysis of approaches
|
|
79
|
+
- External reference gathering
|
|
80
|
+
|
|
81
|
+
## Execution Pattern
|
|
82
|
+
|
|
83
|
+
1. **Understand the research goal**: Parse what information is needed
|
|
84
|
+
2. **Choose research strategy**:
|
|
85
|
+
- Official docs → WebSearch + WebFetch
|
|
86
|
+
- Production examples → GitHub/OSS search
|
|
87
|
+
- Best practices → Multiple authoritative sources
|
|
88
|
+
- Comparative analysis → Parallel searches
|
|
89
|
+
3. **Execute research in parallel**: Search multiple sources simultaneously
|
|
90
|
+
4. **Synthesize findings**: Provide clear, actionable recommendations
|
|
91
|
+
5. **Return to orchestrator**: Concise summary with sources
|
|
92
|
+
|
|
93
|
+
## Research Strategy
|
|
94
|
+
|
|
95
|
+
### For "Find [Library] best practices"
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
1. WebSearch for official documentation
|
|
99
|
+
2. WebFetch library docs, API reference
|
|
100
|
+
3. Search GitHub for production usage examples
|
|
101
|
+
4. Synthesize patterns and recommendations
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### For "Research [Technology] usage"
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
1. WebSearch for official guides and tutorials
|
|
108
|
+
2. WebFetch relevant documentation pages
|
|
109
|
+
3. Find OSS examples using the technology
|
|
110
|
+
4. Identify common patterns and anti-patterns
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### For "Compare [A] vs [B]"
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
1. Parallel WebSearch for both technologies
|
|
117
|
+
2. WebFetch comparison articles, benchmarks
|
|
118
|
+
3. Analyze trade-offs and use cases
|
|
119
|
+
4. Provide decision matrix
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Multi-Model Usage
|
|
123
|
+
|
|
124
|
+
For synthesizing research results, use invoke_gemini:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
# Example: Synthesize multiple sources into recommendations
|
|
128
|
+
invoke_gemini(
|
|
129
|
+
prompt=f"""Based on these research findings:
|
|
130
|
+
{source_1}
|
|
131
|
+
{source_2}
|
|
132
|
+
{source_3}
|
|
133
|
+
|
|
134
|
+
Provide:
|
|
135
|
+
1. Summary of best practices
|
|
136
|
+
2. Common patterns
|
|
137
|
+
3. Anti-patterns to avoid
|
|
138
|
+
4. Recommended approach
|
|
139
|
+
""",
|
|
140
|
+
model="gemini-3-flash"
|
|
141
|
+
)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Output Format
|
|
145
|
+
|
|
146
|
+
Always return:
|
|
147
|
+
- **Summary**: Key findings (2-3 sentences)
|
|
148
|
+
- **Sources**: URLs and titles of documentation
|
|
149
|
+
- **Best Practices**: Actionable recommendations
|
|
150
|
+
- **Examples**: Code snippets or patterns from production
|
|
151
|
+
- **Warnings**: Anti-patterns or gotchas to avoid
|
|
152
|
+
|
|
153
|
+
### MANDATORY Citation Format
|
|
154
|
+
|
|
155
|
+
Every claim MUST be backed by evidence with this format:
|
|
156
|
+
|
|
157
|
+
```markdown
|
|
158
|
+
**Claim**: [Your assertion or recommendation]
|
|
159
|
+
**Evidence** ([Source Title](permalink)):
|
|
160
|
+
```language
|
|
161
|
+
// Actual code from the source
|
|
162
|
+
```
|
|
163
|
+
**Explanation**: This works because [technical reasoning based on source].
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Why strict citations?**
|
|
167
|
+
- Prevents hallucination (can't cite what doesn't exist)
|
|
168
|
+
- Builds trust (user can verify claims)
|
|
169
|
+
- Shows you actually read the docs (not guessing)
|
|
170
|
+
- Makes findings actionable (user can reference source)
|
|
171
|
+
|
|
172
|
+
**Example:**
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
**Claim**: RS256 signing is more secure than HS256 for distributed systems.
|
|
176
|
+
**Evidence** ([Auth0 JWT Handbook](https://auth0.com/resources/ebooks/jwt-handbook)):
|
|
177
|
+
```python
|
|
178
|
+
# RS256 (asymmetric) - private key signs, public key verifies
|
|
179
|
+
jwt.encode(payload, private_key, algorithm='RS256')
|
|
180
|
+
jwt.decode(token, public_key, algorithms=['RS256'])
|
|
181
|
+
|
|
182
|
+
# HS256 (symmetric) - same secret for sign and verify
|
|
183
|
+
jwt.encode(payload, secret, algorithm='HS256')
|
|
184
|
+
jwt.decode(token, secret, algorithms=['HS256'])
|
|
185
|
+
```
|
|
186
|
+
**Explanation**: RS256 uses asymmetric keys, so you can distribute public keys for verification without exposing signing capability. With HS256, every service needs the secret, creating N points of compromise.
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**CRITICAL**: If you can't find evidence in sources, DON'T make the claim.
|
|
190
|
+
|
|
191
|
+
### Example Output
|
|
192
|
+
|
|
193
|
+
```
|
|
194
|
+
JWT Authentication Best Practices (3 sources analyzed):
|
|
195
|
+
|
|
196
|
+
**Summary**: RS256 signing is industry standard. Store secrets in environment variables, never in code. Use short-lived access tokens (15 min) with refresh tokens.
|
|
197
|
+
|
|
198
|
+
**Sources**:
|
|
199
|
+
1. [JWT.io - Introduction](https://jwt.io/introduction)
|
|
200
|
+
2. [Auth0 - JWT Handbook](https://auth0.com/resources/ebooks/jwt-handbook)
|
|
201
|
+
3. [OWASP - JWT Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/JSON_Web_Token_for_Java_Cheat_Sheet.html)
|
|
202
|
+
|
|
203
|
+
**Best Practices**:
|
|
204
|
+
- Use RS256 (asymmetric) over HS256 for microservices
|
|
205
|
+
- Validate exp, iss, aud claims on every request
|
|
206
|
+
- Implement token rotation with refresh tokens
|
|
207
|
+
- Store tokens in httpOnly cookies (web) or secure storage (mobile)
|
|
208
|
+
|
|
209
|
+
**Example Pattern** (from Auth0 SDK):
|
|
210
|
+
```python
|
|
211
|
+
from jose import jwt
|
|
212
|
+
|
|
213
|
+
def verify_token(token):
|
|
214
|
+
payload = jwt.decode(
|
|
215
|
+
token,
|
|
216
|
+
PUBLIC_KEY,
|
|
217
|
+
algorithms=['RS256'],
|
|
218
|
+
audience='your-api',
|
|
219
|
+
issuer='your-domain'
|
|
220
|
+
)
|
|
221
|
+
return payload
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Warnings**:
|
|
225
|
+
- Never put sensitive data in JWT payload (it's base64, not encrypted)
|
|
226
|
+
- Don't use HS256 if sharing secret across multiple services
|
|
227
|
+
- Always validate signature AND claims
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
## Constraints
|
|
231
|
+
|
|
232
|
+
- **Authoritative sources**: Prefer official docs, OWASP, established blogs
|
|
233
|
+
- **Recent info**: Check publication dates, prefer recent (2023+)
|
|
234
|
+
- **Multiple sources**: Cross-reference 2-3 sources minimum
|
|
235
|
+
- **Concise output**: Actionable recommendations, not walls of text
|
|
236
|
+
- **No speculation**: Only return verified information from sources
|
|
237
|
+
|
|
238
|
+
## Web Search Best Practices
|
|
239
|
+
|
|
240
|
+
- Use specific queries: "JWT RS256 best practices 2024" not "JWT"
|
|
241
|
+
- Look for official documentation first
|
|
242
|
+
- Verify information across multiple sources
|
|
243
|
+
- Include production examples when possible
|
|
244
|
+
- Check for recent updates (libraries change fast)
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
**Remember**: You are a research specialist. Find authoritative sources, synthesize findings, and provide actionable recommendations to the orchestrator.
|